Hide menu
cadex::ModelPrs_BackgroundStyle Class Reference

Defines background style. More...

Inheritance diagram for cadex::ModelPrs_BackgroundStyle:
cadex::Base_PublicObject

Public Member Functions

 ModelPrs_BackgroundStyle (const ModelData_Color &theColor=ModelData_Color())
 Constructor. More...
 
 ModelPrs_BackgroundStyle (const ModelData_Color &theTopColor, const ModelData_Color &theBottomColor)
 Constructor. More...
 
bool IsGradient () const
 Returns true if style is gradient (TopColor() == BottomColor()) More...
 
void SetColor (const ModelData_Color &theColor)
 Sets theColor to TopColor() and BottomColor() More...
 
const ModelData_ColorTopColor () const
 Returns a top color. More...
 
void SetTopColor (const ModelData_Color &theColor)
 Sets a top color.
 
const ModelData_ColorBottomColor () const
 Returns a bottom color. More...
 
void SetBottomColor (const ModelData_Color &theColor)
 Sets a bottom color.
 
- Public Member Functions inherited from cadex::Base_PublicObject
 Base_PublicObject ()
 Constructor. More...
 
void Nullify ()
 Resets reference to implementation object.
 
bool IsNull () const
 Returns true if the object is nullified. More...
 
 operator bool () const
 Casts the object to the bool type. More...
 
internal::Base_HandledObject * Impl () const
 Return a handle to backend (reserved for internal use).
 
const internal::Base_Handle & HImpl () const
 
template<typename T >
T * Impl () const
 Reserved for internal use.
 
bool operator== (const Base_PublicObject &theObject) const
 
bool operator!= (const Base_PublicObject &theObject) const
 

Additional Inherited Members

- Protected Member Functions inherited from cadex::Base_PublicObject
 Base_PublicObject (const internal::Base_HandledObject *theObject)
 Constructor (reserved for internal use).
 
template<typename T >
T * GetOrCreateImpl ()
 Reserved for internal use.
 

Detailed Description

Defines background style.

Warning
This class is a part of Visualization Toolkit add-on, which is licensed separately from the base CAD Exchanger SDK.
Examples
visualization/offscreen/main.cxx.

Constructor & Destructor Documentation

◆ ModelPrs_BackgroundStyle() [1/2]

cadex::ModelPrs_BackgroundStyle::ModelPrs_BackgroundStyle ( const ModelData_Color theColor = ModelData_Color())

Constructor.

Creates one-colored style.

◆ ModelPrs_BackgroundStyle() [2/2]

cadex::ModelPrs_BackgroundStyle::ModelPrs_BackgroundStyle ( const ModelData_Color theTopColor,
const ModelData_Color theBottomColor 
)

Constructor.

Creates a gradient style.

Member Function Documentation

◆ BottomColor()

const ModelData_Color & cadex::ModelPrs_BackgroundStyle::BottomColor ( ) const

Returns a bottom color.

If IsGradient() is true then this color is equal to TopColor().

◆ IsGradient()

bool cadex::ModelPrs_BackgroundStyle::IsGradient ( ) const

Returns true if style is gradient (TopColor() == BottomColor())

See also
TopColor(), BottomColor()

◆ SetColor()

void cadex::ModelPrs_BackgroundStyle::SetColor ( const ModelData_Color theColor)

Sets theColor to TopColor() and BottomColor()

IsGradient() will returns false.

◆ TopColor()

const ModelData_Color & cadex::ModelPrs_BackgroundStyle::TopColor ( ) const

Returns a top color.

If IsGradient() is true then this color is equal to BottomColor().