align PBS color builtins with RGBA8888
This commit is contained in:
+57
-1
@@ -1,5 +1,61 @@
|
||||
[BuiltinType(name = "Color", version = 1)]
|
||||
[BuiltinType(name = "color", version = 1)]
|
||||
declare builtin type Color(
|
||||
pub raw: int
|
||||
) {
|
||||
[IntrinsicCall(name = "from_raw", version = 1)]
|
||||
fn from_raw(raw: int) -> Color;
|
||||
|
||||
[IntrinsicCall(name = "rgb", version = 1)]
|
||||
fn rgb(r: int, g: int, b: int) -> Color;
|
||||
|
||||
[IntrinsicCall(name = "rgba", version = 1)]
|
||||
fn rgba(r: int, g: int, b: int, a: int) -> Color;
|
||||
|
||||
[IntrinsicCall(name = "html_rgba", version = 1)]
|
||||
fn html_rgba(value: str) -> Color;
|
||||
|
||||
[IntrinsicCall(name = "gray_scale", version = 1)]
|
||||
fn gray_scale(value: int) -> Color;
|
||||
|
||||
[IntrinsicCall(name = "hex", version = 1)]
|
||||
fn hex() -> int;
|
||||
|
||||
[IntrinsicCall(name = "alpha", version = 1)]
|
||||
fn alpha() -> int;
|
||||
}
|
||||
|
||||
[BuiltinConst(target = "color", name = "black", version = 1)]
|
||||
declare const BLACK: Color;
|
||||
|
||||
[BuiltinConst(target = "color", name = "white", version = 1)]
|
||||
declare const WHITE: Color;
|
||||
|
||||
[BuiltinConst(target = "color", name = "red", version = 1)]
|
||||
declare const RED: Color;
|
||||
|
||||
[BuiltinConst(target = "color", name = "green", version = 1)]
|
||||
declare const GREEN: Color;
|
||||
|
||||
[BuiltinConst(target = "color", name = "blue", version = 1)]
|
||||
declare const BLUE: Color;
|
||||
|
||||
[BuiltinConst(target = "color", name = "yellow", version = 1)]
|
||||
declare const YELLOW: Color;
|
||||
|
||||
[BuiltinConst(target = "color", name = "orange", version = 1)]
|
||||
declare const ORANGE: Color;
|
||||
|
||||
[BuiltinConst(target = "color", name = "indigo", version = 1)]
|
||||
declare const INDIGO: Color;
|
||||
|
||||
[BuiltinConst(target = "color", name = "gray", version = 1)]
|
||||
declare const GRAY: Color;
|
||||
|
||||
[BuiltinConst(target = "color", name = "cyan", version = 1)]
|
||||
declare const CYAN: Color;
|
||||
|
||||
[BuiltinConst(target = "color", name = "magenta", version = 1)]
|
||||
declare const MAGENTA: Color;
|
||||
|
||||
[BuiltinConst(target = "color", name = "transparent", version = 1)]
|
||||
declare const TRANSPARENT: Color;
|
||||
|
||||
+12
@@ -1 +1,13 @@
|
||||
pub struct Color;
|
||||
pub const BLACK;
|
||||
pub const WHITE;
|
||||
pub const RED;
|
||||
pub const GREEN;
|
||||
pub const BLUE;
|
||||
pub const YELLOW;
|
||||
pub const ORANGE;
|
||||
pub const INDIGO;
|
||||
pub const GRAY;
|
||||
pub const CYAN;
|
||||
pub const MAGENTA;
|
||||
pub const TRANSPARENT;
|
||||
|
||||
Reference in New Issue
Block a user