Initial project import
This commit is contained in:
commit
23f2d29e32
11957 files changed
+1754577
No files matched your search
@@ -0,0 +1,20 @@
|
||||
module gg
|
||||
|
||||
pub enum HorizontalAlign {
|
||||
left
|
||||
center
|
||||
right
|
||||
}
|
||||
|
||||
pub enum VerticalAlign {
|
||||
top
|
||||
middle
|
||||
bottom
|
||||
baseline
|
||||
}
|
||||
|
||||
pub fn (mut ctx Context) draw_text(x int, y int, text_ string, cfg TextCfg) {
|
||||
ctx.context.fillStyle = cfg.color.to_css_string().str
|
||||
ctx.context.font = cfg.to_css_string().str
|
||||
ctx.context.fillText(text_.str, JS.Number(x), JS.Number(y))
|
||||
}
|
||||
Reference in new issue
Block a user