]> Pileus Git - ~andy/gtk/blobdiff - docs/reference/gdk/tmpl/regions.sgml
2.9.0
[~andy/gtk] / docs / reference / gdk / tmpl / regions.sgml
index dcb3b89682713b78257e4c0703f9c7787137274d..88c4771142d65708288647f0c36e290dd5d59c8b 100644 (file)
@@ -2,12 +2,12 @@
 Points, Rectangles and Regions
 
 <!-- ##### SECTION Short_Description ##### -->
-simple graphical data types.
+Simple graphical data types
 
 <!-- ##### SECTION Long_Description ##### -->
 <para>
-GDK provides the #GdkPoint, #GdkRectangle and #GdkRegion data types for
-representing pixels and sets of pixels on the screen.
+GDK provides the #GdkPoint, #GdkRectangle, #GdkRegion and #GdkSpan data types
+for representing pixels and sets of pixels on the screen.
 </para>
 <para>
 #GdkPoint is a simple structure containing an x and y coordinate of a point.
@@ -22,17 +22,23 @@ gdk_rectangle_union().
 #GdkRegion is an opaque data type holding a set of arbitrary pixels, and is
 usually used for clipping graphical operations (see gdk_gc_set_clip_region()).
 </para>
+<para>
+#GdkSpan is a structure holding a spanline. A spanline is a horizontal line that
+is one pixel wide. It is mainly used when rasterizing other graphics primitives.
+It can be intersected to regions by using gdk_region_spans_intersect_foreach().
+</para>
 
 <!-- ##### SECTION See_Also ##### -->
 <para>
 
 </para>
 
+<!-- ##### SECTION Stability_Level ##### -->
+
+
 <!-- ##### STRUCT GdkPoint ##### -->
 <para>
 Defines the x and y coordinates of a point.
-Note that both are defined as #gint16 values, so the coordinates are limited
-to between -32,768 and 32,767.
 </para>
 
 @x: the x coordinate of the point.
@@ -50,101 +56,144 @@ Defines the position and size of a rectangle.
 
 <!-- ##### FUNCTION gdk_rectangle_intersect ##### -->
 <para>
-Calculates the intersection of two rectangles.
+
 </para>
 
-@src1: a #GdkRectangle.
-@src2: a #GdkRectangle.
-@dest: the intersection of @src1 and @src2.
-@Returns: TRUE if the rectangles intersect.
+@src1: 
+@src2: 
+@dest: 
+@Returns: 
 
 
 <!-- ##### FUNCTION gdk_rectangle_union ##### -->
 <para>
-Calculates the union of two rectangles.
-The union of rectangles @src1 and @src2 is the smallest rectangle which
-includes both @src1 and @src2 within it.
+
 </para>
 
-@src1: a #GdkRectangle.
-@src2: a #GdkRectangle.
-@dest: the union of @src1 and @src2.
+@src1: 
+@src2: 
+@dest: 
 
 
 <!-- ##### STRUCT GdkRegion ##### -->
 <para>
 A GdkRegion represents a set of pixels on the screen.
-The only user-visible field of the structure is the user_data member, which
-can be used to attach arbitrary data to the #GdkRegion.
 </para>
 
-@user_data: arbitrary data attached to the #GdkRegion.
 
 <!-- ##### FUNCTION gdk_region_new ##### -->
 <para>
-Creates a new empty #GdkRegion.
+
+</para>
+
+@Returns: 
+
+
+<!-- ##### FUNCTION gdk_region_polygon ##### -->
+<para>
+
+</para>
+
+@points: 
+@npoints: 
+@fill_rule: 
+@Returns: 
+
+
+<!-- ##### ENUM GdkFillRule ##### -->
+<para>
+The method for determining which pixels are included in a region, when
+creating a #GdkRegion from a polygon.
+The fill rule is only relevant for polygons which overlap themselves.
 </para>
 
-@Returns: a new empty #GdkRegion.
+@GDK_EVEN_ODD_RULE: areas which are overlapped an odd number of times are
+included in the region, while areas overlapped an even number of times are not.
+@GDK_WINDING_RULE: overlapping areas are always included.
+
+<!-- ##### FUNCTION gdk_region_copy ##### -->
+<para>
+
+</para>
+
+@region: 
+@Returns: 
+
+
+<!-- ##### FUNCTION gdk_region_rectangle ##### -->
+<para>
+
+</para>
+
+@rectangle: 
+@Returns: 
 
 
 <!-- ##### FUNCTION gdk_region_destroy ##### -->
 <para>
-Destroys a #GdkRegion.
+
 </para>
 
-@region: a #GdkRegion.
+@region: 
 
 
 <!-- ##### FUNCTION gdk_region_get_clipbox ##### -->
 <para>
-Returns the smallest rectangle which includes the entire #GdkRegion.
+
+</para>
+
+@region: 
+@rectangle: 
+
+
+<!-- ##### FUNCTION gdk_region_get_rectangles ##### -->
+<para>
+
 </para>
 
-@region: a #GdkRegion.
-@rectangle: returns the smallest rectangle which includes all of @region.
+@region: 
+@rectangles: 
+@n_rectangles: 
 
 
 <!-- ##### FUNCTION gdk_region_empty ##### -->
 <para>
-Returns TRUE if the #GdkRegion is empty.
+
 </para>
 
-@region: a #GdkRegion.
-@Returns: TRUE if @region is empty.
+@region: 
+@Returns: 
 
 
 <!-- ##### FUNCTION gdk_region_equal ##### -->
 <para>
-Returns TRUE if the two regions are the same.
+
 </para>
 
