Unit 'intuition' Package
[Overview][Constants][Types][Procedures and functions][Variables][Index] [#amunits]

PointInImage

Tests whether an image "contains" a point.

Declaration

Source position: intuition.pas line 4144

function PointInImage(

  point: LongWord;

  image: pImage

):LongBool;

Arguments

point

  

Two words, X/Y packed into a LongInt, with high word containing X. This is what you get if you pass a Point structure (not a pointer!).

image

  

A pointer to a standard or custom Image data object. Note: If Image is nil, this function returns True.

Function result

Boolean result of the test. True is the point is inside the image, False otherwise.

Description

Tests whether a point is properly contained in an image. The intention of this is to provide custom gadgets a means to delegate "image mask" processing to the Image, where it belongs (superseding things like BOOLMASK). After all, a rounded rect image with a drop shadow knows more about what points are inside it than anybody else should.

For traditional Intuition Images, this routine checks if the point is in the Image box (LeftEdge/RightEdge/Width/Height).


Documentation generated on: 2021-07-30