CFx SDK Documentation  2020SP3
Public Types | Public Member Functions | Static Public Member Functions | List of all members
OdGiVisualStyle Class Referenceabstract

#include <GiVisualStyle.h>

Inheritance diagram for OdGiVisualStyle:
OdRxObject OdStaticRxObject< OdGiVisualStyle > OdGiVisualStyleDataContainer

Public Types

enum  Type {
  kFlat, kFlatWithEdges, kGouraud, kGouraudWithEdges,
  k2DWireframe, k3DWireframe, kHidden, kBasic,
  kRealistic, kConceptual, kCustom, kDim,
  kBrighten, kThicken, kLinePattern, kFacePattern,
  kColorChange, kFaceOnly, kEdgeOnly, kDisplayOnly,
  kJitterOff, kOverhangOff, kEdgeColorOff, kShadesOfGray,
  kSketchy, kXRay, kShadedWithEdges, kShaded,
  kByViewport, kByLayer, kByBlock, kEmptyStyle
}
 
typedef OdGiVisualStyleProperties::Property Property
 
typedef OdGiVisualStyleOperations::Operation Operation
 

Public Member Functions

 ODRX_DECLARE_MEMBERS (OdGiVisualStyle)
 
OdGiVisualStyleoperator= (const OdGiVisualStyle &visualStyle)
 
bool operator== (const OdGiVisualStyle &visualStyle) const
 
virtual OdGiFaceStylefaceStyle (void)=0
 
virtual OdGiEdgeStyleedgeStyle (void)=0
 
virtual OdGiDisplayStyledisplayStyle (void)=0
 
virtual const OdGiFaceStylefaceStyle (void) const =0
 
virtual const OdGiEdgeStyleedgeStyle (void) const =0
 
virtual const OdGiDisplayStyledisplayStyle (void) const =0
 
virtual void setFaceStyle (const OdGiFaceStyle &style)=0
 
virtual void setEdgeStyle (const OdGiEdgeStyle &style)=0
 
virtual void setDisplayStyle (const OdGiDisplayStyle &style)=0
 
void configureForType (Type type)
 
virtual bool setType (Type type)=0
 
virtual Type type () const =0
 
virtual bool setTrait (Property prop, Operation op)=0
 
virtual bool setTrait (Property prop, const OdGiVariant *pVal, Operation op=OdGiVisualStyleOperations::kSet)=0
 
virtual bool setTrait (Property prop, OdInt32 nVal, Operation op=OdGiVisualStyleOperations::kSet)
 
virtual bool setTrait (Property prop, bool bVal, Operation op=OdGiVisualStyleOperations::kSet)
 
virtual bool setTrait (Property prop, double dVal, Operation op=OdGiVisualStyleOperations::kSet)
 
virtual bool setTrait (Property prop, double red, double green, double blue, Operation op=OdGiVisualStyleOperations::kSet)
 
virtual bool setTrait (Property prop, const OdCmColorBase &pColor, Operation op=OdGiVisualStyleOperations::kSet)
 
virtual bool setTrait (Property prop, const OdCmEntityColor &pColor, Operation op=OdGiVisualStyleOperations::kSet)
 
virtual bool setTrait (Property prop, const OdString &pStr, Operation op=OdGiVisualStyleOperations::kSet)
 
virtual OdGiVariantPtr trait (Property prop, Operation *pOp=NULL) const =0
 
virtual Operation operation (Property prop) const =0
 
virtual bool setTraitFlag (Property flagProp, OdUInt32 flagVal, bool bEnable=true)
 
virtual bool traitFlag (Property flagProp, OdUInt32 flagVal) const
 
- Public Member Functions inherited from OdRxObject
 ODRX_HEAP_OPERATORS ()
 
 OdRxObject ()
 
virtual ~OdRxObject ()
 
virtual OdRxObjectqueryX (const OdRxClass *pClass) const
 
