Class LM_Graphics

Version added: before 9.5
The LM_Graphics class is used for drawing in an LM_View. It lets you draw basic lines and shapes, and to convert between coordinate systems (the screen pixel space and the 3D coordinate system of Anime Studio layers). You typically would use an LM_Graphics object with a moho tool script to determine what object(s) the user clicks on and to draw extra tool elements like control handles.

Methods:

Name Returns Description Ver
AddLine void Add a line segment to the current enclosed shape < 9.5
ApplyMatrix void Prepend an arbitrary matrix to the current matrix transform < 9.5
BeginDraw void Call this function before starting any drawing commands < 9.5
BeginPicking void Call this function to begin testing whether the user has clicked on an object < 9.5
BeginShape void Begin drawing an enclosed shape < 9.5
Clear void Clear the drawing area < 9.5
CurrentScale real Returns the current scale of the drawing < 9.5
CurrentTransform LM_Matrix Returns the current matrix transformation < 9.5
DrawDiamondMarker void Added in version 9.5 9.5
DrawDiamondMarker void Added in version 9.5 9.5
DrawFatLine void Added in version 10 10.0
DrawFatLine2 void Added in version 11 11.0
DrawFatMarker void Draw a fat marker < 9.5
DrawLine void Draw a line between two pixels < 9.5
DrawMarker void Draw a marker (for example, the control points on Anime Studio curves) < 9.5
EndDraw void Call this function when you're finished with all drawing operations < 9.5
EndShape void End the current enclosed shape and draw it on the screen < 9.5
FillCircle void Draw a filled circle < 9.5
FillCirclePixelRadius void < 9.5
FillOval void Added in version 9.5 9.5
FloodFill bool < 9.5
FrameCircle void Draw a circle outline < 9.5
FrameCirclePixelRadius void < 9.5
FrameOval void Added in version 9.5 9.5
Height int32 Returns the height in pixels of the drawing area < 9.5
IsFullWhite bool Test whether a given pixel is 100% white < 9.5
LineTo void Draw a line from the current pen position to the given pixel < 9.5
LineTo void Draw a line from the current pen position to the given pixel < 9.5
MoveTo void Move the pen location to a given pixel < 9.5
MoveTo void Move the pen location to a given pixel < 9.5
Pick bool After drawing an object, call this function to see if it was clicked on by the user < 9.5
Pop void Pop the current matrix stack < 9.5
Push void Push the current matrix stack < 9.5
Rotate void Prepend a rotation to the current matrix transform < 9.5
Scale void Prepend a 2D scale to the current matrix transform < 9.5
ScreenToWorld void Converts a screen pixel location to 2D world coordinates < 9.5
ScreenToWorld void Converts a screen pixel location to 3D world coordinates < 9.5
SelectionRect void Draw a selection rectangle < 9.5
SetBezierTolerance void < 9.5
SetColor void Sets the drawing color for subsequent drawing operations < 9.5
SetColor void Sets the drawing color for subsequent drawing operations < 9.5
SetPenWidth void Sets the width in pixels for line drawing operations < 9.5
SetSmoothing void Turns on or off smoothing (antialaising) for drawing operations < 9.5
SetViewMode void Added in version 10 10.0
SetViewOffset void Added in version 10 10.0
SetViewPixelScaling void Added in version 10 10.0
SetViewRotation void Added in version 10 10.0
SetViewZoom void Added in version 10 10.0
Translate void Prepend a 2D translation to the current matrix transform < 9.5
ViewMode int32 Added in version 10 10.0
ViewOffset LM_Vector2 Added in version 10 10.0
ViewPixelScaling int32 Added in version 10 10.0
ViewRotation real Added in version 10 10.0
ViewZoom real Added in version 10 10.0
Width int32 Returns the width in pixels of the drawing area < 9.5
WorldToScreen bool Converts a 2D world position to a screen pixel location < 9.5
WorldToScreen bool Converts a 2D world position to a screen pixel location < 9.5