question overlays work :)
This commit is contained in:
parent
8b57b97c80
commit
b11baf1358
6 changed files with 218 additions and 31 deletions
|
@ -13,7 +13,7 @@ pub(crate) struct Question {
|
|||
}
|
||||
|
||||
impl Question {
|
||||
pub(crate) fn new(res: Resolution, lang: &Language<'_>, str: String) -> Self {
|
||||
pub(crate) fn new(res: Resolution, lang: &Language<'_>, str: &str) -> Self {
|
||||
static FONT: OnceLock<Owned<Font<'static>>> = OnceLock::new();
|
||||
let font = FONT.get_or_init(|| {
|
||||
let fc = Fontconfig::new().unwrap();
|
||||
|
@ -134,14 +134,6 @@ impl Question {
|
|||
svg.set_width(self.res.width());
|
||||
svg.set_height(self.res.height());
|
||||
svg.set_view_box("0 0 1920 1080");
|
||||
svg.push(
|
||||
Rect::new()
|
||||
.with_fill("#040")
|
||||
.with_x(0)
|
||||
.with_y(0)
|
||||
.with_width(1920)
|
||||
.with_height(1080)
|
||||
);
|
||||
svg.push(self.g);
|
||||
svg
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue