Surface.setDeviceOffset - multiple declarations
- Function Surface.setDeviceOffset
- Function Surface.setDeviceOffset
Function Surface.setDeviceOffset
Sets an offset
that is added to the device
coordinates determined
by the CTM when drawing to surface. One use case for this function
is when we want to create a Surface
that redirects drawing
for a portion of an onscreen surface to an offscreen surface
in a way that is completely invisible to the user of the cairo API.
Setting a transformation via Context.translate
() isn't sufficient
to do this, since functions like Context.deviceToUser
() will
expose the hidden offset
.
Prototypes
void setDeviceOffset(
double x_offset,
double y_offset
);
void setDeviceOffset(
Point!(double) offset
);
Note
the offset
affects drawing to the surface as well as using the
surface in a source pattern.
Parameters
Name | Description |
---|---|
x_offset | the offset in the X direction, in device units |
y_offset | the offset in the Y direction, in device units |
Function Surface.setDeviceOffset
Sets an offset
that is added to the device
coordinates determined
by the CTM when drawing to surface. One use case for this function
is when we want to create a Surface
that redirects drawing
for a portion of an onscreen surface to an offscreen surface
in a way that is completely invisible to the user of the cairo API.
Setting a transformation via Context.translate
() isn't sufficient
to do this, since functions like Context.deviceToUser
() will
expose the hidden offset
.
Prototypes
void setDeviceOffset(
double x_offset,
double y_offset
);
void setDeviceOffset(
Point!(double) offset
);
Note
the offset
affects drawing to the surface as well as using the
surface in a source pattern.
Parameters
Name | Description |
---|---|
x_offset | the offset in the X direction, in device units |
y_offset | the offset in the Y direction, in device units |
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 |