[Overview][Types][Classes][Procedures and functions][Index] Reference for unit 'ExtCtrls' (#lcl)

TCustomShape.UpdateMask

Updates the internal Monochrome bitmap used as a mask to detect mouse click events on the shaped control.

Declaration

Source position: extctrls.pp line 292

protected procedure TCustomShape.UpdateMask;

Description

UpdateMask ensures that the internal TBitmap instance used in the class is allocated and configured (when not already assigned). It is configured as a Monochrome image where pixels outside of the area for the Shape use the color clWhite. Pixels which are inside of (or on an edge) for the Shape use the color clBlack.

UpdateMask calls the DrawToCanvas method to draw the image for the shaped control on the canvas for the bitmap.

UpdateMask is called from the PtInShape method prior to checking where the mouse pointer was located when a click event occurred.

Version info

Added in LCL version 4.0.

See also

TCustomShape.DrawToCanvas

  

Draws the Shape for the control on the specified canvas.

TCustomShape.PtInShape

  

Determines whether the coordinates for the specified Point are within the area for the shaped control.

TCustomShape.Pen

  

The Pen used to draw lines on the shaped control.

TCanvas

  

Implements a drawing surface for a visual control or bitmap image.

TBitmap

  

Implements a FCL-compatible reader/writer for a Bitmap image.

TControl.Width

  

The horizontal size for the control.

TControl.Height

  

The vertical size for the control.


Version 4.0 Generated 2025-05-03 Home