1 ///////////////////////////////////////////////////////////////////////////////
2 // Name: wx/ribbon/art_internal.h
3 // Purpose: Helper functions & classes used by ribbon art providers
4 // Author: Peter Cawley
8 // Copyright: (C) Peter Cawley
9 // Licence: wxWindows licence
10 ///////////////////////////////////////////////////////////////////////////////
12 #ifndef _WX_RIBBON_ART_INTERNAL_H_
13 #define _WX_RIBBON_ART_INTERNAL_H_
19 WXDLLIMPEXP_RIBBON wxColour
wxRibbonInterpolateColour(
20 const wxColour
& start_colour
,
21 const wxColour
& end_colour
,
26 WXDLLIMPEXP_RIBBON
bool wxRibbonCanLabelBreakAtPosition(
27 const wxString
& label
,
30 WXDLLIMPEXP_RIBBON
void wxRibbonDrawParallelGradientLines(
33 const wxPoint
* line_origins
,
39 const wxColour
& start_colour
,
40 const wxColour
& end_colour
);
42 WXDLLIMPEXP_RIBBON wxBitmap
wxRibbonLoadPixmap(
43 const char* const* bits
,
47 HSL colour class, using interface as discussed in wx-dev. Provided mainly
48 for art providers to perform colour scheme calculations in the HSL colour
49 space. If such a class makes it into base / core, then this class should be
50 removed and users switched over to the one in base / core.
53 0.0 <= Saturation <= 1.0
54 0.0 <= Luminance <= 1.0
56 class WXDLLIMPEXP_RIBBON wxRibbonHSLColour
60 : hue(0.0), saturation(0.0), luminance(0.0) {}
61 wxRibbonHSLColour(float H
, float S
, float L
)
62 : hue(H
), saturation(S
), luminance(L
) { }
63 wxRibbonHSLColour(const wxColour
& C
);
65 wxColour
ToRGB() const;
67 wxRibbonHSLColour
& MakeDarker(float delta
);
68 wxRibbonHSLColour
Darker(float delta
) const;
69 wxRibbonHSLColour
Lighter(float delta
) const;
70 wxRibbonHSLColour
Saturated(float delta
) const;
71 wxRibbonHSLColour
Desaturated(float delta
) const;
72 wxRibbonHSLColour
ShiftHue(float delta
) const;
74 float hue
, saturation
, luminance
;
77 WXDLLIMPEXP_RIBBON wxRibbonHSLColour
wxRibbonShiftLuminance(
78 wxRibbonHSLColour colour
, float amount
);
80 #endif // wxUSE_RIBBON
82 #endif // _WX_RIBBON_ART_INTERNAL_H_