Method Cairo.Context()->set_source_surface()
- Method
set_source_surface
void
set_source_surface(Surface
surface
,float
|int
x
,float
|int
y
)- Description
This is a convenience function for creating a pattern from surface and setting it as the source with set_source().
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
Pattern->create()
. The resulting pattern can be queried with get_source() so that these attributes can be modified if desired, (eg. to create a repeating pattern with Pattern->set_extend()).- Parameter
surface
a surface to be used to set the source pattern
- Parameter
x
User-space X coordinate for surface origin
- Parameter
y
User-space Y coordinate for surface origin