summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael David Emmel <memmel@src.gnome.org>2006-04-30 17:19:38 +0000
committerMichael David Emmel <memmel@src.gnome.org>2006-04-30 17:19:38 +0000
commit47f6017e1a375ae9880b3d246a0f69bf8170ee86 (patch)
treebbc93e4a2ecb17b5db1713f0283a1b4830e906e5
parent9fd0d4b8b95bd3d47f80688ba3e7f37c58912436 (diff)
downloadgtk+-47f6017e1a375ae9880b3d246a0f69bf8170ee86.tar.gz
Removed subtracting one from all clips
-rw-r--r--ChangeLog5
-rw-r--r--ChangeLog.pre-2-105
-rw-r--r--gdk/directfb/gdkdrawable-directfb.c19
3 files changed, 20 insertions, 9 deletions
diff --git a/ChangeLog b/ChangeLog
index f606fc1c8b..28edb6ebfd 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2006-04-19 Michael Emmel <mike.emmel@gmail.com>
+
+ * gdk/directfb/gdkdrawable-directfb.c: removed all subtracting one on
+ clipping
+
2006-04-30 Kristian Rietveld <kris@imendio.com>
Fix for #340200, spotted by Torsten Schoenfeld.
diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10
index f606fc1c8b..28edb6ebfd 100644
--- a/ChangeLog.pre-2-10
+++ b/ChangeLog.pre-2-10
@@ -1,3 +1,8 @@
+2006-04-19 Michael Emmel <mike.emmel@gmail.com>
+
+ * gdk/directfb/gdkdrawable-directfb.c: removed all subtracting one on
+ clipping
+
2006-04-30 Kristian Rietveld <kris@imendio.com>
Fix for #340200, spotted by Torsten Schoenfeld.
diff --git a/gdk/directfb/gdkdrawable-directfb.c b/gdk/directfb/gdkdrawable-directfb.c
index 6da716a09a..9a8f7097ee 100644
--- a/gdk/directfb/gdkdrawable-directfb.c
+++ b/gdk/directfb/gdkdrawable-directfb.c
@@ -427,7 +427,7 @@ _gdk_directfb_draw_rectangle (GdkDrawable *drawable,
for (i = 0; i < clip->numRects; i++)
{
DFBRegion reg = { clip->rects[i].x1, clip->rects[i].y1,
- clip->rects[i].x2 - 1, clip->rects[i].y2 - 1 };
+ clip->rects[i].x2, clip->rects[i].y2 };
impl->surface->SetClip (impl->surface, &reg);
impl->surface->TileBlit (impl->surface, surface, NULL, x, y);
@@ -455,15 +455,16 @@ _gdk_directfb_draw_rectangle (GdkDrawable *drawable,
}
else
{
- /* FIXME: clipping! */
- DFBRegion region = { x, y, x + width, y + height };
+ DFBRegion region = { x, y, x + width+1, y + height+1 };
+ impl->surface->SetClip (impl->surface, &region);
/* DirectFB does not draw rectangles the X way. Using DirectFB,
a filled Rectangle has the same size as a drawn one, while
X draws the rectangle one pixel taller and wider. */
impl->surface->DrawRectangle (impl->surface,
x, y, width + 1, height + 1);
+ impl->surface->SetClip (impl->surface, NULL);
_gdk_directfb_update (impl, &region);
}
@@ -516,7 +517,7 @@ gdk_directfb_draw_polygon (GdkDrawable *drawable,
for (i = 0; i < clip->numRects; i++)
{
DFBRegion reg = { clip->rects[i].x1, clip->rects[i].y1,
- clip->rects[i].x2 - 1, clip->rects[i].y2 - 1 };
+ clip->rects[i].x2 , clip->rects[i].y2 };
impl->surface->SetClip (impl->surface, &reg);
impl->surface->FillTriangle (impl->surface,
@@ -622,7 +623,7 @@ gdk_directfb_draw_drawable (GdkDrawable *drawable,
for (i = 0; i < clip->numRects; i++)
{
DFBRegion reg = { clip->rects[i].x1, clip->rects[i].y1,
- clip->rects[i].x2 - 1, clip->rects[i].y2 - 1 };
+ clip->rects[i].x2 , clip->rects[i].y2 };
impl->surface->SetClip (impl->surface, &reg);
impl->surface->Blit (impl->surface, src_impl->surface, &rect,
@@ -706,7 +707,7 @@ gdk_directfb_draw_segments (GdkDrawable *drawable,
for (i = 0; i < clip->numRects; i++)
{
DFBRegion reg = { clip->rects[i].x1, clip->rects[i].y1,
- clip->rects[i].x2-1, clip->rects[i].y2-1 };
+ clip->rects[i].x2, clip->rects[i].y2 };
impl->surface->SetClip (impl->surface, &reg);
@@ -817,7 +818,7 @@ gdk_directfb_draw_lines (GdkDrawable *drawable,
for (i = 0; i < clip->numRects; i++)
{
DFBRegion reg = { clip->rects[i].x1, clip->rects[i].y1,
- clip->rects[i].x2-1, clip->rects[i].y2-1 };
+ clip->rects[i].x2, clip->rects[i].y2 };
impl->surface->SetClip (impl->surface, &reg);
impl->surface->DrawLines (impl->surface, lines, npoints - 1);
@@ -869,7 +870,7 @@ gdk_directfb_draw_image (GdkDrawable *drawable,
for (i = 0; i < clip->numRects; i++)
{
DFBRegion reg = { clip->rects[i].x1, clip->rects[i].y1,
- clip->rects[i].x2 - 1, clip->rects[i].y2 - 1 };
+ clip->rects[i].x2 , clip->rects[i].y2 };
impl->surface->SetClip (impl->surface, &reg);
impl->surface->Blit (impl->surface,
@@ -1035,7 +1036,7 @@ gdk_directfb_update_region (GdkDrawableImplDirectFB *impl,
GdkRegion *region)
{
DFBRegion reg = { region->extents.x1, region->extents.y1,
- region->extents.x2 - 1, region->extents.y2 - 1 };
+ region->extents.x2 , region->extents.y2 };
_gdk_directfb_update (impl, &reg);
}