コード例 #1
0
ファイル: surface.go プロジェクト: ungerik/go-cairo
func (self *Surface) SetSource(pattern *Pattern) {
	C.cairo_set_source(self.context, pattern.pattern)
}
コード例 #2
0
ファイル: cairo.go プロジェクト: jimmyfrasche/cairo
//SetSource sets the source pattern of c to source.
//This pattern will be used for any subsequent drawing operations, until a new
//source pattern is set.
//
//Note
//
//The pattern's transformation matrix will be locked to the user space in effect
//at the time of SetSource.
//This means that further modifications of the current transformation matrix will
//not affect the source pattern.
//See Pattern.SetMatrix.
//
//Originally cairo_set_source.
func (c *Context) SetSource(source Pattern) *Context {
	C.cairo_set_source(c.c, source.XtensionRaw())
	return c
}