There are three levels from which entity color, layer, and linetype values can be set: drawable level, subentity level, and subprimitive level. Other traits can be set from only one or two of the levels:
-
Drawable Level The implementation of
subSetAttributes() specifies the default traits for the primitives used to display the drawable. For most entities, the entire object is rendered using the entity's current properties: linetype, color, layer, and so on.
-
Subentity Level You can specify specific traits to be used for specific parts of the drawable during the
subWorldDraw() or
subViewportDraw() implementation. You can use the
AcGiSubEntityTraits interface to override traits that were specified in the
subSetAttributes() call. Once a value for a trait is set it is used for all subsequent primitives until the end of the method or until a new value is specified.
Note: In this section, the term
subentity is used differently than in the
Entities section where the term refers to specific geometric pieces of an entity. In this section, subentity is not a piece of an entity; it is just a level at which trait values can be set and changed.
-
Subprimitive Level The mesh and shell primitive functions have optional parameters that let you specify a rich set of traits on a per-edge and per-face basis. (See the code samples in
Primitives.) For any trait, this mechanism requires that you set values for all of the edges or faces, or for none of them. You set only the traits you want. For example, you can set the colors of the edges of a shell or mesh without having to set layers or linetypes, but you must specify a color for every edge. In addition to mesh and shell subprimitive traits, there is a version of the text primitive function that has a text style parameter. Text style can be set only at the subprimitive (per-text primitive) level. Subprimitive trait values supersede values of the corresponding traits set at the subentity and drawable levels.