LibreOffice Module basegfx (master) 1
Public Member Functions | Protected Member Functions | Private Member Functions | List of all members
basegfx::BColorModifier Class Referenceabstract

base class to define color modifications More...

#include <bcolormodifier.hxx>

Inheritance diagram for basegfx::BColorModifier:
[legend]

Public Member Functions

virtual ~BColorModifier ()
 
virtual bool operator== (const BColorModifier &rCompare) const =0
 
bool operator!= (const BColorModifier &rCompare) const
 
virtual ::basegfx::BColor getModifiedColor (const ::basegfx::BColor &aSourceColor) const =0
 

Protected Member Functions

 BColorModifier ()
 

Private Member Functions

 BColorModifier (const BColorModifier &)=delete
 
BColorModifieroperator= (const BColorModifier &)=delete
 

Detailed Description

base class to define color modifications

The basic idea is to have instances of color modifiers where each of these can be asked to get a modified version of a color. This can be as easy as to return a fixed color, but may also do any other computation based on the given source color and the local algorithm to apply.

This base implementation defines the abstract base class. Every derivation offers another color blending effect, when needed with parameters for that blending defined as members.

As long as aw080 is not applied, an operator== is needed to implement the operator== of the primitive based on this instances.

For the exact definitions of the color blending applied refer to the implementation of the method getModifiedColor

BColorModifier is not copyable (no copy constructor, no assignment operator); local values cannot be changed after construction. The instances are cheap and the idea is to create them on demand. To be able to reuse these as much as possible, a define for a std::shared_ptr named BColorModifierSharedPtr exists below. All usages should handle instances of BColorModifier encapsulated into these shared pointers.

Definition at line 59 of file bcolormodifier.hxx.

Constructor & Destructor Documentation

◆ BColorModifier() [1/2]

basegfx::BColorModifier::BColorModifier ( const BColorModifier )
privatedelete

◆ BColorModifier() [2/2]

basegfx::BColorModifier::BColorModifier ( )
inlineprotected

Definition at line 67 of file bcolormodifier.hxx.

◆ ~BColorModifier()

basegfx::BColorModifier::~BColorModifier ( )
virtual

Definition at line 28 of file bcolormodifier.cxx.

Member Function Documentation

◆ getModifiedColor()

virtual ::basegfx::BColor basegfx::BColorModifier::getModifiedColor ( const ::basegfx::BColor aSourceColor) const
pure virtual

◆ operator!=()

bool basegfx::BColorModifier::operator!= ( const BColorModifier rCompare) const
inline

Definition at line 76 of file bcolormodifier.hxx.

References operator==().

◆ operator=()

BColorModifier & basegfx::BColorModifier::operator= ( const BColorModifier )
privatedelete

◆ operator==()

virtual bool basegfx::BColorModifier::operator== ( const BColorModifier rCompare) const
pure virtual

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