-static void
-gtk_sheet_cell_draw_border (GtkSheet *sheet, gint row, gint col, gint mask)
-{
- GtkWidget *widget;
- GdkGC *fg_gc, *bg_gc;
- GtkSheetCellAttr attributes;
- GdkRectangle area;
- guint width;
-
- g_return_if_fail (sheet != NULL);
-
- /* bail now if we arn't drawable yet */
- if (!GTK_WIDGET_DRAWABLE (sheet)) return;
-
- if (row < 0 || row >= yyy_row_count (sheet)) return;
- if (col < 0 || col >= xxx_column_count (sheet)) return;
- if (!xxx_column_is_visible (sheet, col)) return;
- if (!yyy_row_is_visible (sheet, row)) return;
-
- widget = GTK_WIDGET (sheet);
-
- gtk_sheet_get_attributes (sheet, row, col, &attributes);
-
- /* select GC for background rectangle */
- gdk_gc_set_foreground (sheet->fg_gc, &attributes.border.color);
- gdk_gc_set_foreground (sheet->bg_gc, &attributes.background);
-
- fg_gc = sheet->fg_gc;
- bg_gc = sheet->bg_gc;
-
- area.x = COLUMN_LEFT_XPIXEL (sheet,col);
- area.y = ROW_TOP_YPIXEL (sheet,row);
- area.width = xxx_column_width (sheet, col);
- area.height = yyy_row_height (sheet, row);
-
- width = attributes.border.width;
- gdk_gc_set_line_attributes (sheet->fg_gc, attributes.border.width,
- attributes.border.line_style,
- attributes.border.cap_style,
- attributes.border.join_style);
- if (width > 0)
- {
-
- if (attributes.border.mask & GTK_SHEET_LEFT_BORDER & mask)
- gdk_draw_line (sheet->pixmap, sheet->fg_gc,
- area.x, area.y - width / 2,
- area.x, area.y + area.height + width / 2+1);
-
- if (attributes.border.mask & GTK_SHEET_RIGHT_BORDER & mask)
- gdk_draw_line (sheet->pixmap, sheet->fg_gc,
- area.x + area.width, area.y - width / 2,
- area.x + area.width,
- area.y + area.height + width / 2+1);
-
- if (attributes.border.mask & GTK_SHEET_TOP_BORDER & mask)
- gdk_draw_line (sheet->pixmap, sheet->fg_gc,
- area.x - width / 2,area.y,
- area.x + area.width + width / 2+1,
- area.y);
-
- if (attributes.border.mask & GTK_SHEET_BOTTOM_BORDER & mask)
- gdk_draw_line (sheet->pixmap, sheet->fg_gc,
- area.x - width / 2, area.y + area.height,
- area.x + area.width + width / 2+1,
- area.y + area.height);
- }
-
-}
-
-