TiObjectCanvas.GetDisplayXToPixelsX

TiObjectCanvas

Used to convert an X-coordinate display value to an X-coordinate pixel value on the Object Canvas.

function GetDisplayXToPixelX(Value : Double) : Integer;

Description

Call the GetDisplayXToPixelX method to convert a Cartesian X-coordinate display value to an upper left-hand corner 0,0 origin X-coordinate pixel value on the Object Canvas. Since the Object canvas uses the Cartesian coordinate system (where the default 0,0 origin is in the center of the component), this function provides a way to convert between the upper-left-hand corner 0,0 pixel origin that the Windows API and QT API use and the center 0,0 origin of the Object Canvas Component.

Note: Basically this function converts the coordinate Cartesian Coordinate system of the component to pixel values that you would get from other functions in windows. If you need to convert a Y coordinate display value, see GetDisplayYToPixelsY.

Example

Delphi

Value := iComponent.GetDisplayXToPixelX(25.2);

C++ Builder

Value = iComponent->GetDisplayXToPixelX(25.2);

Contents | Index | Previous | Next