In This Topic ▼

Container Scaling Values

The coordinates for defining and positioning objects within containers are translated to device coordinates only when the objects are displayed. Each object is defined and positioned relative to its container. The container sets the frame of reference.

At the time of display, the coordinates are modified using scalar properties (scaling factors), and offset properties. Thus, the scaling factors translate the internal values to the coordinate system of the display space, and the offsets position the scaled object in the display space.

Each time the image is zoomed or scrolled, update the scaling factors and offsets of the container, and redraw the objects in the window that owns the container.

✎ NOTE

Scaling factors and offsets can be applied to objects other than the container, but that is not necessary for matching the objects to the displayed image. The scaling factors and offsets of a container apply to all objects within the container.

Scaling factors:

LContainer::GetScalar

LContainer::SetScalar

Offsets:

LContainer::GetOffset

LContainer::SetOffset

After setting the scalar values to some value, the mouse movement will be snapped to the grid that represents the scaling factor.

Help Version 22.0.2022.12.7
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 LEAD Technologies, Inc. All Rights Reserved.

LEADTOOLS Container and Automation C++ Class Library Help
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 LEAD Technologies, Inc. All Rights Reserved.