CGpGraphicsPath.GetFillModemethod
Gets the fill mode of this path.
Syntax
FUNCTION GetFillMode () AS FillMode
Return value
This method returns an element of the FillMode enumeration.
Description
Gets the fill mode of this path.
Example
' ======================================================================================== ' This example retrieves the fill mode of a GraphicsPath. ' ======================================================================================== SUB Example_GetFillMode (BYVAL hdc AS HDC)
' // Create a graphics object from the window device context DIM graphics AS CGpGraphics = hdc ' // Set the scale transform graphics.ScaleTransformForDpi
' // Create path with alternate fill mode and add an ellipse DIM path AS CGpGraphicsPath = CGpGraphicsPath(FillModeAlternate) path.AddEllipse(100, 70, 200, 100)
' // Retrieve fill mode DIM fillMode AS LONG = path.GetFillMode()
' Display result SELECT CASE fillMode CASE FillModeAlternate
AfxMsg "Fill mode is: Alternate"
CASE FillModeWinding
AfxMsg "Fill mode is: Winding"
CASE ELSE
AfxMsg "Unknown fill mode: " & WSTR(fillMode)
END SELECT
' // Create pen and draw path DIM pen AS CGpPen = CGpPen(ARGB_ORANGE, 2.0, UnitWorld) graphics.DrawPath(@pen, @path)
END SUB ' ========================================================================================
Reference
- Include file
CGpPath.inc - Defined in AfxNova/CGpPath.inc:77
- Documented in Graphics/GdiPlus Classes/CGpGraphics Classes.md
- Topic: CGpGraphics Class