[gtk+/rendering-cleanup: 43/113] API: remove gdk_draw_trapezoids() and GdkTrapezoid struct
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/rendering-cleanup: 43/113] API: remove gdk_draw_trapezoids() and GdkTrapezoid struct
- Date: Wed, 21 Jul 2010 23:24:56 +0000 (UTC)
commit 30df5edd8033ae1e1b20b31b587ee7182de0177a
Author: Benjamin Otte <otte redhat com>
Date: Wed Jul 14 14:37:23 2010 +0200
API: remove gdk_draw_trapezoids() and GdkTrapezoid struct
docs/reference/gdk/gdk3-sections.txt | 2 -
docs/reference/gdk/tmpl/drawing.sgml | 25 -------------------
gdk/gdk.symbols | 1 -
gdk/gdkdraw.c | 45 ----------------------------------
gdk/gdkdrawable.h | 15 -----------
gdk/gdkpixmap.c | 18 -------------
gdk/gdkwindow.c | 44 ---------------------------------
7 files changed, 0 insertions(+), 150 deletions(-)
---
diff --git a/docs/reference/gdk/gdk3-sections.txt b/docs/reference/gdk/gdk3-sections.txt
index ba398c1..d1bf6fd 100644
--- a/docs/reference/gdk/gdk3-sections.txt
+++ b/docs/reference/gdk/gdk3-sections.txt
@@ -341,8 +341,6 @@ gdk_draw_segments
GdkSegment
gdk_draw_rectangle
gdk_draw_polygon
-gdk_draw_trapezoids
-GdkTrapezoid
gdk_draw_glyphs
gdk_draw_glyphs_transformed
gdk_draw_layout_line
diff --git a/docs/reference/gdk/tmpl/drawing.sgml b/docs/reference/gdk/tmpl/drawing.sgml
index 1ada3dd..3b7b4be 100644
--- a/docs/reference/gdk/tmpl/drawing.sgml
+++ b/docs/reference/gdk/tmpl/drawing.sgml
@@ -219,31 +219,6 @@ function.
@n_points:
-<!-- ##### FUNCTION gdk_draw_trapezoids ##### -->
-<para>
-
-</para>
-
- drawable:
- gc:
- trapezoids:
- n_trapezoids:
-
-
-<!-- ##### STRUCT GdkTrapezoid ##### -->
-<para>
-Specifies a trapezpoid for use by the gdk_draw_trapezoids().
-The trapezoids used here have parallel, horizontal top and
-bottom edges.
-</para>
-
- y1: the y coordinate of the start point.
- x11: the x coordinate of the top left corner
- x21: the x coordinate of the top right corner
- y2: the y coordinate of the end point.
- x12: the x coordinate of the bottom left corner
- x22: the x coordinate of the bottom right corner
-
<!-- ##### FUNCTION gdk_draw_glyphs ##### -->
<para>
diff --git a/gdk/gdk.symbols b/gdk/gdk.symbols
index 0becb4a..51dad0b 100644
--- a/gdk/gdk.symbols
+++ b/gdk/gdk.symbols
@@ -557,7 +557,6 @@ gdk_draw_points
gdk_draw_polygon
gdk_draw_rectangle
gdk_draw_segments
-gdk_draw_trapezoids
#endif
#endif
diff --git a/gdk/gdkdraw.c b/gdk/gdkdraw.c
index 13c5f3e..33181f9 100644
--- a/gdk/gdkdraw.c
+++ b/gdk/gdkdraw.c
@@ -638,51 +638,6 @@ gdk_draw_glyphs_transformed (GdkDrawable *drawable,
x / PANGO_SCALE, y / PANGO_SCALE, glyphs);
}
-/**
- * gdk_draw_trapezoids:
- * @drawable: a #GdkDrawable
- * @gc: a #GdkGC
- * @trapezoids: an array of #GdkTrapezoid structures
- * @n_trapezoids: the number of trapezoids to draw
- *
- * Draws a set of anti-aliased trapezoids. The trapezoids are
- * combined using saturation addition, then drawn over the background
- * as a set. This is low level functionality used internally to implement
- * rotated underlines and backgrouds when rendering a PangoLayout and is
- * likely not useful for applications.
- *
- * Since: 2.6
- **/
-void
-gdk_draw_trapezoids (GdkDrawable *drawable,
- GdkGC *gc,
- const GdkTrapezoid *trapezoids,
- gint n_trapezoids)
-{
- cairo_t *cr;
- int i;
-
- g_return_if_fail (GDK_IS_DRAWABLE (drawable));
- g_return_if_fail (GDK_IS_GC (gc));
- g_return_if_fail (n_trapezoids == 0 || trapezoids != NULL);
-
- cr = gdk_cairo_create (drawable);
- _gdk_gc_update_context (gc, cr, NULL, NULL, TRUE, drawable);
-
- for (i = 0; i < n_trapezoids; i++)
- {
- cairo_move_to (cr, trapezoids[i].x11, trapezoids[i].y1);
- cairo_line_to (cr, trapezoids[i].x21, trapezoids[i].y1);
- cairo_line_to (cr, trapezoids[i].x22, trapezoids[i].y2);
- cairo_line_to (cr, trapezoids[i].x12, trapezoids[i].y2);
- cairo_close_path (cr);
- }
-
- cairo_fill (cr);
-
- cairo_destroy (cr);
-}
-
static GdkDrawable *
gdk_drawable_real_get_composite_drawable (GdkDrawable *drawable,
gint x,
diff --git a/gdk/gdkdrawable.h b/gdk/gdkdrawable.h
index 84a981e..5a94f84 100644
--- a/gdk/gdkdrawable.h
+++ b/gdk/gdkdrawable.h
@@ -40,7 +40,6 @@
G_BEGIN_DECLS
typedef struct _GdkDrawableClass GdkDrawableClass;
-typedef struct _GdkTrapezoid GdkTrapezoid;
#define GDK_TYPE_DRAWABLE (gdk_drawable_get_type ())
#define GDK_DRAWABLE(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), GDK_TYPE_DRAWABLE, GdkDrawable))
@@ -132,10 +131,6 @@ struct _GdkDrawableClass
gint x,
gint y,
PangoGlyphString *glyphs);
- void (*draw_trapezoids) (GdkDrawable *drawable,
- GdkGC *gc,
- GdkTrapezoid *trapezoids,
- gint n_trapezoids);
cairo_surface_t *(*ref_cairo_surface) (GdkDrawable *drawable);
@@ -170,11 +165,6 @@ struct _GdkDrawableClass
void (*_gdk_reserved15) (void);
};
-struct _GdkTrapezoid
-{
- double y1, x11, x21, y2, x12, x22;
-};
-
GType gdk_drawable_get_type (void) G_GNUC_CONST;
/* Manipulation of drawables
@@ -275,11 +265,6 @@ void gdk_draw_glyphs_transformed (GdkDrawable *drawable,
gint x,
gint y,
PangoGlyphString *glyphs);
-void gdk_draw_trapezoids (GdkDrawable *drawable,
- GdkGC *gc,
- const GdkTrapezoid *trapezoids,
- gint n_trapezoids);
-
cairo_region_t *gdk_drawable_get_clip_region (GdkDrawable *drawable);
cairo_region_t *gdk_drawable_get_visible_region (GdkDrawable *drawable);
diff --git a/gdk/gdkpixmap.c b/gdk/gdkpixmap.c
index 264e371..88f6776 100644
--- a/gdk/gdkpixmap.c
+++ b/gdk/gdkpixmap.c
@@ -83,11 +83,6 @@ static void gdk_pixmap_draw_glyphs_transformed (GdkDrawable *drawable,
gint y,
PangoGlyphString *glyphs);
-static void gdk_pixmap_draw_trapezoids (GdkDrawable *drawable,
- GdkGC *gc,
- GdkTrapezoid *trapezoids,
- gint n_trapezoids);
-
static void gdk_pixmap_real_get_size (GdkDrawable *drawable,
gint *width,
gint *height);
@@ -153,7 +148,6 @@ gdk_pixmap_class_init (GdkPixmapObjectClass *klass)
drawable_class->draw_lines = gdk_pixmap_draw_lines;
drawable_class->draw_glyphs = gdk_pixmap_draw_glyphs;
drawable_class->draw_glyphs_transformed = gdk_pixmap_draw_glyphs_transformed;
- drawable_class->draw_trapezoids = gdk_pixmap_draw_trapezoids;
drawable_class->get_depth = gdk_pixmap_real_get_depth;
drawable_class->get_screen = gdk_pixmap_real_get_screen;
drawable_class->get_size = gdk_pixmap_real_get_size;
@@ -351,18 +345,6 @@ gdk_pixmap_draw_glyphs_transformed (GdkDrawable *drawable,
}
static void
-gdk_pixmap_draw_trapezoids (GdkDrawable *drawable,
- GdkGC *gc,
- GdkTrapezoid *trapezoids,
- gint n_trapezoids)
-{
- GdkPixmapObject *private = (GdkPixmapObject *)drawable;
-
- _gdk_gc_remove_drawable_clip (gc);
- gdk_draw_trapezoids (private->impl, gc, trapezoids, n_trapezoids);
-}
-
-static void
gdk_pixmap_real_get_size (GdkDrawable *drawable,
gint *width,
gint *height)
diff --git a/gdk/gdkwindow.c b/gdk/gdkwindow.c
index 07a026c..c8f6868 100644
--- a/gdk/gdkwindow.c
+++ b/gdk/gdkwindow.c
@@ -278,11 +278,6 @@ static void gdk_window_draw_glyphs_transformed (GdkDrawable *drawable,
gint y,
PangoGlyphString *glyphs);
-static void gdk_window_draw_trapezoids (GdkDrawable *drawable,
- GdkGC *gc,
- GdkTrapezoid *trapezoids,
- gint n_trapezoids);
-
static cairo_surface_t *gdk_window_ref_cairo_surface (GdkDrawable *drawable);
static cairo_surface_t *gdk_window_create_cairo_surface (GdkDrawable *drawable,
int width,
@@ -468,7 +463,6 @@ gdk_window_class_init (GdkWindowObjectClass *klass)
drawable_class->draw_lines = gdk_window_draw_lines;
drawable_class->draw_glyphs = gdk_window_draw_glyphs;
drawable_class->draw_glyphs_transformed = gdk_window_draw_glyphs_transformed;
- drawable_class->draw_trapezoids = gdk_window_draw_trapezoids;
drawable_class->get_depth = gdk_window_real_get_depth;
drawable_class->get_screen = gdk_window_real_get_screen;
drawable_class->get_size = gdk_window_real_get_size;
@@ -4871,44 +4865,6 @@ gdk_window_clear_area_e (GdkWindow *window,
}
static void
-gdk_window_draw_trapezoids (GdkDrawable *drawable,
- GdkGC *gc,
- GdkTrapezoid *trapezoids,
- gint n_trapezoids)
-{
- GdkTrapezoid *new_trapezoids = NULL;
-
- if (GDK_WINDOW_DESTROYED (drawable))
- return;
-
- BEGIN_DRAW;
-
- if (x_offset != 0 || y_offset != 0)
- {
- gint i;
-
- new_trapezoids = g_new (GdkTrapezoid, n_trapezoids);
- for (i=0; i < n_trapezoids; i++)
- {
- new_trapezoids[i].y1 = trapezoids[i].y1 - y_offset;
- new_trapezoids[i].x11 = trapezoids[i].x11 - x_offset;
- new_trapezoids[i].x21 = trapezoids[i].x21 - x_offset;
- new_trapezoids[i].y2 = trapezoids[i].y2 - y_offset;
- new_trapezoids[i].x12 = trapezoids[i].x12 - x_offset;
- new_trapezoids[i].x22 = trapezoids[i].x22 - x_offset;
- }
-
- trapezoids = new_trapezoids;
- }
-
- gdk_draw_trapezoids (impl, gc, trapezoids, n_trapezoids);
-
- g_free (new_trapezoids);
-
- END_DRAW;
-}
-
-static void
gdk_window_real_get_size (GdkDrawable *drawable,
gint *width,
gint *height)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]