1 ///////////////////////////////////////////////////////////////////////////////
2 // Name: wx/ribbon/art_internal.h
3 // Purpose: Helper functions & classes used by ribbon art providers
4 // Author: Peter Cawley
7 // Copyright: (C) Peter Cawley
8 // Licence: wxWindows licence
9 ///////////////////////////////////////////////////////////////////////////////
11 #ifndef _WX_RIBBON_ART_INTERNAL_H_
12 #define _WX_RIBBON_ART_INTERNAL_H_
18 WXDLLIMPEXP_RIBBON wxColour
wxRibbonInterpolateColour(
19 const wxColour
& start_colour
,
20 const wxColour
& end_colour
,
25 WXDLLIMPEXP_RIBBON
bool wxRibbonCanLabelBreakAtPosition(
26 const wxString
& label
,
29 WXDLLIMPEXP_RIBBON
void wxRibbonDrawParallelGradientLines(
32 const wxPoint
* line_origins
,
38 const wxColour
& start_colour
,
39 const wxColour
& end_colour
);
41 WXDLLIMPEXP_RIBBON wxBitmap
wxRibbonLoadPixmap(
42 const char* const* bits
,
46 HSL colour class, using interface as discussed in wx-dev. Provided mainly
47 for art providers to perform colour scheme calculations in the HSL colour
48 space. If such a class makes it into base / core, then this class should be
49 removed and users switched over to the one in base / core.
52 0.0 <= Saturation <= 1.0
53 0.0 <= Luminance <= 1.0
55 class WXDLLIMPEXP_RIBBON wxRibbonHSLColour
59 : hue(0.0), saturation(0.0), luminance(0.0) {}
60 wxRibbonHSLColour(float H
, float S
, float L
)
61 : hue(H
), saturation(S
), luminance(L
) { }
62 wxRibbonHSLColour(const wxColour
& C
);
64 wxColour
ToRGB() const;
66 wxRibbonHSLColour
& MakeDarker(float delta
);
67 wxRibbonHSLColour
Darker(float delta
) const;
68 wxRibbonHSLColour
Lighter(float delta
) const;
69 wxRibbonHSLColour
Saturated(float delta
) const;
70 wxRibbonHSLColour
Desaturated(float delta
) const;
71 wxRibbonHSLColour
ShiftHue(float delta
) const;
73 float hue
, saturation
, luminance
;
76 WXDLLIMPEXP_RIBBON wxRibbonHSLColour
wxRibbonShiftLuminance(
77 wxRibbonHSLColour colour
, float amount
);
79 #endif // wxUSE_RIBBON
81 #endif // _WX_RIBBON_ART_INTERNAL_H_