HC_Define_Named_Style

void HC_Define_Named_Style(char const *style_name, char const *source_segment)
void HC_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.

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.

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.

HC_Style_Segment, HC_Named_Style_Segment, HC_UnDefine_Named_Style, HC_Show_Named_Style

Parameters

style_name: Name of the custom style.

source_segment: Name of the style source.