-@region1: a #GdkRegion.
-@region2: a #GdkRegion.
-@Returns: TRUE if @region1 and @region2 are equal.
+@region1: 
+@region2: 
+@Returns: 
 
 
 <!-- ##### FUNCTION gdk_region_point_in ##### -->
 <para>
-Returns TRUE if a point is in a region.
+
 </para>
 
-@region: a #GdkRegion.
-@x: the x coordinate of a point.
-@y: the y coordinate of a point.
-@Returns: TRUE if the point is in @region.
+@region: 
+@x: 
+@y: 
+@Returns: 
 
 
 <!-- ##### FUNCTION gdk_region_rect_in ##### -->
 <para>
-Tests whether a rectangle is within a region.
+
 </para>
 
-@region: a #GdkRegion.
-@rect: a #GdkRectangle.
-@Returns: GDK_OVERLAP_RECTANGLE_IN, GDK_OVERLAP_RECTANGLE_OUT, or
-GDK_OVERLAP_RECTANGLE_PART, depending on whether the rectangle is inside,
-outside, or partly inside the #GdkRegion, respectively.
+@region: 
+@rectangle: 
+@Returns: 
 
 
 <!-- ##### ENUM GdkOverlapType ##### -->
@@ -156,92 +205,98 @@ Specifies the possible values returned by gdk_region_rect_in().
 @GDK_OVERLAP_RECTANGLE_OUT: if the rectangle is outside the #GdkRegion.
 @GDK_OVERLAP_RECTANGLE_PART: if the rectangle is partly inside the #GdkRegion.
 
-<!-- ##### FUNCTION gdk_region_polygon ##### -->
+<!-- ##### FUNCTION gdk_region_offset ##### -->
 <para>
-Creates a new #GdkRegion using the polygon defined by a number of points.
 
 </para>
 
-@points: an array of #GdkPoint structs.
-@npoints: the number of elements in the @points array.
-@fill_rule: specifies which pixels are included in the region when the polygon
-overlaps itself.
-@Returns: a new #GdkRegion based on the given polygon.
+@region: 
+@dx: 
+@dy: 
 
 
-<!-- ##### FUNCTION gdk_region_offset ##### -->
+<!-- ##### FUNCTION gdk_region_shrink ##### -->
+<para>
+
+</para>
+
+@region: 
+@dx: 
+@dy: 
+
+
+<!-- ##### FUNCTION gdk_region_union_with_rect ##### -->
 <para>
-Moves a region.
+
 </para>
 
-@region: a #GdkRegion.
-@dx: the distance to move the region horizontally.
-@dy: the distance to move the region vertically.
+@region: 
+@rect: 
 
 
-<!-- ##### FUNCTION gdk_region_shrink ##### -->
+<!-- ##### FUNCTION gdk_region_intersect ##### -->
 <para>
-Resizes a region.
 </para>
 
-@region: a #GdkRegion.
-@dx: 
-@dy: 
+@source1: 
+@source2: 
 
 
-<!-- ##### FUNCTION gdk_region_union_with_rect ##### -->
+<!-- ##### FUNCTION gdk_region_union ##### -->
 <para>
-Returns the union of a region and a rectangle.
+
 </para>
 
-@region: a #GdkRegion.
-@rect: a #GdkRectangle.
-@Returns: the union of @region and @rect.
+@source1: 
+@source2: 
 
 
-<!-- ##### FUNCTION gdk_regions_intersect ##### -->
+<!-- ##### FUNCTION gdk_region_subtract ##### -->
 <para>
-Returns the intersection of two regions.
 </para>
 
-@source1: a #GdkRegion.
-@source2: a #GdkRegion.
-@Returns: the intersection of @source1 and @source2.
+@source1: 
+@source2: 
 
 
-<!-- ##### FUNCTION gdk_regions_union ##### -->
+<!-- ##### FUNCTION gdk_region_xor ##### -->
 <para>
-Returns the union of two regions.
-This is all pixels in either of @source1 or @source2.
 </para>
 
-@source1: a #GdkRegion.
-@source2: a #GdkRegion.
-@Returns: the union of @source1 and @source2.
+@source1: 
+@source2: 
+
 
+<!-- ##### STRUCT GdkSpan ##### -->
+<para>
+A GdkSpan represents a horizontal line of pixels starting
+at the pixel with coordinates @x, @y and ending before @x + @width, @y.
+</para>
 
-<!-- ##### FUNCTION gdk_regions_subtract ##### -->
+@x: x coordinate of the first pixel.
+@y: y coordinate of the first pixel.
+@width: number of pixels in the span.
+
+<!-- ##### USER_FUNCTION GdkSpanFunc ##### -->
 <para>
-Subtracts one region from another.
-The result is a region containing all the pixels which are in @source1, but
-which are not in @source2.
+This defines the type of the function passed to 
+gdk_region_spans_intersect_foreach(). 
 </para>
 
-@source1: a #GdkRegion.
-@source2: a #GdkRegion to subtract from @source1.
-@Returns: @source1 - @source2.
+@span: a #GdkSpan.
+@data: the user data passed to gdk_region_spans_intersect_foreach().
 
 
-<!-- ##### FUNCTION gdk_regions_xor ##### -->
+<!-- ##### FUNCTION gdk_region_spans_intersect_foreach ##### -->
 <para>
-Returns the difference between the union and the intersection of two regions.
-This is a region containing the pixels that are in one of the source regions,
-but which are not in both.
+
 </para>
 
-@source1: a #GdkRegion.
-@source2: a #GdkRegion.
-@Returns: the difference between the union and the intersection of @source1
-and @source2.
+@region: 
+@spans: 
+@n_spans: 
+@sorted: 
+@function: 
+@data: