Defines background style. More...
Public Member Functions | |
ModelPrs_BackgroundStyle (const ModelData_Color &theColor=ModelData_Color()) | |
Constructor. | |
ModelPrs_BackgroundStyle (const ModelData_Color &theTopColor, const ModelData_Color &theBottomColor) | |
Constructor. | |
bool | IsGradient () const |
Returns true if style is gradient (TopColor() == BottomColor()) | |
void | SetColor (const ModelData_Color &theColor) |
Sets theColor to TopColor() and BottomColor() | |
const ModelData_Color & | TopColor () const |
Returns a top color. | |
void | SetTopColor (const ModelData_Color &theColor) |
Sets a top color. | |
const ModelData_Color & | BottomColor () const |
Returns a bottom color. | |
void | SetBottomColor (const ModelData_Color &theColor) |
Sets a bottom color. | |
![]() | |
void | Nullify () |
Resets reference to implementation object. | |
bool | IsNull () const |
Returns true if the object is nullified. | |
operator bool () const | |
Casts the object to the bool type. | |
internal::Base_HandledObject * | Impl () const |
Return a handle to backend (reserved for internal use). | |
Additional Inherited Members | |
![]() | |
Base_PublicObject (const internal::Base_HandledObject *theObject) | |
Constructor (reserved for internal use). | |
template<typename T > | |
T * | GetOrCreateImpl () |
Reserved for internal use. | |
Defines background style.
cadex::ModelPrs_BackgroundStyle::ModelPrs_BackgroundStyle | ( | const ModelData_Color & | theColor = ModelData_Color() | ) |
Constructor.
Creates one-colored style.
cadex::ModelPrs_BackgroundStyle::ModelPrs_BackgroundStyle | ( | const ModelData_Color & | theTopColor, |
const ModelData_Color & | theBottomColor | ||
) |
Constructor.
Creates a gradient style.
const ModelData_Color & cadex::ModelPrs_BackgroundStyle::BottomColor | ( | ) | const |
Returns a bottom color.
If IsGradient() is true then this color is equal to TopColor().
bool cadex::ModelPrs_BackgroundStyle::IsGradient | ( | ) | const |
Returns true if style is gradient (TopColor() == BottomColor())
void cadex::ModelPrs_BackgroundStyle::SetColor | ( | const ModelData_Color & | theColor | ) |
Sets theColor to TopColor() and BottomColor()
IsGradient() will returns false.
const ModelData_Color & cadex::ModelPrs_BackgroundStyle::TopColor | ( | ) | const |
Returns a top color.
If IsGradient() is true then this color is equal to BottomColor().