virtual OdRxObjectx (const OdRxClass *pClass) const
 
virtual OdRxClassisA () const
 
virtual void addRef ()=0
 
virtual void release ()=0
 
virtual long numRefs () const
 
bool isKindOf (const OdRxClass *pClass) const
 
virtual OdRxObjectPtr clone () const
 
virtual void copyFrom (const OdRxObject *pSource)
 
virtual OdRx::Ordering comparedTo (const OdRxObject *pOther) const
 
virtual bool isEqualTo (const OdRxObject *pOther) const
 

Static Public Member Functions

static OdGiVariant::VariantType propertyType (Property prop)
 
- Static Public Member Functions inherited from OdRxObject
static OdRxObjectPtr cast (const OdRxObject *pointer)
 
static OdRxClassdesc ()
 

Detailed Description

This class defines a collection of visual properties that can be applied to graphical entities.

Corresponding C++ library: TD_Gi <group OdGi_Classes>

Definition at line 995 of file GiVisualStyle.h.

Member Typedef Documentation

◆ Operation

Definition at line 1112 of file GiVisualStyle.h.

◆ Property

Definition at line 1111 of file GiVisualStyle.h.

Member Enumeration Documentation

◆ Type

Describes the type of visual style.

Enumerator
kFlat 
kFlatWithEdges 
kGouraud 
kGouraudWithEdges 
k2DWireframe 
k3DWireframe 
kHidden 
kBasic 
kRealistic 
kConceptual 
kCustom 
kDim 
kBrighten 
kThicken 
kLinePattern 
kFacePattern 
kColorChange 
kFaceOnly 
kEdgeOnly 
kDisplayOnly 
kJitterOff 
kOverhangOff 
kEdgeColorOff 
kShadesOfGray 
kSketchy 
kXRay 
kShadedWithEdges 
kShaded 
kByViewport 
kByLayer 
kByBlock 
kEmptyStyle 

Definition at line 1003 of file GiVisualStyle.h.

Member Function Documentation

◆ configureForType()

void OdGiVisualStyle::configureForType ( Type  type)

Sets up all properties of this visual style to values predefined for the specified visual style type.

Parameters
type[in] Visual style type.
Remarks
Throws an exception if invalid type of configuration is specified.

◆ displayStyle() [1/2]

virtual const OdGiDisplayStyle& OdGiVisualStyle::displayStyle ( void  ) const
pure virtual

Returns a reference to OdGiDisplayStyle of this visual style.

Implemented in OdGiVisualStyleDataContainer.

◆ displayStyle() [2/2]

virtual OdGiDisplayStyle& OdGiVisualStyle::displayStyle ( void  )
pure virtual

Returns a reference to OdGiDisplayStyle of this visual style.

Implemented in OdGiVisualStyleDataContainer, and OdGiVisualStyleDataContainer.

◆ edgeStyle() [1/2]

virtual const OdGiEdgeStyle& OdGiVisualStyle::edgeStyle ( void  ) const
pure virtual

Returns a reference to OdGiEdgeStyle of this visual style.

Implemented in OdGiVisualStyleDataContainer.

◆ edgeStyle() [2/2]

virtual OdGiEdgeStyle& OdGiVisualStyle::edgeStyle ( void  )
pure virtual

Returns a reference to OdGiEdgeStyle of this visual style.

Implemented in OdGiVisualStyleDataContainer, and OdGiVisualStyleDataContainer.

◆ faceStyle() [1/2]

virtual const OdGiFaceStyle& OdGiVisualStyle::faceStyle ( void  ) const
pure virtual

Returns a reference to OdGiFaceStyle of this visual style.

Implemented in OdGiVisualStyleDataContainer.

◆ faceStyle() [2/2]

virtual OdGiFaceStyle& OdGiVisualStyle::faceStyle ( void  )
pure virtual

Returns a reference to OdGiFaceStyle of this visual style.

Implemented in OdGiVisualStyleDataContainer, and OdGiVisualStyleDataContainer.

◆ ODRX_DECLARE_MEMBERS()

OdGiVisualStyle::ODRX_DECLARE_MEMBERS ( OdGiVisualStyle  )

◆ operation()

virtual Operation OdGiVisualStyle::operation ( Property  prop) const
pure virtual

Gets the operation associated with the given property of the visual style.

Parameters
prop[in] Property for which the associated operation value is to be returned.
Returns
Operation associated with the specified property if successful, otherwise the kInvalidOperation value.

Implemented in OdGiVisualStyleDataContainer.

◆ operator=()

OdGiVisualStyle& OdGiVisualStyle::operator= ( const OdGiVisualStyle visualStyle)

◆ operator==()

bool OdGiVisualStyle::operator== ( const OdGiVisualStyle visualStyle) const

◆ propertyType()

static OdGiVariant::VariantType OdGiVisualStyle::propertyType ( Property  prop)
static

Returns the data type of the given visual style property.

Parameters
prop[in] Visual style property.

◆ setDisplayStyle()

virtual void OdGiVisualStyle::setDisplayStyle ( const OdGiDisplayStyle style)
pure virtual

Copies all properties of OdGiDisplayStyle into this visual style.

Parameters
style[in] Collection of display properties.

Implemented in OdGiVisualStyleDataContainer.

◆ setEdgeStyle()

virtual void OdGiVisualStyle::setEdgeStyle ( const OdGiEdgeStyle style)
pure virtual

Copies all properties of OdGiEdgeStyle into this visual style.

Parameters
style[in] Collection of edge properties.

Implemented in OdGiVisualStyleDataContainer.

◆ setFaceStyle()

virtual void OdGiVisualStyle::setFaceStyle ( const OdGiFaceStyle style)
pure virtual

Copies all properties of OdGiFaceStyle into this visual style.

Parameters
style[in] Collection of face properties.

Implemented in OdGiVisualStyleDataContainer.

◆ setTrait() [1/9]

virtual bool OdGiVisualStyle::setTrait ( Property  prop,
bool  bVal,
Operation  op = OdGiVisualStyleOperations::kSet 
)
virtual

Sets a boolean property of the visual style.

Parameters
prop[in] Property to set.
bVal[in] Property value to set.
op[in] Operation to use for setting the property.
Returns
True if successful, otherwise false.

◆ setTrait() [2/9]

virtual bool OdGiVisualStyle::setTrait ( Property  prop,
const OdCmColorBase pColor,
Operation  op = OdGiVisualStyleOperations::kSet 
)
virtual

Sets a color property of the visual style.

Parameters
prop[in] Color property to set.
pColor[in] Reference to the color value to set.
op[in] Operation to use for setting the property.
Returns
True if successful, otherwise false.

◆ setTrait() [3/9]

virtual bool OdGiVisualStyle::setTrait ( Property  prop,
const OdCmEntityColor pColor,
Operation  op = OdGiVisualStyleOperations::kSet 
)
virtual

Sets a color property of the visual style.

Parameters
prop[in] Color property to set.
pColor[in] Reference to the color value to set.
op[in] Operation to use for setting the property.
Returns
True if successful, otherwise false.

◆ setTrait() [4/9]

virtual bool OdGiVisualStyle::setTrait ( Property  prop,
const OdGiVariant pVal,
Operation  op = OdGiVisualStyleOperations::kSet 
)
pure virtual

Sets a property of the visual style.

Parameters
prop[in] Property to set.
pVal[in] Pointer to the OdGiVariant property value to set.
op[in] Operation to use for setting the property.
Returns
True if successful, otherwise false.

Implemented in OdGiVisualStyleDataContainer.

◆ setTrait() [5/9]

virtual bool OdGiVisualStyle::setTrait ( Property  prop,
const OdString pStr,
Operation  op = OdGiVisualStyleOperations::kSet 
)
virtual

Sets a string property of the visual style.

Parameters
prop[in] String property to set.
pStr[in] Reference to string value to set.
op[in] Operation to use for setting the property.
Returns
True if successful, otherwise false.

◆ setTrait() [6/9]

virtual bool OdGiVisualStyle::setTrait ( Property  prop,
double  dVal,
Operation  op = OdGiVisualStyleOperations::kSet 
)
virtual

Sets a double property of the visual style.

Parameters
prop[in] Property to set.
bVal[in] Property value to set.
op[in] Operation to use for setting the property.
Returns
True if successful, otherwise false.

◆ setTrait() [7/9]

virtual bool OdGiVisualStyle::setTrait ( Property  prop,
double  red,
double  green,
double  blue,
Operation  op = OdGiVisualStyleOperations::kSet 
)
virtual

Sets a color property of the visual style.

Parameters
prop[in] Color property to set.
red[in] Red color component value. Valid values are from 0.0 to 1.0.
green[in] Green component value. Valid values are from 0.0 to 1.0.
blue[in] Blue component value. Valid values are from 0.0 to 1.0.
op[in] Operation to use for setting the property.
Returns
True if successful, otherwise false.

◆ setTrait() [8/9]

virtual bool OdGiVisualStyle::setTrait ( Property  prop,
OdInt32  nVal,
Operation  op = OdGiVisualStyleOperations::kSet 
)
virtual

Sets an integer property of the visual style.

Parameters
prop[in] Property to set.
nVal[in] Property value to set.
op[in] Operation to use for setting the property.
Returns
True if successful, otherwise false.

◆ setTrait() [9/9]

virtual bool OdGiVisualStyle::setTrait ( Property  prop,
Operation  op 
)
pure virtual

Sets the operation associated with the given property.

Parameters
prop[in] The property for which the operation is to set.
op[in] The operation to use for setting the property.
Returns
True if successful, otherwise false.

Implemented in OdGiVisualStyleDataContainer.

◆ setTraitFlag()

virtual bool OdGiVisualStyle::setTraitFlag ( Property  flagProp,
OdUInt32  flagVal,
bool  bEnable = true 
)
virtual

Sets a property flag into the visual style (for properties which are bitfield enumerations).

Parameters
flagProp[in] Bitfield enumeration property to set.
flagVal[in] Bit flag enumeration property to set into the visual style.
bEnable[in] Bool value set to true to enable the flag, false to disable.
Returns
True if successful, otherwise false.

◆ setType()

virtual bool OdGiVisualStyle::setType ( Type  type)
pure virtual

Sets the given visual style type. Multiple properties are modified to change the visual style into the specified type.

Parameters
type[in] Type of the visual style to set. All available types are defined in the Type enumeration.
Returns
True if successful, otherwise false.

Implemented in OdGiVisualStyleDataContainer.

◆ trait()

virtual OdGiVariantPtr OdGiVisualStyle::trait ( Property  prop,
Operation pOp = NULL 
) const
pure virtual

Gets a property of the visual style.

Parameters
prop[in] Property to get.
pOp[out] Pointer to the operation used for the property. If NULL, nothing is returned.
Returns
OdGiVariantPtr for the property value if successful, otherwise an empty OdGiVariantPtr object.

Implemented in OdGiVisualStyleDataContainer.

◆ traitFlag()

virtual bool OdGiVisualStyle::traitFlag ( Property  flagProp,
OdUInt32  flagVal 
) const
virtual

Returns whether the given property flag from the visual style is enabled (for properties which are bitfield enumerations).

Parameters
flagProp[in] Bitfield enumeration property.
flagVal[in] Bit flag enumeration property to check if it's enable.
Returns
True if the flag is enabled, otherwise false.

◆ type()

virtual Type OdGiVisualStyle::type ( ) const
pure virtual

Returns the current visual style type.

Implemented in OdGiVisualStyleDataContainer.


The documentation for this class was generated from the following file: