{
RrRect narea = tarea;
RrTextureRGBA *rgb = &a->texture[i].data.rgba;
- if (rgb->twidth)
- narea.width = MIN(tarea.width, rgb->twidth);
- if (rgb->theight)
- narea.height = MIN(tarea.height, rgb->theight);
narea.x += rgb->tx;
+ narea.width -= rgb->tx;
narea.y += rgb->ty;
+ narea.height -= rgb->ty;
+ if (rgb->twidth)
+ narea.width = MIN(narea.width, rgb->twidth);
+ if (rgb->theight)
+ narea.height = MIN(narea.height, rgb->theight);
RrImageDrawRGBA(a->surface.pixel_data,
&a->texture[i].data.rgba,
a->w, a->h,