mirror of
https://gitee.com/energye/energy.git
synced 2024-11-29 18:28:06 +08:00
U: CEF ARGB
This commit is contained in:
parent
0f9d9554e9
commit
3114f87432
@ -188,6 +188,22 @@ func CefCursorToWindowsCursor(cefCursor consts.TCefCursorType) (result t.TCursor
|
||||
return
|
||||
}
|
||||
|
||||
func CefColorSetARGB(a, r, g, b byte) types.TCefColor {
|
||||
return types.TCefColor((a >> 24) | (r >> 16) | (g >> 8) | b)
|
||||
func CefColorGetA(color types.TCefColor) uint8 {
|
||||
return uint8(color>>24) & 0xFF
|
||||
}
|
||||
|
||||
func CefColorGetR(color types.TCefColor) uint8 {
|
||||
return uint8(color>>16) & 0xFF
|
||||
}
|
||||
|
||||
func CefColorGetG(color types.TCefColor) uint8 {
|
||||
return uint8(color>>8) & 0xFF
|
||||
}
|
||||
|
||||
func CefColorGetB(color types.TCefColor) uint8 {
|
||||
return uint8(color) & 0xFF
|
||||
}
|
||||
|
||||
func CefColorSetARGB(a, r, g, b byte) types.TCefColor {
|
||||
return types.TCefColor((uint32(a) << 24) | (uint32(r) << 16) | (uint32(g) << 8) | (uint32(b)))
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user