Re: robsta - r24035 - abiword/branches/gsoc2008cairo/src/af/gr/gtk

From: J.M. Maurer <uwog_at_uwog.net>
Date: Mon May 26 2008 - 18:55:16 CEST

On Mon, 2008-05-26 at 14:55 +0200, cvs@abisource.com wrote:
> Author: robsta
> Date: 2008-05-26 14:55:44 +0200 (Mon, 26 May 2008)
> New Revision: 24035
>
> Modified:
> abiword/branches/gsoc2008cairo/src/af/gr/gtk/gr_UnixPangoGraphics.cpp
> Log:
> Implement cairo clipping
>
> Modified: abiword/branches/gsoc2008cairo/src/af/gr/gtk/gr_UnixPangoGraphics.cpp
> ===================================================================
> --- abiword/branches/gsoc2008cairo/src/af/gr/gtk/gr_UnixPangoGraphics.cpp 2008-05-26 12:50:47 UTC (rev 24034)
> +++ abiword/branches/gsoc2008cairo/src/af/gr/gtk/gr_UnixPangoGraphics.cpp 2008-05-26 12:55:44 UTC (rev 24035)
> @@ -3059,6 +3059,23 @@
> void GR_CairoGraphics::setClipRect(const UT_Rect* pRect)
> {
> m_pRect = pRect;
> + if (pRect) {
> + // TODO Rob: nicify after removal of deprecated code
> + double x1, y1, x2, y2;
> + x1 = _tduX(pRect->left);
> + y1 = _tduY(pRect->top);
> + x2 = x1 + _tduR(pRect->width);
> + y2 = y1 + _tduR(pRect->height);

I don't think this is actually correct. If you do x1 + width = x2, then
your x2 is 1 pixel too big. For example, left pos x1 = 0, width = 10,
then x2 should be 9, not 10. So you need an additional -1. Same case for
y2.

We have this mistake all over the code. No need to spread it any
further :)

  Marc
Received on Mon May 26 19:00:45 2008

This archive was generated by hypermail 2.1.8 : Mon May 26 2008 - 19:00:45 CEST