Class: M_Shape

The M_Shape class represents a visible shape in Moho. A shape can either be a fill, an outline, or both.

Member Functions


int CountEdges()

Returns the number of edges that make up this shape.

Return value (int): the number of edges that make up this shape
void GetEdge(edgeID, curveID, segID)

Returns information about a specific edge. Given an edge on the shape, this function returns the curve id and segment id of the actual curve in the underlying mesh.

Return value: none edgeID (int): the id number of the edge (0 for the first edge in a shape) curveID (int): curve id segID (int): which segment of the curve is this edge
void CopyStyleProperties(fromShape)

Copies the style properties from another shape.

Return value: none fromShape (M_Shape): shape to copy from
void RemoveStyles()

Removes all inherited styles from the shape.

Return value: none

Member Variables


fSelected (bool)

True if the shape is selected, otherwise false.


fName (LM_String)

Name of the shape.


fHasFill (bool)

True if the shape is filled, otherwise false.


fHasOutline (bool)

True if the shape has an outline, otherwise false.


fFillAllowed (bool)

True if a fill is allowed, whether the shape actually has a fill or not.


fMyStyle (M_Style)

The shape's style properties. The style defines a shape's fill color, line width, etc.