Surface.createForRectangle - multiple declarations
- Function Surface.createForRectangle
- Function Surface.createForRectangle
Function Surface.createForRectangle
Create a new surface that is a rectangle
within the target
surface.
All operations drawn to this surface are then clipped and translated
onto the target
surface. Nothing drawn via this sub-surface
outside of its bounds is drawn onto the target
surface,
making this a useful method for passing constrained child
surfaces to library routines that draw directly onto the parent
surface, i.e. with no further backend allocations, double
buffering or copies.
Prototype
Note
The semantics of subsurfaces have not been finalized yet unless
the rectangle
is in full device
units, is contained within
the extents of the target
surface, and the target
or
subsurface's device
transforms are not changed.
Parameters
Name | Description |
---|---|
target | an existing surface for which the sub-surface will point to |
rect | location of the subsurface |
Function Surface.createForRectangle
Create a new surface that is a rectangle
within the target
surface.
All operations drawn to this surface are then clipped and translated
onto the target
surface. Nothing drawn via this sub-surface
outside of its bounds is drawn onto the target
surface,
making this a useful method for passing constrained child
surfaces to library routines that draw directly onto the parent
surface, i.e. with no further backend allocations, double
buffering or copies.
Prototype
Note
The semantics of subsurfaces have not been finalized yet unless
the rectangle
is in full device
units, is contained within
the extents of the target
surface, and the target
or
subsurface's device
transforms are not changed.
Parameters
Name | Description |
---|---|
target | an existing surface for which the sub-surface will point to |
rect | location of the subsurface |
Authors
Johannes Pfau | cairoD |
Andrej Mitrovic | cairoD |
cairo team | cairo |
Copyright
License
cairoD wrapper/bindings | Boost License 1.0 |
cairo | LGPL 2.1 / MPL 1.1 |