[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Gnash-commit] gnash backend/render_handler.h backend/render_h...
From: |
Udo Giacomozzi |
Subject: |
Re: [Gnash-commit] gnash backend/render_handler.h backend/render_h... |
Date: |
Mon, 23 Oct 2006 20:11:20 +0200 |
Hello Udo,
Thursday, October 12, 2006, 8:59:00 PM, you wrote:
UG> + virtual void set_invalidated_region(const rect bounds) {
UG> +
UG> + if (bounds.m_x_max - bounds.m_x_min > 1e10f) {
UG> +
UG> + // Region is entire rendering buffer. Don't convert to integer as
UG> + // this will overflow.
UG> + m_clip_xmin = 0;
UG> + m_clip_ymin = 0;
UG> + m_clip_xmax = xres-1;
UG> + m_clip_ymax = yres-1;
UG> +
UG> + } else {
UG> +
UG> + world_to_pixel(&m_clip_xmin, &m_clip_ymin, bounds.m_x_min,
bounds.m_y_min);
UG> + world_to_pixel(&m_clip_xmax, &m_clip_ymax, bounds.m_x_max,
bounds.m_y_max);
UG> +
UG> + // add 2 pixels (GUI does that too)
UG> + m_clip_xmin -= 2;
UG> + m_clip_ymin -= 2;
UG> + m_clip_xmax += 2;
UG> + m_clip_ymax += 2;
UG> +
UG> + if (m_clip_xmin < 0) m_clip_xmin=0;
UG> + if (m_clip_ymin < 0) m_clip_ymin=0;
UG> + if (m_clip_xmax < xres-1) m_clip_xmax = xres-1;
UG> + if (m_clip_ymax < yres-1) m_clip_ymax = yres-1;
UG> +
UG> + }
UG> +
UG> + }
UG> +
That should be:
UG> + if (m_clip_xmax > xres-1) m_clip_xmax = xres-1;
UG> + if (m_clip_ymax > yres-1) m_clip_ymax = yres-1;
Can someone check this in for me please? My render_handler_agg.cpp
file is currently a building site because I'm implementing the
(not-so-trivial) bitmap fills.
Udo