module Group:Temporary redirection of drawing commands to intermediate surfaces.
val push :
?content:Cairo.content -> Cairo.context -> unit
Cairo.Group.pop_to_source. 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
Group.pop. Each call pushes/pops the new
target group onto/from a stack.
Group.push function calls
save so that any changes
to the graphics state will not be visible outside the group,
Group.pop function call
content: The content type of the group. By default the intermediate group will have a content type of
val pop :
Cairo.context -> Cairo.Pattern.any
Cairo.Group.pushand returns a new pattern containing the results of all drawing operations performed to the group.
Group.pop function calls
Cairo.restore (balancing a
Cairo.save by the
Group.push function), so that any
changes to the graphics state will not be visible outside the
Returns a newly created (surface) pattern containing the results of all drawing operations performed to the group.
val pop_to_source :
Cairo.context -> unit
Group.pushand installs the resulting pattern as the source pattern in the given cairo context.
The behavior of this function is equivalent to the sequence of operations:
let group = Cairo.Group.pop cr in Cairo.set_source cr group;
val get_target :
Cairo.context -> Cairo.Surface.t
createor the target surface for the current group as started by the most recent call to