[Overview][Types][Classes][Procedures and functions][Index] |
Determines whether the coordinates for the specified Point are within the area for the shaped control.
Source position: extctrls.pp line 296
public function TCustomShape.PtInShape( |
const P: TPoint |
):Boolean; |
P |
|
TPoint instance with the horizontal (X) and vertical (Y) coordinates tested in the method. |
Returns True if the specified coordinates are within the interior of the shape.
PtInShape uses a temporary TBitmap instance to determine whether the coordinates in P are within the interior of the shaped control. The Bitmap contains a monochrome variant of the filled shape where the pixels inside the shape have the color clBlack. Pixels outside of the filled interior area have the mask color for the monochrome bitmap.
The return value is True if the pixel located at the X and Y coordinates in P has the color clBlack. False indicates that the parent control (or a partially obstructed sibling control) was the target under the specified mouse position.
PtInShape is used in the Click method to determine whether an assigned OnShapeClick event handler is signalled for the mouse position on the control. It is also called when CMShapeHitTest handles a TCMHittest message received for the control design surface.
Added in LCL version 4.0.
|
Performs actions needed when a mouse click event occurs on the shaped control. |
|
|
Event handler signalled for a mouse click within the shaped control. |
|
|
Handles a CM_MASKHITTEST message for the control. |
|
|
Implements a FCL-compatible reader/writer for a Bitmap image. |
|
Version 4.0 | Generated 2025-05-03 | Home |