summaryrefslogtreecommitdiff
path: root/gdk/directfb
diff options
context:
space:
mode:
authorBenjamin Otte <otte@redhat.com>2010-07-17 04:50:49 +0200
committerBenjamin Otte <otte@redhat.com>2010-08-10 21:02:28 +0200
commit600fbd3e740f72a010ecf84780b07927f08d743f (patch)
tree2c255b9c069c390bb6dcc691ccd1e28443f3e49d /gdk/directfb
parent66048b2f92d000f426b40d54aa1f9267b2165b9b (diff)
downloadgtk+-600fbd3e740f72a010ecf84780b07927f08d743f.tar.gz
API: remove gdk_draw_rectangle()
Diffstat (limited to 'gdk/directfb')
-rw-r--r--gdk/directfb/gdkdrawable-directfb.c153
1 files changed, 0 insertions, 153 deletions
diff --git a/gdk/directfb/gdkdrawable-directfb.c b/gdk/directfb/gdkdrawable-directfb.c
index 238e92e08e..0879c5b0fb 100644
--- a/gdk/directfb/gdkdrawable-directfb.c
+++ b/gdk/directfb/gdkdrawable-directfb.c
@@ -398,158 +398,6 @@ gdk_directfb_setup_for_drawing (GdkDrawableImplDirectFB *impl,
}
static void
-gdk_directfb_draw_rectangle (GdkDrawable *drawable,
- GdkGC *gc,
- gint filled,
- gint x,
- gint y,
- gint width,
- gint height)
-{
- GdkDrawableImplDirectFB *impl;
- cairo_region_t clip;
- GdkGCDirectFB *gc_private = NULL;
- IDirectFBSurface *surface = NULL;
- gint i;
-
- g_return_if_fail (GDK_IS_DRAWABLE (drawable));
-
- D_DEBUG_AT( GDKDFB_Drawable, "%s( %p, %p, %s, %4d,%4d - %4dx%4d )\n", G_STRFUNC,
- drawable, gc, filled ? " filled" : "outline", x, y, width, height );
-
- impl = GDK_DRAWABLE_IMPL_DIRECTFB (drawable);
-
- if (!impl->surface)
- return;
-
- if (gc)
- gc_private = GDK_GC_DIRECTFB (gc);
-
- if (gc_private)
- {
- if (gdk_directfb_enable_color_keying &&
- (gc_private->values.foreground.red >> 8) == gdk_directfb_bg_color_key.r &&
- (gc_private->values.foreground.green >> 8) == gdk_directfb_bg_color_key.g &&
- (gc_private->values.foreground.blue >> 8) == gdk_directfb_bg_color_key.b)
- {
- if (DFB_PIXELFORMAT_IS_INDEXED (impl->format))
- impl->surface->SetColorIndex (impl->surface, 255);
- else
- impl->surface->SetColor (impl->surface,
- gdk_directfb_bg_color.r,
- gdk_directfb_bg_color.g,
- gdk_directfb_bg_color.b,
- gdk_directfb_bg_color.a);
- }
- else
- {
- if (!gdk_directfb_setup_for_drawing (impl, gc_private)){
- return;
- }
- }
- }
- else
- {
- GdkWindowObject *win = GDK_WINDOW_OBJECT (impl->wrapper);
-
- if (gdk_directfb_enable_color_keying)
- {
- if (DFB_PIXELFORMAT_IS_INDEXED (impl->format))
- impl->surface->SetColorIndex (impl->surface, 255);
- else
- impl->surface->SetColor (impl->surface,
- gdk_directfb_bg_color.r,
- gdk_directfb_bg_color.b,
- gdk_directfb_bg_color.g,
- gdk_directfb_bg_color.a);
- }
- else
- {
- gdk_directfb_set_color (impl, &win->bg_color, 0xFF);
- }
- }
-
- if (filled)
- {
- GdkRectangle rect = { x, y, width, height };
-
- gdk_directfb_clip_region (drawable, gc, &rect, &clip);
-
- if (gc_private && gc_private->values_mask & GDK_GC_FILL)
- {
- if (gc_private->values.fill == GDK_STIPPLED &&
- gc_private->values_mask & GDK_GC_STIPPLE &&
- gc_private->values.stipple)
- {
- surface = GDK_DRAWABLE_IMPL_DIRECTFB (GDK_PIXMAP_OBJECT (gc_private->values.stipple)->impl)->surface;
-
- if (surface)
- impl->surface->SetBlittingFlags (impl->surface,
- (DSBLIT_BLEND_ALPHACHANNEL |
- DSBLIT_COLORIZE));
- }
- else if (gc_private->values.fill == GDK_TILED &&
- gc_private->values_mask & GDK_GC_TILE &&
- gc_private->values.tile)
- {
- surface = GDK_DRAWABLE_IMPL_DIRECTFB (GDK_PIXMAP_OBJECT (gc_private->values.tile)->impl)->surface;
-
- impl->surface->SetBlittingFlags (impl->surface, DSBLIT_NOFX);
- }
- }
-
- if (surface)
- {
- if (gc_private->values_mask & GDK_GC_TS_X_ORIGIN)
- x = gc_private->values.ts_x_origin;
- if (gc_private->values_mask & GDK_GC_TS_Y_ORIGIN)
- y = gc_private->values.ts_y_origin;
-
- for (i = 0; i < clip.numRects; i++)
- {
- DFBRegion reg = { clip.rects[i].x1, clip.rects[i].y1,
- clip.rects[i].x2, clip.rects[i].y2 };
-
- impl->surface->SetClip (impl->surface, &reg);
- impl->surface->TileBlit (impl->surface, surface, NULL, x, y);
- }
- }
- else /* normal rectangle filling */
- {
- DFBRectangle rects[clip.numRects];
-
- impl->surface->SetClip (impl->surface, NULL);
-
- for (i = 0; i < clip.numRects; i++)
- {
- cairo_region_tBox *box = &clip.rects[i];
-
- rects[i].x = box->x1;
- rects[i].y = box->y1;
- rects[i].w = box->x2 - box->x1;
- rects[i].h = box->y2 - box->y1;
- }
-
- impl->surface->FillRectangles(impl->surface, rects, clip.numRects);
- }
-
- temp_region_deinit( &clip );
- }
- else
- {
-
- DFBRegion region = { x, y, x + width, y + height };
- 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 , height);
- }
-}
-
-static void
gdk_directfb_draw_drawable (GdkDrawable *drawable,
GdkGC *gc,
GdkDrawable *src,
@@ -701,7 +549,6 @@ gdk_drawable_impl_directfb_class_init (GdkDrawableImplDirectFBClass *klass)
object_class->finalize = gdk_drawable_impl_directfb_finalize;
drawable_class->create_gc = _gdk_directfb_gc_new;
- drawable_class->draw_rectangle = gdk_directfb_draw_rectangle;
drawable_class->draw_drawable = gdk_directfb_draw_drawable;
drawable_class->ref_cairo_surface = gdk_directfb_ref_cairo_surface;