LibreOffice Module basegfx (master) 1
|
base class to define color modifications More...
#include <bcolormodifier.hxx>
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 |
virtual OUString | getModifierName () const =0 |
Protected Member Functions | |
BColorModifier () | |
Private Member Functions | |
BColorModifier (const BColorModifier &)=delete | |
BColorModifier & | operator= (const BColorModifier &)=delete |
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 61 of file bcolormodifier.hxx.
|
privatedelete |
|
inlineprotected |
Definition at line 69 of file bcolormodifier.hxx.
|
virtual |
Definition at line 28 of file bcolormodifier.cxx.
|
pure virtual |
Implemented in basegfx::BColorModifier_gray, basegfx::BColorModifier_invert, basegfx::BColorModifier_luminance_to_alpha, basegfx::BColorModifier_replace, basegfx::BColorModifier_interpolate, basegfx::BColorModifier_saturate, basegfx::BColorModifier_matrix, basegfx::BColorModifier_hueRotate, basegfx::BColorModifier_black_and_white, and basegfx::BColorModifier_randomize.
|
pure virtual |
Implemented in basegfx::BColorModifier_gray, basegfx::BColorModifier_invert, basegfx::BColorModifier_luminance_to_alpha, basegfx::BColorModifier_replace, basegfx::BColorModifier_interpolate, basegfx::BColorModifier_saturate, basegfx::BColorModifier_matrix, basegfx::BColorModifier_hueRotate, basegfx::BColorModifier_black_and_white, and basegfx::BColorModifier_randomize.
|
inline |
Definition at line 78 of file bcolormodifier.hxx.
References operator==().
|
privatedelete |
|
pure virtual |
Implemented in basegfx::BColorModifier_gray, basegfx::BColorModifier_invert, basegfx::BColorModifier_luminance_to_alpha, basegfx::BColorModifier_replace, basegfx::BColorModifier_interpolate, basegfx::BColorModifier_saturate, basegfx::BColorModifier_matrix, basegfx::BColorModifier_hueRotate, basegfx::BColorModifier_black_and_white, and basegfx::BColorModifier_randomize.