aboutsummaryrefslogtreecommitdiff
path: root/src/FbTk
diff options
context:
space:
mode:
authorfluxgen <fluxgen>2003-08-12 11:44:41 (GMT)
committerfluxgen <fluxgen>2003-08-12 11:44:41 (GMT)
commit9f939d9af99ad01cb7962a241ff62de5d064972d (patch)
tree68e14d2a3b65a0ac6799ae5c30f53c648b2e99d2 /src/FbTk
parent680407c294b9de22f357b6667ccbc580105b7ce1 (diff)
downloadfluxbox-9f939d9af99ad01cb7962a241ff62de5d064972d.zip
fluxbox-9f939d9af99ad01cb7962a241ff62de5d064972d.tar.bz2
added TILED option
Diffstat (limited to 'src/FbTk')
-rw-r--r--src/FbTk/Texture.cc5
-rw-r--r--src/FbTk/Texture.hh7
-rw-r--r--src/FbTk/TextureRender.cc7
3 files changed, 13 insertions, 6 deletions
diff --git a/src/FbTk/Texture.cc b/src/FbTk/Texture.cc
index ae4710d..4c451cb 100644
--- a/src/FbTk/Texture.cc
+++ b/src/FbTk/Texture.cc
@@ -22,7 +22,7 @@
22// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 22// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
23// DEALINGS IN THE SOFTWARE. 23// DEALINGS IN THE SOFTWARE.
24 24
25// $Id: Texture.cc,v 1.5 2002/12/01 13:42:14 rathnor Exp $ 25// $Id: Texture.cc,v 1.6 2003/08/12 11:44:19 fluxgen Exp $
26 26
27#include "Texture.hh" 27#include "Texture.hh"
28 28
@@ -89,6 +89,9 @@ void Texture::setFromString(const char * const texture_str) {
89 89
90 if (strstr(ts, "interlaced")) 90 if (strstr(ts, "interlaced"))
91 addType(Texture::INTERLACED); 91 addType(Texture::INTERLACED);
92
93 if (strstr(ts, "tiled"))
94 addType(Texture::TILED);
92 } 95 }
93 96
94 delete [] ts; 97 delete [] ts;
diff --git a/src/FbTk/Texture.hh b/src/FbTk/Texture.hh
index 333e12d..9c1df6f 100644
--- a/src/FbTk/Texture.hh
+++ b/src/FbTk/Texture.hh
@@ -22,7 +22,7 @@
22// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 22// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
23// DEALINGS IN THE SOFTWARE. 23// DEALINGS IN THE SOFTWARE.
24 24
25// $Id: Texture.hh,v 1.3 2003/04/28 22:23:41 fluxgen Exp $ 25// $Id: Texture.hh,v 1.4 2003/08/12 11:44:19 fluxgen Exp $
26 26
27#ifndef FBTK_TEXTURE_HH 27#ifndef FBTK_TEXTURE_HH
28#define FBTK_TEXTURE_HH 28#define FBTK_TEXTURE_HH
@@ -64,9 +64,10 @@ public:
64 enum { 64 enum {
65 BEVEL1 = 0x04000, 65 BEVEL1 = 0x04000,
66 BEVEL2 = 0x08000, // bevel types 66 BEVEL2 = 0x08000, // bevel types
67 INVERT = 0x010000, //inverted image 67 INVERT = 0x10000, ///< inverted image
68 PARENTRELATIVE = 0x20000, 68 PARENTRELATIVE = 0x20000,
69 INTERLACED = 0x40000 69 INTERLACED = 0x40000,
70 TILED = 0x80000 ///< tiled pixmap
70 }; 71 };
71 72
72 Texture():m_type(0) { } 73 Texture():m_type(0) { }
diff --git a/src/FbTk/TextureRender.cc b/src/FbTk/TextureRender.cc
index 1f7d29f..40a7e72 100644
--- a/src/FbTk/TextureRender.cc
+++ b/src/FbTk/TextureRender.cc
@@ -22,7 +22,7 @@
22// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 22// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
23// DEALINGS IN THE SOFTWARE. 23// DEALINGS IN THE SOFTWARE.
24 24
25// $Id: TextureRender.cc,v 1.3 2003/04/28 22:27:29 fluxgen Exp $ 25// $Id: TextureRender.cc,v 1.4 2003/08/12 11:44:41 fluxgen Exp $
26 26
27#include "TextureRender.hh" 27#include "TextureRender.hh"
28 28
@@ -264,7 +264,10 @@ Pixmap TextureRender::renderPixmap(const FbTk::Texture &src_texture) {
264 // copy src_texture's pixmap and 264 // copy src_texture's pixmap and
265 // scale to fit our size 265 // scale to fit our size
266 FbPixmap new_pm(src_texture.pixmap()); 266 FbPixmap new_pm(src_texture.pixmap());
267 new_pm.scale(width, height); 267 // if not tiled then scale it
268 if (! (src_texture.type() & Texture::TILED))
269 new_pm.scale(width, height);
270
268 return new_pm.release(); 271 return new_pm.release();
269 } 272 }
270 // return copy of pixmap 273 // return copy of pixmap