Skip to main content
Pie
ra0

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

TcxCanvas.PathToRegion(Boolean) Method

Converts the selected GDI path into a region.

#Declaration

Delphi
function PathToRegion(AConsiderOrigin: Boolean = True): TcxRegion;

#Parameters

Name Type
AConsiderOrigin Boolean

#Returns

Type
TcxRegion

#Remarks

A GDI path is a complex, irregular shape formed by multiple draw calls enclosed between the BeginPath and EndPath procedure calls. A PathToRegion procedure call converts the selected path into a new region and discards the path from the device context of the underlying canvas. The region’s position automatically shifts according to the device context origin. You can pass False as the optional ConsiderOrigin parameter to avoid this behavior.

Note

A PathToRegion procedure call has no effect if the device context of the canvas has no selected GDI path.

See Also