fixed pixmap clipping in gtkclist

This commit is contained in:
Jay Painter
1998-06-02 03:22:28 +00:00
parent a66b9ecba3
commit b975c992ba
8 changed files with 68 additions and 0 deletions

View File

@@ -1,3 +1,7 @@
Mon Jun 1 20:24:42 PDT 1998 Jay Painter <jpaint@serv.net>
* gtk/gtkclist.c: fixed clipping for pixmaps within rows...
finally.
Mon Jun 1 12:47:56 BST 1998 Tony Gale <gale@gtk.org>
[1-1-0-Merge]

View File

@@ -1,3 +1,7 @@
Mon Jun 1 20:24:42 PDT 1998 Jay Painter <jpaint@serv.net>
* gtk/gtkclist.c: fixed clipping for pixmaps within rows...
finally.
Mon Jun 1 12:47:56 BST 1998 Tony Gale <gale@gtk.org>
[1-1-0-Merge]

View File

@@ -1,3 +1,7 @@
Mon Jun 1 20:24:42 PDT 1998 Jay Painter <jpaint@serv.net>
* gtk/gtkclist.c: fixed clipping for pixmaps within rows...
finally.
Mon Jun 1 12:47:56 BST 1998 Tony Gale <gale@gtk.org>
[1-1-0-Merge]

View File

@@ -1,3 +1,7 @@
Mon Jun 1 20:24:42 PDT 1998 Jay Painter <jpaint@serv.net>
* gtk/gtkclist.c: fixed clipping for pixmaps within rows...
finally.
Mon Jun 1 12:47:56 BST 1998 Tony Gale <gale@gtk.org>
[1-1-0-Merge]

View File

@@ -1,3 +1,7 @@
Mon Jun 1 20:24:42 PDT 1998 Jay Painter <jpaint@serv.net>
* gtk/gtkclist.c: fixed clipping for pixmaps within rows...
finally.
Mon Jun 1 12:47:56 BST 1998 Tony Gale <gale@gtk.org>
[1-1-0-Merge]

View File

@@ -1,3 +1,7 @@
Mon Jun 1 20:24:42 PDT 1998 Jay Painter <jpaint@serv.net>
* gtk/gtkclist.c: fixed clipping for pixmaps within rows...
finally.
Mon Jun 1 12:47:56 BST 1998 Tony Gale <gale@gtk.org>
[1-1-0-Merge]

View File

@@ -1,3 +1,7 @@
Mon Jun 1 20:24:42 PDT 1998 Jay Painter <jpaint@serv.net>
* gtk/gtkclist.c: fixed clipping for pixmaps within rows...
finally.
Mon Jun 1 12:47:56 BST 1998 Tony Gale <gale@gtk.org>
[1-1-0-Merge]

View File

@@ -2679,6 +2679,26 @@ draw_row (GtkCList * clist,
ydest = (clip_rectangle.y + (clip_rectangle.height / 2)) - height / 2 +
clist_row->cell[i].vertical;
if (xdest < clip_rectangle.x)
{
xsrc = clip_rectangle.x - xdest;
pixmap_width -= xsrc;
xdest = clip_rectangle.x;
}
if (xdest + pixmap_width > clip_rectangle.x + clip_rectangle.width)
pixmap_width = (clip_rectangle.x + clip_rectangle.width) - xdest;
if (ydest < clip_rectangle.y)
{
ysrc = clip_rectangle.y - ydest;
height -= ysrc;
ydest = clip_rectangle.y;
}
if (ydest + height > clip_rectangle.y + clip_rectangle.height)
height = (clip_rectangle.y + clip_rectangle.height) - ydest;
if (GTK_CELL_PIXMAP (clist_row->cell[i])->mask)
{
gdk_gc_set_clip_mask (fg_gc, GTK_CELL_PIXMAP (clist_row->cell[i])->mask);
@@ -2707,6 +2727,26 @@ draw_row (GtkCList * clist,
ydest = (clip_rectangle.y + (clip_rectangle.height / 2)) - height / 2 +
clist_row->cell[i].vertical;
if (xdest < clip_rectangle.x)
{
xsrc = clip_rectangle.x - xdest;
pixmap_width -= xsrc;
xdest = clip_rectangle.x;
}
if (xdest + pixmap_width > clip_rectangle.x + clip_rectangle.width)
pixmap_width = (clip_rectangle.x + clip_rectangle.width) - xdest;
if (ydest < clip_rectangle.y)
{
ysrc = clip_rectangle.y - ydest;
height -= ysrc;
ydest = clip_rectangle.y;
}
if (ydest + height > clip_rectangle.y + clip_rectangle.height)
height = (clip_rectangle.y + clip_rectangle.height) - ydest;
if (GTK_CELL_PIXTEXT (clist_row->cell[i])->mask)
{
gdk_gc_set_clip_mask (fg_gc, GTK_CELL_PIXTEXT (clist_row->cell[i])->mask);