Kaydet (Commit) 80f3211a authored tarafından Andrzej Hunt's avatar Andrzej Hunt

svp clipping: Rectangle dimensions don't map directly to B2IBox.

Previously the clip region would end up being 1 pixel smaller in both
directions than the requested area -- B2IBox considers the bottom-right
point to NOT be included in its area, whereas Rectangle considers the
bottom-right point to be the last point WITHIN its area.

(This is equivalent to the Rectangle's getWidth/GetWidth differentiation.)

This is noticeable e.g. with tiled rendering, where images spanning
a tile boundary are clipped to paint only the region within a given
tile -- however previously they would be clipped by an additional pixel
in each direciton, resulting in an empty border along the bottom-right
edge.

Change-Id: I0ef3098959defc5c82719155c130aa904c04b6b1
üst 163b5fd5
......@@ -301,7 +301,7 @@ bool SvpSalGraphics::setClipRegion( const Region& i_rClip )
const Rectangle& aBoundRect = aRectangles[0];
m_aDevice = basebmp::subsetBitmapDevice(
m_aOrigDevice,
basegfx::B2IBox(aBoundRect.Left(),aBoundRect.Top(),aBoundRect.Right(),aBoundRect.Bottom()) );
basegfx::B2IBox(aBoundRect.Left(),aBoundRect.Top(),aBoundRect.Right() + 1,aBoundRect.Bottom() + 1) );
m_bClipSetup = true;
}
......
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