Help Center

FUNCTIONfunction

Graphicsfunctiondoc-orphan
No implementation located. This member is documented, but the source scan found no matching declaration. It is likely declared in a header this scan does not resolve, or provided by a macro.

Syntax

FUNCTION FUNCTION GdipResetPath (BYVAL path AS GpPath PTR) AS GpStatus
Also documented as GdipResetPath — one description covers them all.

Parameters

NameDescription
path[in] Pointer to the GraphicsPath object.

Description

Empties the path and sets the fill mode to FillModeAlternate.

Example

' ======================================================================================== ' This example adds shapes to a path, resets it, and adds a new shape. ' ======================================================================================== SUB Example_ResetPath (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 initial shape hStatus = GdipAddPathRectangle(path, 100, 80, 150, 100)

' // Reset the path hStatus = GdipResetPath(path)

' // Add new shape after reset hStatus = GdipAddPathEllipse(path, 120, 100, 100, 60)

' // Create pen DIM pen AS GpPen PTR hStatus = GdipCreatePen1(ARGB_DARKSLATEBLUE, 2, UnitWorld, @pen)

' // Draw 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