GdipSetPathMarkerfunction
Designates the last point in this path as a marker point.
Syntax
FUNCTION GdipSetPathMarker (BYVAL path AS GpPath PTR) AS GpStatus
Parameters
| Name | Description | |
|---|---|---|
path | [in] Pointer to the GraphicsPath object. |
Description
Designates the last point in this path as a marker point.
Example
' ======================================================================================== ' This example sets a marker after adding a rectangle, then adds an ellipse. ' ======================================================================================== SUB Example_SetPathMarker (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 first shape hStatus = GdipAddPathRectangle(path, 50, 50, 100, 60)
' // Set marker after rectangle hStatus = GdipSetPathMarker(path)
' // Add second shape hStatus = GdipAddPathEllipse(path, 200, 50, 100, 60)
' // Draw entire path DIM pen AS GpPen PTR hStatus = GdipCreatePen1(ARGB_DARKBLUE, 2, UnitWorld, @pen) 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:2000
- Documented in Graphics/GdiPlus Flat Api/GdiPlusGraphicsPath.md
- Topic: GraphicsPath Functions