Пример #1
0
// Construct a color from its 3 RGB components
//
// \param red   Red component   (0 .. 255)
// \param green Green component (0 .. 255)
// \param blue  Blue component  (0 .. 255)
//
// \return sfColor constructed from the components
// sfColor sfColor_fromRGB(sfUint8 red, sfUint8 green, sfUint8 blue);
func FromRGB(red uint8, green uint8, blue uint8) Color {
	return Color{C.sfColor_fromRGB(
		C.sfUint8(red),
		C.sfUint8(green),
		C.sfUint8(blue),
	)}
}
Пример #2
0
func ColorFromRGBA(r, g, b, a uint8) Color {
	return Color{C.sfColor_FromRGBA(C.sfUint8(r), C.sfUint8(g), C.sfUint8(b), C.sfUint8(a))}
}
Пример #3
0
func ColorFromRGB(r, g, b int) Color {
	return Color{C.sfColor_FromRGB(C.sfUint8(r), C.sfUint8(g), C.sfUint8(b))}
}