Define_Named_Style

Functions

void Define_Named_Style (char const *style_name, char const *source_segment)
 Defines a name that can be used to draw other segments in the style of the source. More...
 
void UnDefine_Named_Style (char const *style_name)
 Removes a named style definintion established by a previous call to Define_Named_Style. More...
 

Detailed Description

Function Documentation

◆ Define_Named_Style()

void Define_Named_Style ( char const *  style_name,
char const *  source_segment 
)

Defines a name that can be used to draw other segments in the style of the source.

Parameters
style_name- Name of the custom style.
source_segment- Name of the style source.

DETAILS

Define_Named_Style allows users to define a style name associated with the attributes in a given segment. This style name can then be used via Named_Style_Segment and Named_Style_Segment_By_Key to apply those associated attributes to a segment, or via Define_Highlight and Define_Geometry_Highlight to use those associated attributes as a highlight style. This means attributes set on the style source will affect the target segment. By convention, style segments contain no geometry or subsegments as these are not carried by the style anyway. Each segment can have at most one named style set on it at any time.

RESTRICTIONS

We advise against using options in your named style that can effect bounding like modelling matrices and mask transforms because they will result in unexpected behavior. We suggest you use attributes that do not effect boundings.

Additionally, any conditionals and callbacks set on named styles will result in unexpected or undesirable behavior.

See also
Style_Segment, Named_Style_Segment, UnDefine_Named_Style, Show_Named_Style

◆ UnDefine_Named_Style()

void UnDefine_Named_Style ( char const *  style_name)

Removes a named style definintion established by a previous call to Define_Named_Style.

Parameters
style_name- Name of the custom style.

DETAILS

No additional details. See Define_Named_Style()