FMX.Objects.TSelection.PointInObjectLocal

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

function PointInObjectLocal(X, Y: Single): Boolean; override;

C++

virtual bool __fastcall PointInObjectLocal(float X, float Y);

Properties

Type Visibility Source Unit Parent
function public
FMX.Objects.pas
FMX.Objects.hpp
FMX.Objects TSelection

Description

Checks whether the point specified by local coordinates belongs to the control area.

FMX.Objects.TSelection.PointInObjectLocal inherits from FMX.Controls.TControl.PointInObjectLocal. All content below this line refers to FMX.Controls.TControl.PointInObjectLocal.

Checks whether the point specified by local coordinates belongs to the control area.

PointInObjectLocal returns True if the specified point belongs to the control area, and False otherwise.

The X and Y are the local coordinates of the point to be checked (compare with PointInObject):

  • X is the X coordinate.
  • Y is the Y coordinate.

The local coordinates of the upper-left corner of the control rectangle are (0,0), and the local coordinates of the lower-right corner are (Width, Height).

The points of the control boundary specified by BoundsRect belong to the control and PointInObjectLocal returns True for them.

If a control supports the Touch property, the control area can be optionally inflated on the values specified by the TouchTargetExpansion property. TouchTargetExpansion keeps four optional parameters representing the expansion for the four sides of the control in pixels (Bottom, Left, Right, and Top).

The dclasses can change the 'control area' definition. For example:

  • The FMX.Objects.TSelection class extends the 'control area' definition relative to BoundsRect. FMX.Objects.TSelection.PointInObjectLocal also returns True if the point belongs to any of small rectangles of the four grip controls used to manage the selection shape. The rectangles of the grip controls are rectangles surrounding the four corners of the TSelection rectangle. The Width and Height of these rectangles are equal to 2 * GripSize. For example, the grip control's rectangle of the upper-right corner UR_Corner of TSelection is defined by the following corners:
    • (UR_Corner.Top - GripSize, UR_Corner.Right - GripSize)--upper-left corner of the grip.
    • (UR_Corner.Top + GripSize, UR_Corner.Right + GripSize)--lower-right corner of the grip.

See Also