Function Context.setSourceSurface
This is a convenience function for creating a pattern from
surface and setting it as the source
in cr with Context.setSource
().
The x
and y
parameters give the user-space coordinate at
which the surface origin should appear. (The surface origin
is its upper-left corner before any transformation has been
applied.) The x
and y
parameters are negated and then set
as translation values in the pattern matrix
.
Other than the initial translation pattern matrix
,
as described above, all other pattern attributes,
(such as its extend mode), are set to the default values as
in new SurfacePattern
(). The resulting pattern can be
queried with Context.getSource
() so that these
attributes can be modified if desired, (eg. to create a
repeating pattern with Pattern.setExtend
()).
Prototypes
Parameters
Name | Description |
---|---|
x | User-space X coordinate for surface origin |
y | User-space Y coordinate for surface origin |
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 |