API: remove gdk_draw_trapezoids() and GdkTrapezoid struct

This commit is contained in:
Benjamin Otte 2010-07-14 14:37:23 +02:00
parent 559ae63f01
commit 92f4882497
7 changed files with 0 additions and 150 deletions

View File

@ -342,8 +342,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

View File

@ -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>

View File

@ -559,7 +559,6 @@ gdk_draw_points
gdk_draw_polygon
gdk_draw_rectangle
gdk_draw_segments
gdk_draw_trapezoids
#endif
#endif

View File

@ -637,51 +637,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,

View File

@ -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);

View File

@ -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;
@ -350,18 +344,6 @@ gdk_pixmap_draw_glyphs_transformed (GdkDrawable *drawable,
gdk_draw_glyphs_transformed (private->impl, gc, matrix, font, x, y, glyphs);
}
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,

View File

@ -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;
@ -4762,44 +4756,6 @@ gdk_window_clear_area_e (GdkWindow *window,
TRUE);
}
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,