Ardour  9.0-pre0-582-g084a23a80d
gdkregion.h
Go to the documentation of this file.
1 /* GDK - The GIMP Drawing Kit
2  * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
3  *
4  * This library is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU Lesser General Public
6  * License as published by the Free Software Foundation; either
7  * version 2 of the License, or (at your option) any later version.
8  *
9  * This library is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12  * Lesser General Public License for more details.
13  *
14  * You should have received a copy of the GNU Lesser General Public
15  * License along with this library; if not, write to the
16  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
17  * Boston, MA 02111-1307, USA.
18  */
19 
20 /*
21  * Modified by the GTK+ Team and others 1997-2000. See the AUTHORS
22  * file for a list of people on the GTK+ Team. See the ChangeLog
23  * files for a list of changes. These files are distributed with
24  * GTK+ at ftp://ftp.gtk.org/pub/gtk/.
25  */
26 
27 #ifndef __GDK_REGION_H__
28 #define __GDK_REGION_H__
29 
30 #if defined(GTK_DISABLE_SINGLE_INCLUDES) && !defined (__GDK_H_INSIDE__) && !defined (GDK_COMPILATION)
31 #error "Only <gdk/gdk.h> can be included directly."
32 #endif
33 
34 #include <gdk/gdktypes.h>
35 
36 G_BEGIN_DECLS
37 
38 #ifndef GDK_DISABLE_DEPRECATED
39 /* GC fill rule for polygons
40  * EvenOddRule
41  * WindingRule
42  */
43 typedef enum
44 {
48 #endif
49 
50 /* Types of overlapping between a rectangle and a region
51  * GDK_OVERLAP_RECTANGLE_IN: rectangle is in region
52  * GDK_OVERLAP_RECTANGLE_OUT: rectangle in not in region
53  * GDK_OVERLAP_RECTANGLE_PART: rectangle in partially in region
54  */
55 typedef enum
56 {
61 
62 #ifndef GDK_DISABLE_DEPRECATED
63 typedef void (* GdkSpanFunc) (GdkSpan *span,
64  gpointer data);
65 #endif
66 
68 #ifndef GDK_DISABLE_DEPRECATED
70  gint n_points,
71  GdkFillRule fill_rule);
72 #endif
76 
80  GdkRectangle **rectangles,
81  gint *n_rectangles);
82 
83 gboolean gdk_region_empty (const GdkRegion *region);
84 gboolean gdk_region_equal (const GdkRegion *region1,
85  const GdkRegion *region2);
86 #ifndef GDK_DISABLE_DEPRECATED
88  const GdkRectangle *rectangle);
89 #endif
91  int x,
92  int y);
94  const GdkRectangle *rectangle);
95 
97  gint dx,
98  gint dy);
99 #ifndef GDK_DISABLE_DEPRECATED
101  gint dx,
102  gint dy);
103 #endif
105  const GdkRectangle *rect);
107  const GdkRegion *source2);
109  const GdkRegion *source2);
111  const GdkRegion *source2);
112 void gdk_region_xor (GdkRegion *source1,
113  const GdkRegion *source2);
114 
115 #ifndef GDK_DISABLE_DEPRECATED
117  const GdkSpan *spans,
118  int n_spans,
119  gboolean sorted,
120  GdkSpanFunc function,
121  gpointer data);
122 #endif
123 
124 G_END_DECLS
125 
126 #endif /* __GDK_REGION_H__ */
127 
void gdk_region_offset(GdkRegion *region, gint dx, gint dy)
gboolean gdk_region_empty(const GdkRegion *region)
void gdk_region_intersect(GdkRegion *source1, const GdkRegion *source2)
void(* GdkSpanFunc)(GdkSpan *span, gpointer data)
Definition: gdkregion.h:63
GdkRegion * gdk_region_copy(const GdkRegion *region)
void gdk_region_subtract(GdkRegion *source1, const GdkRegion *source2)
void gdk_region_union_with_rect(GdkRegion *region, const GdkRectangle *rect)
GdkOverlapType gdk_region_rect_in(const GdkRegion *region, const GdkRectangle *rectangle)
void gdk_region_get_rectangles(const GdkRegion *region, GdkRectangle **rectangles, gint *n_rectangles)
GdkRegion * gdk_region_rectangle(const GdkRectangle *rectangle)
void gdk_region_shrink(GdkRegion *region, gint dx, gint dy)
void gdk_region_xor(GdkRegion *source1, const GdkRegion *source2)
void gdk_region_spans_intersect_foreach(GdkRegion *region, const GdkSpan *spans, int n_spans, gboolean sorted, GdkSpanFunc function, gpointer data)
GdkOverlapType
Definition: gdkregion.h:56
@ GDK_OVERLAP_RECTANGLE_OUT
Definition: gdkregion.h:58
@ GDK_OVERLAP_RECTANGLE_PART
Definition: gdkregion.h:59
@ GDK_OVERLAP_RECTANGLE_IN
Definition: gdkregion.h:57
gboolean gdk_region_rect_equal(const GdkRegion *region, const GdkRectangle *rectangle)
GdkRegion * gdk_region_new(void)
void gdk_region_destroy(GdkRegion *region)
void gdk_region_get_clipbox(const GdkRegion *region, GdkRectangle *rectangle)
void gdk_region_union(GdkRegion *source1, const GdkRegion *source2)
GdkFillRule
Definition: gdkregion.h:44
@ GDK_EVEN_ODD_RULE
Definition: gdkregion.h:45
@ GDK_WINDING_RULE
Definition: gdkregion.h:46
gboolean gdk_region_equal(const GdkRegion *region1, const GdkRegion *region2)
gboolean gdk_region_point_in(const GdkRegion *region, int x, int y)
GdkRegion * gdk_region_polygon(const GdkPoint *points, gint n_points, GdkFillRule fill_rule)
typedefG_BEGIN_DECLS struct _GdkPoint GdkPoint
Definition: gdktypes.h:68
PBD::PropertyDescriptor< bool > region
void rectangle(Cairo::RefPtr< Cairo::Context > context, double x, double y, double w, double h, double r=10)