diff options
author | simonb <simonb> | 2006-03-26 04:02:30 (GMT) |
---|---|---|
committer | simonb <simonb> | 2006-03-26 04:02:30 (GMT) |
commit | af74a2284551c8511b66d77112c7bf32831c1522 (patch) | |
tree | 35a8830352f5facc1fc9c58b82c0c6dce8fc921e /src/FbTk/ImageControl.hh | |
parent | 872f6a0e1e4230f702ad69fa2d7e10a2fa78b7a3 (diff) | |
download | fluxbox_pavel-af74a2284551c8511b66d77112c7bf32831c1522.zip fluxbox_pavel-af74a2284551c8511b66d77112c7bf32831c1522.tar.bz2 |
rotated fonts, buttons, containers. Used for tabs for now
Diffstat (limited to 'src/FbTk/ImageControl.hh')
-rw-r--r-- | src/FbTk/ImageControl.hh | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/src/FbTk/ImageControl.hh b/src/FbTk/ImageControl.hh index cec9f05..18ad8db 100644 --- a/src/FbTk/ImageControl.hh +++ b/src/FbTk/ImageControl.hh | |||
@@ -27,6 +27,8 @@ | |||
27 | #ifndef FBTK_IMAGECONTROL_HH | 27 | #ifndef FBTK_IMAGECONTROL_HH |
28 | #define FBTK_IMAGECONTROL_HH | 28 | #define FBTK_IMAGECONTROL_HH |
29 | 29 | ||
30 | // actually, Text is rather tool like, that's where orientation comes from | ||
31 | #include "Text.hh" | ||
30 | #include "Texture.hh" | 32 | #include "Texture.hh" |
31 | #include "Timer.hh" | 33 | #include "Timer.hh" |
32 | #include "NotCopyable.hh" | 34 | #include "NotCopyable.hh" |
@@ -61,7 +63,8 @@ public: | |||
61 | @return pixmap of the rendered image, on failure None | 63 | @return pixmap of the rendered image, on failure None |
62 | */ | 64 | */ |
63 | Pixmap renderImage(unsigned int width, unsigned int height, | 65 | Pixmap renderImage(unsigned int width, unsigned int height, |
64 | const FbTk::Texture &src_texture); | 66 | const FbTk::Texture &src_texture, |
67 | Orientation orient = ROT0); | ||
65 | 68 | ||
66 | void installRootColormap(); | 69 | void installRootColormap(); |
67 | void removeImage(Pixmap thepix); | 70 | void removeImage(Pixmap thepix); |
@@ -79,7 +82,7 @@ private: | |||
79 | Search cache for a specific pixmap | 82 | Search cache for a specific pixmap |
80 | @return None if no cache was found | 83 | @return None if no cache was found |
81 | */ | 84 | */ |
82 | Pixmap searchCache(unsigned int width, unsigned int height, const Texture &text) const; | 85 | Pixmap searchCache(unsigned int width, unsigned int height, const Texture &text, Orientation orient) const; |
83 | 86 | ||
84 | void createColorTable(); | 87 | void createColorTable(); |
85 | bool m_dither; | 88 | bool m_dither; |
@@ -109,19 +112,20 @@ private: | |||
109 | typedef struct Cache { | 112 | typedef struct Cache { |
110 | Pixmap pixmap; | 113 | Pixmap pixmap; |
111 | Pixmap texture_pixmap; | 114 | Pixmap texture_pixmap; |
115 | Orientation orient; | ||
112 | unsigned int count, width, height; | 116 | unsigned int count, width, height; |
113 | unsigned long pixel1, pixel2, texture; | 117 | unsigned long pixel1, pixel2, texture; |
114 | } Cache; | 118 | } Cache; |
115 | 119 | ||
116 | struct ltCacheEntry { | 120 | struct ltCacheEntry { |
117 | bool operator()(const Cache* s1, const Cache* s2) const { | 121 | bool operator()(const Cache* s1, const Cache* s2) const { |
118 | return (s1->width < s2->width || s1->width == s2->width && | 122 | return (s1->orient < s2->orient || s1->orient == s2->orient |
119 | (s1->height < s2->height || s1->height == s2->height && | 123 | && (s1->width < s2->width || s1->width == s2->width |
120 | (s1->texture < s2->texture || s1->texture == s2->texture && | 124 | && (s1->height < s2->height || s1->height == s2->height |
121 | s1->pixel1 < s2->pixel1 || s1->pixel1 == s2->pixel1 && | 125 | && (s1->texture < s2->texture || s1->texture == s2->texture |
122 | (s1->texture & FbTk::Texture::GRADIENT) && | 126 | && (s1->pixel1 < s2->pixel1 || s1->pixel1 == s2->pixel1 |
123 | s1->pixel2 < s2->pixel2) | 127 | && ((s1->texture & FbTk::Texture::GRADIENT) && s1->pixel2 < s2->pixel2) |
124 | )); | 128 | ))))); |
125 | } | 129 | } |
126 | }; | 130 | }; |
127 | 131 | ||