mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
js,gg: more work on porting gg to JS backend (#12903)
This commit is contained in:
@@ -232,3 +232,7 @@ const (
|
||||
pub fn color_from_string(s string) Color {
|
||||
return gx.string_colors[s]
|
||||
}
|
||||
|
||||
pub fn (c Color) to_css_string() string {
|
||||
return 'rgb($c.r,$c.g,$c.b)'
|
||||
}
|
||||
|
14
vlib/gx/text.js.v
Normal file
14
vlib/gx/text.js.v
Normal file
@@ -0,0 +1,14 @@
|
||||
module gx
|
||||
|
||||
pub enum HorizontalAlign {
|
||||
left
|
||||
center
|
||||
right
|
||||
}
|
||||
|
||||
pub enum VerticalAlign {
|
||||
top
|
||||
middle
|
||||
bottom
|
||||
baseline
|
||||
}
|
Reference in New Issue
Block a user