new scaling based on the Bresenham algorithm
This commit is contained in:
parent
55ed757c5f
commit
4cbfe3eac0
2 changed files with 6 additions and 3 deletions
|
@ -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
|
||||
|
|
|
@ -109,7 +109,9 @@ void RrPaint(RrAppearance *a, Window win, gint w, gint h)
|
|||
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 @@ RrAppearance *RrAppearanceCopy(RrAppearance *orig)
|
|||
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;
|
||||
|
|
Loading…
Reference in a new issue