// PushGroup is a wrapper around cairo_push_group(). func (v *Context) PushGroup() { C.cairo_push_group(v.native()) }
func (self *Surface) PushGroup() { C.cairo_push_group(self.context) }
//PushGroup temporarily redirects drawing to an intermediate surface known //as a group. //The redirection lasts until the group is completed by a call to PopGroup //or PopGroupToSource. //These calls provide the result of any drawing to the group as a pattern, //either as an explicit object or set as the source pattern. // //This group functionality can be convenient for performing intermediate //compositing. //One common use of a group is to render objects as opaque within the group, //so that they occlude each other, and then blend the result with translucence //onto the destination. // //Groups can be nested arbitrarily deep by making balanced calls to PushGroup //and PopGroup/PopGroupToSource. //Each call pushes/pops the new target group onto/from a stack. // //Like Save, any changes to the drawing state following PushGroup will not //be visible after a call to PopGroup/PopGroupToSource. // //By default, this intermediate group will have a content type of //ContentColorAlpha. //Other content types may be specified by calling PushGroupWithContent instead. // //An example of a translucent filled and stroked path without any portion of the //visible under the stroke: // // c.PushGroup(). // SetSource(fillPattern). // FillPreserve(). // SetSource(strokePattern). // Stroke(). // PopGroupToSource() // c.PaintWithAlpha(alpha) // //Originally cairo_push_group. func (c *Context) PushGroup() *Context { C.cairo_push_group(c.c) return c }