Commit 050af2c0 authored by Kevin Bracey's avatar Kevin Bracey
Browse files

Added support for PNGs with alpha. image_fill_background optimised.

parent f0a436d5
......@@ -2199,6 +2199,10 @@ static _kernel_oserror * image_update_image(browser_data * b, int image, BBox *
animhandler = 1;
}
}
if (idata[image].istore -> RegisterFiller)
{
#ifdef STRICT_PARSER
{
......@@ -2899,16 +2903,16 @@ _kernel_oserror * image_fill_background(void * handle, int * i)
if (w < 1 || h < 1) return NULL;
redraw.xmin = xorigin;
redraw.ymin = -idata[ximage].istore->height_os;
redraw.xmin = -((-xorigin) % w);
redraw.ymin = -h /*-idata[ximage].istore->height_os */;
redraw.xmax = idata[ximage].istore->width_os;
redraw.ymax = yorigin;
redraw.ymax = idata[ximage].istore->height_os + (yorigin - idata[ximage].istore->height_os) % h - 1;
/* Render the image over the redraw region, with an unscaled plot */
/* Render the image over the redraw region, with a scaled plot */
for (y = redraw.ymax; y >= redraw.ymin - h; y -= h)
for (y = redraw.ymax; y >= redraw.ymin; y -= h)
{
for (x = redraw.xmin; x <= redraw.xmax + w; x += w)
for (x = redraw.xmin; x <= redraw.xmax; x += w)
{
e = (idata[bimage].istore -> Render(idata[bimage].istore,
x,
......@@ -2943,16 +2947,16 @@ _kernel_oserror * image_fill_background(void * handle, int * i)
if (w < 1 || h < 1) return NULL;
redraw.xmin = xorigin;
redraw.ymin = -idata[ximage].istore->height_os;
redraw.xmin = -((-xorigin) % w);
redraw.ymin = -h /*-idata[ximage].istore->height_os */;
redraw.xmax = idata[ximage].istore->width_os;
redraw.ymax = yorigin;
redraw.ymax = idata[ximage].istore->height_os + (yorigin - idata[ximage].istore->height_os) % h - 1;
/* Render the image over the redraw region, with an unscaled plot */
for (y = redraw.ymax; y >= redraw.ymin - h; y -= h)
for (y = redraw.ymax; y >= redraw.ymin; y -= h)
{
for (x = redraw.xmin; x <= redraw.xmax + w; x += w)
for (x = redraw.xmin; x <= redraw.xmax; x += w)
{
e = (idata[bimage].istore -> Render(idata[bimage].istore,
x,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment