Developer

API Reference

IWidget_IntersectOpaque()

Brew Release
Brew MP 1.0.2
See Also
Description
This function retrieves the intersection of the given rectangle with the largest opaque region of a given widget. To illustrate, a widget that defines the plane upon which other widgets will be rendered (akin to a window on a desktop GUI) would likely provide an opaque background (i.e. when in the foreground, you would not be able to see interface objects laying behind). Another object might want to calculate to what degree this widget would be obscuring the object's display, and so would pass its bounding rectangle and a pointer to the target widget to IWidget_IntersectOpaque(). The widget will then determine its largest opaque region, taking into account any non-opaque portions (shadows, blends, transparent decorators, etc), then -- if the rectangles intersect -- calculate the intersection of the source rectangle and the target's opaque rectangle.
   
   +--------------------+
   |                    |
   |       source     -----------+ result of IWidget_IntersectOpaque()
   |     rectangle   |  |
   |                 V  |
   |            +---------------------------------------+
   |            |/ / / /|                               |
   |            | / / / |       target widget           |
   |            |/ / / /|                               |
   +------------|-------                                |
                |                                       |
                +---------------------------------------+


If the rectangle's intersect, IWidget_IntersectOpaque() will return TRUE, otherwise the function returns FALSE and the resultant rectangle is empty.
Parameters
  • pif
    []:
    [in] Pointer to the IWidget object to be used as a target for intersection.
  • prcOut
    []:
    [out] Pointer to an AEERect, into which the function will return the intersection of the widget's largest opaque rectangle and the rectangle passed to the function in 'prcIn'.
  • prcIn
    []:
    [in] Pointer to the AEERect that is to be intersected with the widget's largest opaque rectangle. This rectangle should be expressed in the target widget's coordinate system, with 0,0 being the top-left corner of the widget.
Interface
Prototype
   boolean IWidget_IntersectOpaque(IWidget *pif, AEERect *prcOut, const AEERect *prcIn);
   
Return
TRUE : If 'prcIn' intersects with the widget's largest opaque rectangle. FALSE : If 'prcIn' does not intersect.
The intersection of 'prcIn' and the widget's largest opaque rectangle will be returned in 'prcOut'.
Side Effect
None
Comment
By definition, the rectangle returned in 'prcOut' can be no larger than the rectangle passed to the function in 'prcIn'.
  • Follow