new scaling based on the Bresenham algorithm
Dana Jansens danakj@orodu.net
2 files changed,
6 insertions(+),
3 deletions(-)
M
render/image.h
→
render/image.h
@@ -4,6 +4,8 @@
#include "render.h" #include "geom.h" -void RrImageDraw(RrPixel32 *target, RrTextureRGBA *rgba, RrRect *area); +void RrImageDraw(RrPixel32 *target, RrTextureRGBA *rgba, + gint target_w, gint target_h, + RrRect *area); #endif
M
render/render.c
→
render/render.c
@@ -109,7 +109,9 @@ break;
case RR_TEXTURE_RGBA: g_assert(!transferred); RrImageDraw(a->surface.pixel_data, - &a->texture[i].data.rgba, &tarea); + &a->texture[i].data.rgba, + a->w, a->h, + &tarea); break; } }@@ -203,7 +205,6 @@ copy->texture = g_memdup(orig->texture,
orig->textures * sizeof(RrTexture)); for (i = 0; i < copy->textures; ++i) if (copy->texture[i].type == RR_TEXTURE_RGBA) { - g_free(copy->texture[i].data.rgba.cache); copy->texture[i].data.rgba.cache = NULL; } copy->pixmap = None;