20#ifndef INCLUDED_OOX_DRAWINGML_COLOR_HXX
21#define INCLUDED_OOX_DRAWINGML_COLOR_HXX
25#include <com/sun/star/beans/PropertyValue.hpp>
26#include <com/sun/star/uno/Sequence.hxx>
29#include <rtl/ustring.hxx>
49 static ::Color getDmlPresetColor( sal_Int32
nToken,
::Color nDefaultRgb );
51 static ::Color getVmlPresetColor( sal_Int32
nToken,
::Color nDefaultRgb );
53 static ::Color getHighlightColor(sal_Int32
nToken,
::Color nDefaultRgb);
58 void setSrgbClr( sal_Int32 nRgb );
59 void setSrgbClr(
::Color nRgb );
61 void setScrgbClr( sal_Int32 nR, sal_Int32 nG, sal_Int32 nB );
63 void setHslClr( sal_Int32 nHue, sal_Int32 nSat, sal_Int32 nLum );
65 void setPrstClr( sal_Int32
nToken );
67 void setHighlight(sal_Int32
nToken);
69 void setSchemeClr( sal_Int32
nToken );
71 void setSchemeName(
const OUString& sSchemeName ) { msSchemeName = sSchemeName; }
73 void setSysClr( sal_Int32 nToken, sal_Int32 nLastRgb );
75 void setPaletteClr( sal_Int32 nPaletteIdx );
78 void addTransformation( sal_Int32 nElement, sal_Int32 nValue = -1 );
80 void addChartTintTransformation(
double fTint );
82 void addExcelTintTransformation(
double fTint );
84 void clearTransformations();
86 void clearTransparence();
100 bool hasTransparency()
const;
102 sal_Int16 getTransparency()
const;
106 sal_Int16 getSchemeColorIndex()
const;
107 sal_Int16 getTintOrShade()
const;
108 sal_Int16 getLumMod()
const;
109 sal_Int16 getLumOff()
const;
113 return meThemeColorType;
119 const css::uno::Sequence< css::beans::PropertyValue >&
getTransformations()
const {
return maInteropTransformations;}
122 static OUString getColorTransformationName( sal_Int32 nElement );
124 static sal_Int32 getColorTransformationToken( std::u16string_view
sName );
133 void setResolvedRgb(
::Color nRgb )
const;
165 mutable std::vector< Transformation >
173 css::uno::Sequence< css::beans::PropertyValue >
Provides helper functions for colors, device measurement conversion, graphics, and graphic objects ha...
model::ThemeColorType getThemeColorType() const
bool isPlaceHolder() const
Returns true, if the color is a placeholder color in theme style lists.
const OUString & getSchemeColorName() const
Returns the scheme name from the a:schemeClr element for interoperability purposes.
void assignIfUsed(const Color &rColor)
Overwrites this color with the passed color, if it is used.
@ COLOR_SYSTEM
Color from application defined palette.
@ COLOR_RGB
Color is not used, or undefined.
@ COLOR_HSL
Relative RGB (r/g/b: 0...100000).
@ COLOR_CRGB
Absolute RGB (r/g/b: 0...255).
@ COLOR_PALETTE
Color from scheme.
@ COLOR_SCHEME
HSL (hue: 0...21600000, sat/lum: 0...100000).
@ COLOR_PH
Color from system palette.
sal_Int32 mnC1
Color transformations.
css::uno::Sequence< css::beans::PropertyValue > maInteropTransformations
sal_Int32 mnAlpha
Blue, blue%, or luminance.
model::ThemeColorType meThemeColorType
Scheme name from the a:schemeClr element for interoperability purposes.
std::vector< Transformation > maTransforms
Current color mode.
OUString msSchemeName
Alpha value (color opacity).
sal_Int32 mnC2
Red, red%, hue, scheme token, palette index, system token, or final RGB.
bool isUsed() const
Returns true, if the color is initialized.
sal_Int32 mnC3
Green, green%, saturation, or system default RGB.
void setSchemeName(const OUString &sSchemeName)
Sets the scheme name from the a:schemeClr element for interoperability purposes.
const css::uno::Sequence< css::beans::PropertyValue > & getTransformations() const
Returns the unaltered list of transformations for interoperability purposes.
model::ThemeColorType schemeNameToThemeColorType(OUString const &rSchemeName)
model::ThemeColorType schemeTokenToThemeColorType(sal_uInt32 nToken)
const ::Color API_RGB_TRANSPARENT(ColorTransparency, 0xffffffff)
Transparent color for API calls.