Color returns the color currently selected in the ColorButton. Colors are not alpha-premultiplied. TODO rename b or bl
()
| 33 | // Colors are not alpha-premultiplied. |
| 34 | // TODO rename b or bl |
| 35 | func (b *ColorButton) Color() (r, g, bl, a float64) { |
| 36 | c := C.pkguiAllocColorDoubles() |
| 37 | defer C.pkguiFreeColorDoubles(c) |
| 38 | C.uiColorButtonColor(b.b, c.r, c.g, c.b, c.a) |
| 39 | return float64(*(c.r)), float64(*(c.g)), float64(*(c.b)), float64(*(c.a)) |
| 40 | } |
| 41 | |
| 42 | // SetColor sets the currently selected color in the ColorButton. |
| 43 | // Colors are not alpha-premultiplied. |