// See cairo_set_source_rgb().
//
// C API documentation: http://cairographics.org/manual/cairo-cairo-t.html#cairo-set-source-rgb
326229
func (cr *Context) SetSourceRGB(red, green, blue float64) {
	C.cairo_set_source_rgb(cr.Ptr, C.double(red), C.double(green), C.double(blue))
	if err := cr.status(); err != nil {
		panic(err)
	}
}
6587
func (w *Waveform) SetBGColorFunction(function ColorFunc) error {
	return w.SetOptions(BGColorFunction(function))
}
321681
func (l *RgbLedDriver) SetRGB(r, g, b byte) error {
	l.redColor = r
	l.greenColor = g
	l.blueColor = b

	return l.On()
}
853085
func (s *AttachTypedLinkInput) SetSourceObjectReference(v *ObjectReference) *AttachTypedLinkInput {
	s.SourceObjectReference = v
	return s
}
894027
func (pattern *Pattern) AddColorStopRGB(offset, red, green, blue float64) {
	C.cairo_pattern_add_color_stop_rgb(pattern.Ptr, C.double(offset), C.double(red), C.double(green), C.double(blue))
	if err := pattern.status(); err != nil {
		panic(err)
	}
}
887003
func (v *Image) SetFromPixbuf(pixbuf *gdkpixbuf.Pixbuf) {
	C.gtk_image_set_from_pixbuf(IMAGE(v), (*C.GdkPixbuf)(unsafe.Pointer(pixbuf.GPixbuf)))
}
691378
func (s *DeliveryStreamDescription) SetSource(v *SourceDescription) *DeliveryStreamDescription {
	s.Source = v
	return s
}
955806
func (gp *GoPdf) SetStrokeColor(r uint8, g uint8, b uint8) {
	gp.getContent().AppendStreamSetColorStroke(r, g, b)
}
1260957
func (surface *Surface) Set(x, y int, c color.Color) {
	pix := surface.Pixels()
	i := int32(y)*surface.Pitch + int32(x)*int32(surface.Format.BytesPerPixel)
	switch surface.Format.Format {
	case PIXELFORMAT_ARGB8888:
		col := surface.ColorModel().Convert(c).(color.RGBA)
		pix[i+0] = col.R
		pix[i+1] = col.G
		pix[i+2] = col.B
		pix[i+3] = col.A
	case PIXELFORMAT_ABGR8888:
		col := surface.ColorModel().Convert(c).(color.RGBA)
		pix[i+3] = col.R
		pix[i+2] = col.G
		pix[i+1] = col.B
		pix[i+0] = col.A
	case PIXELFORMAT_RGB24, PIXELFORMAT_RGB888:
		col := surface.ColorModel().Convert(c).(color.RGBA)
		pix[i+0] = col.B
		pix[i+1] = col.G
		pix[i+2] = col.R
	case PIXELFORMAT_BGR24, PIXELFORMAT_BGR888:
		col := surface.ColorModel().Convert(c).(color.RGBA)
		pix[i+2] = col.R
		pix[i+1] = col.G
		pix[i+0] = col.B
	default:
		panic("Unknown pixel format!")
	}
}
1188095
func (s *H264Settings) SetColorMetadata(v string) *H264Settings {
	s.ColorMetadata = &v
	return s
}
611545
def set_source_rgb(self, red, green, blue):
        
        cairo.cairo_set_source_rgb(self._pointer, red, green, blue)
        self._check_status()
1249750
func (vr *vectorRenderer) SetFontColor(c drawing.Color) {
	vr.s.FontColor = c
}
496233
func SetBackground(c color.Color) {
	if !engo.Headless() {
		r, g, b, a := c.RGBA()

		engo.Gl.ClearColor(float32(r)/0xffff, float32(g)/0xffff, float32(b)/0xffff, float32(a)/0xffff)
	}
}
832870
func (s *Scte20SourceSettings) SetSource608ChannelNumber(v int64) *Scte20SourceSettings {
	s.Source608ChannelNumber = &v
	return s
}
783879
func (s *ListedFlow) SetSourceType(v string) *ListedFlow {
	s.SourceType = &v
	return s
}
1343437
func ColorToRGB(colorVal int) color.RGBA {

	red := colorVal >> 16
	green := (colorVal & 0x00FF00) >> 8
	blue := colorVal & 0x0000FF

	return color.RGBA{
		R: uint8(red),
		G: uint8(green),
		B: uint8(blue),
		A: uint8(255),
	}
}
252681
func (dc *Context) SetRGB(r, g, b float64) {
	dc.SetRGBA(r, g, b, 1)
}