diff options
author | fluxgen <fluxgen> | 2004-07-05 23:51:57 (GMT) |
---|---|---|
committer | fluxgen <fluxgen> | 2004-07-05 23:51:57 (GMT) |
commit | 7c85d11a950cf88ce53cf15e6d4f21c3433fd24d (patch) | |
tree | 63239383f7f78e20812790d4f0f091be7a7cdc76 /src/FbTk/TextureRender.cc | |
parent | df570bc9452b24e963c38591cfcb185eb70a8a38 (diff) | |
download | fluxbox-7c85d11a950cf88ce53cf15e6d4f21c3433fd24d.zip fluxbox-7c85d11a950cf88ce53cf15e6d4f21c3433fd24d.tar.bz2 |
tiled pixmap fix, patch from dhx (xyx@gm...), see mailing list
Diffstat (limited to 'src/FbTk/TextureRender.cc')
-rw-r--r-- | src/FbTk/TextureRender.cc | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/FbTk/TextureRender.cc b/src/FbTk/TextureRender.cc index 6f496d7..04fb2b3 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.9 2004/06/07 11:46:05 rathnor Exp $ | 25 | // $Id: TextureRender.cc,v 1.10 2004/07/05 23:51:57 fluxgen Exp $ |
26 | 26 | ||
27 | #include "TextureRender.hh" | 27 | #include "TextureRender.hh" |
28 | 28 | ||
@@ -256,12 +256,16 @@ Pixmap TextureRender::renderGradient(const FbTk::Texture &texture) { | |||
256 | Pixmap TextureRender::renderPixmap(const FbTk::Texture &src_texture) { | 256 | Pixmap TextureRender::renderPixmap(const FbTk::Texture &src_texture) { |
257 | if (width != src_texture.pixmap().width() || | 257 | if (width != src_texture.pixmap().width() || |
258 | height != src_texture.pixmap().height()) { | 258 | height != src_texture.pixmap().height()) { |
259 | |||
259 | // copy src_texture's pixmap and | 260 | // copy src_texture's pixmap and |
260 | // scale to fit our size | 261 | // scale/tile to fit our size |
261 | FbPixmap new_pm(src_texture.pixmap()); | 262 | FbPixmap new_pm(src_texture.pixmap()); |
262 | // if not tiled then scale it | 263 | |
263 | if (! (src_texture.type() & Texture::TILED)) | 264 | if ((src_texture.type() & Texture::TILED)) { |
265 | new_pm.tile(width,height); | ||
266 | } else { | ||
264 | new_pm.scale(width, height); | 267 | new_pm.scale(width, height); |
268 | } | ||
265 | 269 | ||
266 | return new_pm.release(); | 270 | return new_pm.release(); |
267 | } | 271 | } |