The MohoView class is a script's interface to the Moho editing view.
Causes the view to refresh, but not perform a full redraw. Not used very often.
Return value: noneCauses the view to completely redraw the current scene. Moho scripts use this a lot after making changes to the contents of the document.
Return value: noneConverts a pixel location to a 2D vector location, given a specific transformation matrix. This is used to convert between mouse coordinates and 2D layer coordinates.
Return value (LM_Vector2): 2D vector point in a layer's coordinate system where (LM_Point): pixel location on the screen layerM (LM_Matrix): the transformation matrix for the layer in questionPicks a point near the given pixel location.
Return value (int): id of an M_Point object in the current vector layer where (LM_Point): pixel location on the screenPicks an edge near the given pixel location.
Return value: none where (LM_Point): pixel location on the screen curveID (int): id of an M_Curve object in the current vector layer, returned by this function segID (int): which segment on the curve was picked, returned by this functionPicks a shape near the given pixel location.
Return value (int): id of an M_Shape in the current vector layer where (LM_Point): pixel location on the screen noHigherThan (int): id of the highest shape to pick (to allow picking lower, hidden shapes), -1 to ignore this optionPicks a bone near the given pixel location.
Return value (int): id of the picked bone where (LM_Point): pixel location on the screen clickVec (LM_Vector2): vector location of the click layer (MohoLayer): the bone layer you wish to pick from exact (bool): true if only exact picks are accepted, false if the closest bone can be clicked even if not exactReturns a graphics object to use for custom drawing in the view.
Return value (XGraphics): a graphics drawing objectReset or zoom in on the view.
Return value: none mode (int): 0:zoom in on all the points in the layer, 1:zoom in on all the selected points in the layer, 2:zoom out to default viewReturn value: none where (LM_Point):
Return value: none where (LM_Point):
Return value: none where (LM_Point):
Return value: none where (LM_Point):
Return value: none where (LM_Point):
Return value: none where (LM_Point):
Return value: none where (LM_Point):
Return value: none where (LM_Point):
Return value: none where (LM_Point):
Return value: none where (LM_Point):
Return value: none where (LM_Point):
Return value: none where (LM_Point):
Draws a "preview" shape by evaluating the selected points in the current vector layer as a shape, and drawing it in a highlighted mode. This is used by the Create Shape tool to preview a shape before the user hits the spacebar to finalize the shape.
Return value: none