gtk/docs/reference/gdk/tmpl/regions.sgml

73 lines
1.5 KiB
Plaintext
Raw Normal View History

1999-08-16 18:51:52 +00:00
<!-- ##### SECTION Title ##### -->
Points and Rectangles
1999-08-16 18:51:52 +00:00
<!-- ##### SECTION Short_Description ##### -->
Simple graphical data types
1999-08-16 18:51:52 +00:00
<!-- ##### SECTION Long_Description ##### -->
<para>
GDK provides the #GdkPoint and #GdkRectangle data types for representing pixels
and sets of pixels on the screen. Together with Cairo's #cairo_region_t data
type, they make up the central types for representing graphical data.
</para>
<para>
#GdkPoint is a simple structure containing an x and y coordinate of a point.
</para>
<para>
#GdkRectangle is a structure holding the position and size of a rectangle.
The intersection of two rectangles can be computed with
gdk_rectangle_intersect(). To find the union of two rectangles use
gdk_rectangle_union().
</para>
<para>
#cairo_region_t is usually used for managing clipping of graphical operations.
i2000-11-22 Alexander Larsson <alexl@redhat.com> * gdk/gdktypes.h: Add new type GdkSpan * docs/reference/gdk/gdk-sections.txt, docs/reference/gdk/tmpl/regions.sgml, gdk/gdkregion-generic.c, gdk/gdkregion.h: Implement and document gdk_region_spans_intersect_foreach. * gdk/linux-fb/Makefile.am, gdk/linux-fb/gdkrender-fb.c: Add new file gdkrender-fb.c which contains all core rendering code. Add gdk_fb_fill_rectangle_generic (old rectangle code) and gdk_fb_fill_rectangle_simple_16, gdk_fb_fill_rectangle_simple_32 (optimized rectangle fillers). * gdk/linux-fb/gdkdrawable-fb2.c: Move all rendering code to gdkrender-fb.c. Change from using GdkRectangles and GdkSegments for spans to GdkSpan. Use the new span intersection functions in gdk_fb_fill_spans. gdk_fb_draw_rectangle() clips filled rectangles and calls gc->fill_rectangle with the result. gdk_fb_fill_spans() gets extra argument "sorted". * gdk/linux-fb/gdkevents-fb.c: Remove unused includes and defines. New function gdk_fb_get_time() to get correct time for events. * gdk/linux-fb/gdkinput-ps2.c: Use gdk method of generating multiple-clicks (gdk_event_button_generate) Make sure to set the time of all events. * gdk/linux-fb/gdkmain-fb.c: Use gdk_fb_get_time (). * gdk/linux-fb/gdkprivate-fb.h: New virtual GC calls: fill_span & fill_rectangle. Export gdk_fb_get_time(). gdk_fb_fill_spans() gets extra argument "sorted". * gdk/linux-fb/mi*.c: Use GdkSpan instead of GdkRectangle. Pass correct sorted to gdk_fb_fill_spans. (sorted value taken from XFree 4 source)
2000-11-22 10:07:34 +00:00
</para>
1999-08-16 18:51:52 +00:00
<!-- ##### SECTION See_Also ##### -->
<para>
</para>
2005-06-20 22:06:27 +00:00
<!-- ##### SECTION Stability_Level ##### -->
<!-- ##### SECTION Image ##### -->
1999-08-16 18:51:52 +00:00
<!-- ##### STRUCT GdkPoint ##### -->
<para>
Defines the x and y coordinates of a point.
1999-08-16 18:51:52 +00:00
</para>
@x: the x coordinate of the point.
@y: the y coordinate of the point.
1999-08-16 18:51:52 +00:00
<!-- ##### TYPEDEF GdkRectangle ##### -->
1999-08-16 18:51:52 +00:00
<para>
Defines the position and size of a rectangle. It is identical to
#cairo_rectangle_int_t.
1999-08-16 18:51:52 +00:00
</para>
<!-- ##### FUNCTION gdk_rectangle_intersect ##### -->
<para>
1999-08-16 18:51:52 +00:00
</para>
@src1:
@src2:
@dest:
@Returns:
1999-08-16 18:51:52 +00:00
<!-- ##### FUNCTION gdk_rectangle_union ##### -->
<para>
1999-08-16 18:51:52 +00:00
</para>
2006-05-05 16:21:19 +00:00
@src1:
@src2:
@dest:
1999-08-16 18:51:52 +00:00