Close

Relief for ODA Team in Ukraine

Learn more
ODA Kernel SDK
CGlyph2dGeometry::ClipToRegion Method
Syntax
C++
double ClipToRegion(double dSize, bool bMoveCenterToZero = true, bool bUpdateExtents = true);

Clips the glyph geometry object to a region specified with its size. 

 

Parameters
Description
dSize
[in] A clip region size.
bMoveCenterToZero
[in] A flag that determines whether the center is moved to the origin.
bUpdateExtents
[in] A flag that determines whether extents should be updated before clipping.

Returns the scale value to be implemented for clipped geometry.

The values of the dSize parameter determines the scale. If bMoveCenterToZero is true, the clipped rectangle is centered around the origin of the coordinate system. Otherwise the mininum point of the region is moved to the coordinate system origin. The returned scale value also depends on the bMoveCenterToZero flag value. If the flag is false, the scale value is determined as the result of dividing dSize by the maximum length of the region's side. If the flag is true, the scale value is equal to the result of dSize multiplicated by 2 divided by the maximum length of the region's side.

Copyright © 2002-2022. Open Design Alliance All rights reserved.