LibreOffice Module basegfx (master) 1
Public Member Functions | List of all members
basegfx::BColorModifier_luminance_to_alpha Class Referencefinal

convert to alpha based on luminance More...

#include <bcolormodifier.hxx>

Inheritance diagram for basegfx::BColorModifier_luminance_to_alpha:
[legend]
Collaboration diagram for basegfx::BColorModifier_luminance_to_alpha:
[legend]

Public Member Functions

 BColorModifier_luminance_to_alpha ()
 
virtual ~BColorModifier_luminance_to_alpha () override
 
virtual SAL_DLLPRIVATE bool operator== (const BColorModifier &rCompare) const override
 
virtual SAL_DLLPRIVATE ::basegfx::BColor getModifiedColor (const ::basegfx::BColor &aSourceColor) const override
 
- Public Member Functions inherited from basegfx::BColorModifier
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
 

Additional Inherited Members

- Protected Member Functions inherited from basegfx::BColorModifier
 BColorModifier ()
 

Detailed Description

convert to alpha based on luminance

returns a color where red green and blue are first weighted and added to build a luminance value which is then inverted and used for red, green and blue. The weights are r * 0.2125 + g * 0.7154 + b * 0.0721. This derivation is used for the svg importer and does exactly what SVG defines for this needed case.

Definition at line 131 of file bcolormodifier.hxx.

Constructor & Destructor Documentation

◆ BColorModifier_luminance_to_alpha()

basegfx::BColorModifier_luminance_to_alpha::BColorModifier_luminance_to_alpha ( )
inline

Definition at line 134 of file bcolormodifier.hxx.

◆ ~BColorModifier_luminance_to_alpha()

basegfx::BColorModifier_luminance_to_alpha::~BColorModifier_luminance_to_alpha ( )
overridevirtual

Definition at line 62 of file bcolormodifier.cxx.

Member Function Documentation

◆ getModifiedColor()

basegfx::BColor basegfx::BColorModifier_luminance_to_alpha::getModifiedColor ( const ::basegfx::BColor aSourceColor) const
overridevirtual

Implements basegfx::BColorModifier.

Definition at line 71 of file bcolormodifier.cxx.

◆ operator==()

bool basegfx::BColorModifier_luminance_to_alpha::operator== ( const BColorModifier rCompare) const
overridevirtual

Implements basegfx::BColorModifier.

Definition at line 66 of file bcolormodifier.cxx.


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