Help Center

CGpGraphicsPath.GetLastPointmethod

Gets the ending point of the last figure in this path.

GraphicsmethodCGpPath.incdocumented

Syntax

FUNCTION GetLastPoint (BYVAL lastPoint AS GpPointF PTR) AS GpStatus

Parameters

NameDescription
lastPointPointer to a GpPointF sreucture that receives the last point.

Return value

If the function succeeds, it returns StatusOk, which is an element of the GpStatus enumeration.

If the function fails, it returns one of the other elements of the GpStatus enumeration.

Description

Gets the ending point of the last figure in this path.

Example

' ======================================================================================== ' This example retrieves the last point from a GraphicsPath. ' ======================================================================================== SUB Example_GetLastPoint (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 and add a rectangle DIM path AS CGpGraphicsPath path.AddRectangle(100, 80, 150, 100)

' // Retrieve last point DIM lastPoint AS GpPointF = path.GetLastPoint

' // Display result AfxMsg "Last point: (" & WSTR(lastPoint.x) & ", " & WSTR(lastPoint.y) & ")"

' // 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:154
  • Documented in Graphics/GdiPlus Classes/CGpGraphics Classes.md
  • Topic: CGpGraphics Class