Region object interface. More...
#include <SRender-i.h>
Public Member Functions | |
long | AddRef () PURE |
Increments the reference count for the object. | |
long | Release () PURE |
Decrements the reference count for the object. | |
void | OnFinalRelease () PURE |
Called when the final release of the object occurs. | |
IRenderFactory * | GetRenderFactory () SCONST PURE |
Obtains the render factory that created this rendering object. | |
OBJTYPE | ObjectType () SCONST PURE |
Queries the type of the rendering object. | |
void | CombineRect (LPCRECT lprect, int nCombineMode) PURE |
Combines a rectangle with the region. | |
void | CombineRgn (const IRegionS *pRgnSrc, int nCombineMode) PURE |
Combines another region with the current region. | |
void | CombineRoundRect (LPCRECT lprect, POINT ptConner, int nCombineMode) PURE |
Combines a rounded rectangle with the region. | |
void | CombineEllipse (LPCRECT lprect, int nCombineMode) PURE |
Combines an ellipse with the region. | |
void | CombinePolygon (const POINT *pts, int count, int nPolygonMode, int nCombineMode) PURE |
Combines a polygon with the region. | |
BOOL | PtInRegion (POINT pt) SCONST PURE |
Checks if a point is inside the region. | |
BOOL | RectInRegion (LPCRECT lprect) SCONST PURE |
Checks if a rectangle intersects with the region. | |
void | GetRgnBox (LPRECT lprect) SCONST PURE |
Retrieves the bounding rectangle of the region. | |
BOOL | IsEmpty () SCONST PURE |
Checks if the region is empty. | |
void | Offset (POINT pt) PURE |
Offsets the region by a specified amount. | |
void | Clear () PURE |
Clears the region. | |
![]() | |
long | AddRef () PURE |
Increments the reference count for the object. | |
long | Release () PURE |
Decrements the reference count for the object. | |
void | OnFinalRelease () PURE |
Called when the final release of the object occurs. | |
IRenderFactory * | GetRenderFactory () SCONST PURE |
Obtains the render factory that created this rendering object. | |
OBJTYPE | ObjectType () SCONST PURE |
Queries the type of the rendering object. | |
![]() | |
long | AddRef () PURE |
Increases the reference count. | |
long | Release () PURE |
Decreases the reference count. | |
void | OnFinalRelease () PURE |
Called when the reference count reaches zero and the object is about to be released. | |
Region object interface.
This interface represents a region used for clipping and other rendering operations. It inherits from the IRenderObj interface and provides methods to manage the region's properties and lifecycle, including combining shapes, checking containment, and offsetting the region.
Definition at line 791 of file SRender-i.h.
long IRegionS::AddRef | ( | ) |
Increments the reference count for the object.
This method is used to increase the reference count of the object, ensuring it remains valid as long as references exist.
void IRegionS::Clear | ( | ) |
Clears the region.
Empties the region, making it contain no area.
void IRegionS::CombineEllipse | ( | LPCRECT | lprect, |
int | nCombineMode ) |
Combines an ellipse with the region.
Combines the specified ellipse with the current region using the specified mode.
lprect | Pointer to the rectangle defining the bounds of the ellipse. |
nCombineMode | Mode for combining the ellipse with the region. |
void IRegionS::CombinePolygon | ( | const POINT * | pts, |
int | count, | ||
int | nPolygonMode, | ||
int | nCombineMode ) |
Combines a polygon with the region.
Combines the specified polygon with the current region using the specified mode.
pts | Array of points defining the polygon. |
count | Number of points in the polygon. |
nPolygonMode | Mode for filling the polygon. |
nCombineMode | Mode for combining the polygon with the region. |
void IRegionS::CombineRect | ( | LPCRECT | lprect, |
int | nCombineMode ) |
Combines a rectangle with the region.
Combines the specified rectangle with the current region using the specified mode.
lprect | Pointer to the rectangle to combine. |
nCombineMode | Mode for combining the rectangle with the region. |
void IRegionS::CombineRgn | ( | const IRegionS * | pRgnSrc, |
int | nCombineMode ) |
Combines another region with the current region.
Combines the specified region with the current region using the specified mode.
pRgnSrc | Pointer to the region to combine. |
nCombineMode | Mode for combining the regions. |
void IRegionS::CombineRoundRect | ( | LPCRECT | lprect, |
POINT | ptConner, | ||
int | nCombineMode ) |
Combines a rounded rectangle with the region.
Combines the specified rounded rectangle with the current region using the specified mode.
lprect | Pointer to the rectangle defining the bounds of the rounded rectangle. |
ptConner | Point defining the corner radii of the rounded rectangle. |
nCombineMode | Mode for combining the rounded rectangle with the region. |
IRenderFactory * IRegionS::GetRenderFactory | ( | ) |
Obtains the render factory that created this rendering object.
Retrieves a pointer to the render factory responsible for creating this object.
void IRegionS::GetRgnBox | ( | LPRECT | lprect | ) |
Retrieves the bounding rectangle of the region.
Gets the smallest rectangle that completely encloses the region.
lprect | Pointer to the rectangle to receive the bounds. |
BOOL IRegionS::IsEmpty | ( | ) |
Checks if the region is empty.
Determines whether the region contains no area.
OBJTYPE IRegionS::ObjectType | ( | ) |
Queries the type of the rendering object.
Returns an enumeration value representing the type of the object (e.g., brush, pen, bitmap).
void IRegionS::Offset | ( | POINT | pt | ) |
Offsets the region by a specified amount.
Moves the region by the specified offset.
pt | Offset to apply to the region. |
void IRegionS::OnFinalRelease | ( | ) |
Called when the final release of the object occurs.
This method is invoked when the reference count reaches zero, allowing for any necessary cleanup before the object is destroyed.
BOOL IRegionS::PtInRegion | ( | POINT | pt | ) |
Checks if a point is inside the region.
Determines whether the specified point lies within the region.
pt | Point to check. |
BOOL IRegionS::RectInRegion | ( | LPCRECT | lprect | ) |
Checks if a rectangle intersects with the region.
Determines whether the specified rectangle intersects with the region.
lprect | Pointer to the rectangle to check. |
long IRegionS::Release | ( | ) |
Decrements the reference count for the object.
This method decreases the reference count of the object. When the count reaches zero, the object may be released.