Skip to main content

TcxGdiBasedCanvas.ViewportOrg Property

Specifies the viewport origin for the GDI-based canvas.

Declaration

property ViewportOrg: TPoint read; write;

Property Value

Type
TPoint

Remarks

The viewport and window origin positions define the relationship between the device and logical coordinate spaces for the canvas. Use the ViewportOrg property to specify which point of the device context corresponds to the window coordinate space origin (0, 0). This operation shifts coordinate axes horizontally and/or vertically and scrolls the canvas accordingly.

You can use the BaseOrigin and DCOrigin properties to obtain the initial and current positions of the device context origin.

Note

Since both the device and logical coordinate spaces are relative to each other, do not use the ViewportOrg and WindowOrg properties simultaneously to scroll the canvas.

See Also