Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

TcxGdiBasedCanvas.ViewportOrg Property

Specifies the viewport origin for the GDI-based canvas.

#Declaration

Delphi
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