CGpRegion.IsInfinitemethod
Determines whether this region is infinite.
Syntax
FUNCTION IsInfinite (BYVAL pGraphics AS CGpGraphics PTR) AS BOOLEAN
Parameters
| Name | Description | |
|---|---|---|
pGraphics | Pointer to a Graphics object that contains the world and page transformations required to calculate the device coordinates of this region. |
Return value
If this region is infinite, this method returns TRUE; otherwise, it returns FALSE.
Description
Determines whether this region is infinite.
Example
' ======================================================================================== ' The following example uses the default constructor to create an infinite region. Then the ' code tests the region to determine if it is infinite and performs a task based on the result. ' ======================================================================================== SUB Example_IsInfinite (BYVAL hdc AS HDC)
' // Create a graphics object from the window device context DIM graphics AS CGpGraphics = hdc ' // Get the DPI scaling ratios DIM rxRatio AS SINGLE = graphics.GetDpiX / 96 DIM ryRatio AS SINGLE = graphics.GetDpiY / 96
graphics.SetPageUnit(UnitInch) DIM solidBrush AS CGpSolidBrush = ARGB_RED
' // The default constructor creates an infinite region. DIM region AS CGpRegion
IF region.IsInfinite(@graphics) THEN
' // The region is infinite. Perform some task.
PRINT "Region is infinite"
ELSE
' // Perform a different task.
END IF
graphics.FillRegion(@solidBrush, @region)
END SUB ' ========================================================================================
Reference
- Include file
CGpRegion.inc - Defined in AfxNova/CGpRegion.inc:304
- Documented in Graphics/GdiPlus Classes/CGpRegion Class.md
- Topic: CGpRegion Class