Help Center

GdipDeletePathfunction

Deletes the specified **GraphicsPath** object.

Graphicsfunctiondocumented

Syntax

FUNCTION GdipDeletePath (BYVAL path AS GpPath PTR) AS GpStatus

Parameters

NameDescription
path[in] Pointer to the GraphicsPath object.

Description

Deletes the specified GraphicsPath object.

Example

' ======================================================================================== ' This example creates and deletes a GraphicsPath using GdipDeletePath. ' ======================================================================================== SUB Example_DeletePath (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 DIM path AS GpPath PTR hStatus = GdipCreatePath(FillModeAlternate, @path)

' // Add a shape hStatus = GdipAddPathEllipse(path, 100, 80, 150, 100)

' // Draw path DIM pen AS GpPen PTR hStatus = GdipCreatePen1(ARGB_NAVY, 2, UnitWorld, @pen) hStatus = GdipDrawPath(graphics, pen, path)

' // Cleanup IF pen THEN GdipDeleteBrush(pen) IF path THEN GdipDeletePath(path) ' <-- Frees the path object IF graphics THEN GdipDeleteGraphics(graphics)

END SUB ' ========================================================================================

Reference

  • Defined in AfxNova/AfxGdiPlus.bi:1988
  • Documented in Graphics/GdiPlus Flat Api/GdiPlusGraphicsPath.md
  • Topic: GraphicsPath Functions