aboutsummaryrefslogtreecommitdiff
path: root/src/FbTk/TextureRender.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/FbTk/TextureRender.cc')
-rw-r--r--src/FbTk/TextureRender.cc12
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) {
256Pixmap TextureRender::renderPixmap(const FbTk::Texture &src_texture) { 256Pixmap 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 }