Name
ccontext:GetCurrentPoint -- get current point
Synopsis
x, y = ccontext:GetCurrentPoint()
Function
Gets the current point of the current path, which is conceptually the final point reached by the path so far.

The current point is returned in the user-space coordinate system. If there is no defined current point or if the context is in an error status, x and y will both be set to 0.0. It is possible to check this in advance with ccontext:HasCurrentPoint().

Most path construction functions alter the current point. See the following for details on how they affect the current point: ccontext:NewPath(), ccontext:NewSubPath(), ccontext:AppendPath(), ccontext:ClosePath(), ccontext:MoveTo(), ccontext:LineTo(), ccontext:CurveTo(), ccontext:RelMoveTo(), ccontext:RelLineTo(), ccontext:RelCurveTo(), ccontext:Arc(), ccontext:ArcNegative(), ccontext:Rectangle(), ccontext:TextPath().

Some functions use and alter the current point but do not otherwise change current path: ccontext:ShowText().

Some functions unset the current path and as a result, current point: ccontext:Fill(), ccontext:Stroke().

Inputs
none

Results
x
return value for X coordinate of the current point
y
return value for Y coordinate of the current point

Show TOC