2 * Copyright 2006-2007, Haiku.
3 * Distributed under the terms of the MIT License.
6 * Stephan Aßmus <superstippi@gmx.de>
13 # include "IconObject.h"
14 # include "Observer.h"
17 #include "IconBuild.h"
18 #include "IconRenderer.h"
19 // TODO: put GammaTable into its own file
21 #include <GraphicsDefs.h>
23 #include <agg_color_rgba.h>
35 class Style
: public IconObject
,
42 Style(const Style
& other
);
43 Style(const rgb_color
& color
);
44 Style(BMessage
* archive
);
50 virtual void ObjectChanged(const Observable
* object
);
53 status_t
Archive(BMessage
* into
,
54 bool deep
= true) const;
56 bool operator==(const Style
& other
) const;
58 inline void Notify() {}
59 #endif // ICON_O_MATIC
61 bool HasTransparency() const;
63 void SetColor(const rgb_color
& color
);
64 inline rgb_color
Color() const
67 void SetGradient(const _ICON_NAMESPACE Gradient
*
69 _ICON_NAMESPACE Gradient
* Gradient() const
72 const agg::rgba8
* Colors() const
75 const agg::rgba8
* GammaCorrectedColors(
76 const GammaTable
& table
) const;
80 _ICON_NAMESPACE Gradient
* fGradient
;
82 // hold gradient color array
85 // for caching gamma corrected gradient color array
86 mutable agg::rgba8
* fGammaCorrectedColors
;
87 mutable bool fGammaCorrectedColorsValid
;