diff --git a/gdk/gdkcairo.c b/gdk/gdkcairo.c index fec75fb8b5..a1236667dc 100644 --- a/gdk/gdkcairo.c +++ b/gdk/gdkcairo.c @@ -17,7 +17,7 @@ #include "config.h" -#include "gdkcairoprivate.h" +#include "gdkcairo.h" #include "gdkrgba.h" #include "gdktexture.h" @@ -90,7 +90,7 @@ gdk_cairo_region (cairo_t *cr, } } -void +static void gdk_cairo_surface_paint_pixbuf (cairo_surface_t *surface, const GdkPixbuf *pixbuf) { @@ -171,7 +171,7 @@ gdk_cairo_set_source_pixbuf (cairo_t *cr, * * Returns: %TRUE if the extents fit in a `GdkRectangle`, %FALSE if not */ -gboolean +static gboolean _gdk_cairo_surface_extents (cairo_surface_t *surface, GdkRectangle *extents) { @@ -303,38 +303,3 @@ gdk_cairo_region_create_from_surface (cairo_surface_t *surface) return region; } - -cairo_region_t * -gdk_cairo_region_from_clip (cairo_t *cr) -{ - cairo_rectangle_list_t *rectangles; - cairo_region_t *region; - int i; - - rectangles = cairo_copy_clip_rectangle_list (cr); - - if (rectangles->status != CAIRO_STATUS_SUCCESS) - return NULL; - - region = cairo_region_create (); - for (i = 0; i < rectangles->num_rectangles; i++) - { - cairo_rectangle_int_t clip_rect; - cairo_rectangle_t *rect; - - rect = &rectangles->rectangles[i]; - - /* Here we assume clip rects are ints for direct targets, which - is true for cairo */ - clip_rect.x = (int)rect->x; - clip_rect.y = (int)rect->y; - clip_rect.width = (int)rect->width; - clip_rect.height = (int)rect->height; - - cairo_region_union_rectangle (region, &clip_rect); - } - - cairo_rectangle_list_destroy (rectangles); - - return region; -} diff --git a/gdk/gdkcairoprivate.h b/gdk/gdkcairoprivate.h deleted file mode 100644 index 06a9eef9f2..0000000000 --- a/gdk/gdkcairoprivate.h +++ /dev/null @@ -1,37 +0,0 @@ -/* GDK - The GIMP Drawing Kit - * Copyright (C) 2020 Red Hat, Inc. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library. If not, see . - */ - -#pragma once - -#include "gdkcairo.h" - -#include -#include - -G_BEGIN_DECLS - -gboolean _gdk_cairo_surface_extents (cairo_surface_t *surface, - GdkRectangle *extents); - -void gdk_cairo_surface_paint_pixbuf (cairo_surface_t *surface, - const GdkPixbuf *pixbuf); - -cairo_region_t *gdk_cairo_region_from_clip (cairo_t *cr); - - -G_END_DECLS -