GdipGetPathFillModefunction
Sets the fill mode of this path.
Syntax
FUNCTION GdipGetPathFillMode (BYVAL path AS GpPath PTR, BYVAL fillMode AS GpFillMode PTR) AS GpStatus
Parameters
| Name | Description | |
|---|---|---|
path | [in] Pointer to the GraphicsPath object. | |
fillMode | [out] Pointer to a variable that receives an element of the FillMode enumeration that specifies how to fill areas when the path intersects itself. |
Description
Sets the fill mode of this path.
Example
' ======================================================================================== ' This example retrieves the fill mode of a GraphicsPath using GdipGetPathFillMode. ' ======================================================================================== SUB Example_GetFillMode (BYVAL hdc AS HDC)
DIM hStatus AS LONG
' // Create a graphics object from the device context DIM graphics AS GpGraphics PTR hStatus = GdipCreateFromHDC(hdc, @graphics)
' // Get the DPI scaling ratios DIM dpiX AS SINGLE hStatus = GdipGetDpiX(graphics, @dpiX) DIM rxRatio AS SINGLE = dpiX / 96 DIM dpiY AS SINGLE hStatus = GdipGetDpiY(graphics, @dpiY) Dim ryRatio AS SINGLE = dpiY / 96 ' // Set the scale transform hStatus = GdipScaleWorldTransform(graphics, rxRatio, ryRatio, MatrixOrderPrepend)
' // Create GraphicsPath with alternate fill mode DIM path AS GpPath PTR hStatus = GdipCreatePath(FillModeAlternate, @path)
' // Add a shape hStatus = GdipAddPathEllipse(path, 100, 70, 200, 100)
' // Retrieve fill mode DIM fillMode AS LONG hStatus = GdipGetPathFillMode(path, @fillMode)
' // 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 DIM pen AS GpPen PTR hStatus = GdipCreatePen1(ARGB_ORANGE, 2, UnitWorld, @pen)
' // Draw the path hStatus = GdipDrawPath(graphics, pen, path)
' // Cleanup IF pen THEN GdipDeleteBrush(pen) IF path THEN GdipDeletePath(path) IF graphics THEN GdipDeleteGraphics(graphics)
END SUB ' ========================================================================================
Reference
- Defined in AfxNova/AfxGdiPlus.bi:1994
- Documented in Graphics/GdiPlus Flat Api/GdiPlusGraphicsPath.md
- Topic: GraphicsPath Functions