[cairo-commit] 2 commits - doc/public src/cairo-surface-subsurface.c
Chris Wilson
ickle at kemper.freedesktop.org
Fri May 7 03:40:49 PDT 2010
doc/public/tmpl/cairo-font-face.sgml | 3 +++
doc/public/tmpl/cairo-font-options.sgml | 4 ++++
doc/public/tmpl/cairo-ft.sgml | 3 +++
doc/public/tmpl/cairo-image.sgml | 5 +++++
doc/public/tmpl/cairo-matrix.sgml | 3 +++
doc/public/tmpl/cairo-paths.sgml | 3 +++
doc/public/tmpl/cairo-pattern.sgml | 3 +++
doc/public/tmpl/cairo-pdf.sgml | 3 +++
doc/public/tmpl/cairo-png.sgml | 3 +++
doc/public/tmpl/cairo-ps.sgml | 3 +++
doc/public/tmpl/cairo-quartz-fonts.sgml | 3 +++
doc/public/tmpl/cairo-quartz.sgml | 3 +++
doc/public/tmpl/cairo-scaled-font.sgml | 3 +++
doc/public/tmpl/cairo-status.sgml | 6 ++++++
doc/public/tmpl/cairo-surface.sgml | 9 +++++++++
doc/public/tmpl/cairo-svg.sgml | 3 +++
doc/public/tmpl/cairo-text.sgml | 3 +++
doc/public/tmpl/cairo-transforms.sgml | 3 +++
doc/public/tmpl/cairo-types.sgml | 3 +++
doc/public/tmpl/cairo-user-fonts.sgml | 4 ++++
doc/public/tmpl/cairo-version.sgml | 5 +++++
doc/public/tmpl/cairo-win32-fonts.sgml | 3 +++
doc/public/tmpl/cairo-win32.sgml | 3 +++
doc/public/tmpl/cairo-xlib-xrender.sgml | 3 +++
doc/public/tmpl/cairo-xlib.sgml | 3 +++
doc/public/tmpl/cairo.sgml | 3 +++
src/cairo-surface-subsurface.c | 10 ++++++++--
27 files changed, 101 insertions(+), 2 deletions(-)
New commits:
commit c5d9643417690380c102bf0b6ad195cb264d3feb
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date: Fri May 7 11:24:28 2010 +0100
doc: regen
diff --git a/doc/public/tmpl/cairo-font-face.sgml b/doc/public/tmpl/cairo-font-face.sgml
index 1bb686d..e3c1689 100644
--- a/doc/public/tmpl/cairo-font-face.sgml
+++ b/doc/public/tmpl/cairo-font-face.sgml
@@ -28,6 +28,9 @@ cairo_get_font_face().
<!-- ##### SECTION Stability_Level ##### -->
+<!-- ##### SECTION Image ##### -->
+
+
<!-- ##### TYPEDEF cairo_font_face_t ##### -->
<para>
diff --git a/doc/public/tmpl/cairo-font-options.sgml b/doc/public/tmpl/cairo-font-options.sgml
index 501abf4..b0743fb 100644
--- a/doc/public/tmpl/cairo-font-options.sgml
+++ b/doc/public/tmpl/cairo-font-options.sgml
@@ -22,6 +22,9 @@ output on a particular display.
<!-- ##### SECTION Stability_Level ##### -->
+<!-- ##### SECTION Image ##### -->
+
+
<!-- ##### TYPEDEF cairo_font_options_t ##### -->
<para>
@@ -33,6 +36,7 @@ output on a particular display.
</para>
+ at void:
@Returns:
diff --git a/doc/public/tmpl/cairo-ft.sgml b/doc/public/tmpl/cairo-ft.sgml
index 307d632..66a4727 100644
--- a/doc/public/tmpl/cairo-ft.sgml
+++ b/doc/public/tmpl/cairo-ft.sgml
@@ -20,6 +20,9 @@ systems, but can be used on other platforms too.
<!-- ##### SECTION Stability_Level ##### -->
+<!-- ##### SECTION Image ##### -->
+
+
<!-- ##### MACRO CAIRO_HAS_FT_FONT ##### -->
<para>
Defined if the FreeType font backend is available.
diff --git a/doc/public/tmpl/cairo-image.sgml b/doc/public/tmpl/cairo-image.sgml
index 0cfcd87..68988f4 100644
--- a/doc/public/tmpl/cairo-image.sgml
+++ b/doc/public/tmpl/cairo-image.sgml
@@ -21,6 +21,9 @@ image formats are those defined in #cairo_format_t.
<!-- ##### SECTION Stability_Level ##### -->
+<!-- ##### SECTION Image ##### -->
+
+
<!-- ##### MACRO CAIRO_HAS_IMAGE_SURFACE ##### -->
<para>
Defined if the image surface backend is available.
@@ -36,10 +39,12 @@ This macro was added for completeness in cairo 1.8.
</para>
+ at CAIRO_FORMAT_INVALID:
@CAIRO_FORMAT_ARGB32:
@CAIRO_FORMAT_RGB24:
@CAIRO_FORMAT_A8:
@CAIRO_FORMAT_A1:
+ at CAIRO_FORMAT_RGB16_565:
<!-- ##### FUNCTION cairo_format_stride_for_width ##### -->
<para>
diff --git a/doc/public/tmpl/cairo-matrix.sgml b/doc/public/tmpl/cairo-matrix.sgml
index 720cdac..0923247 100644
--- a/doc/public/tmpl/cairo-matrix.sgml
+++ b/doc/public/tmpl/cairo-matrix.sgml
@@ -33,6 +33,9 @@ Generic matrix operations
<!-- ##### SECTION Stability_Level ##### -->
+<!-- ##### SECTION Image ##### -->
+
+
<!-- ##### STRUCT cairo_matrix_t ##### -->
<para>
diff --git a/doc/public/tmpl/cairo-paths.sgml b/doc/public/tmpl/cairo-paths.sgml
index 1c776b7..0bffa29 100644
--- a/doc/public/tmpl/cairo-paths.sgml
+++ b/doc/public/tmpl/cairo-paths.sgml
@@ -18,6 +18,9 @@ generate simple masks.
<!-- ##### SECTION Stability_Level ##### -->
+<!-- ##### SECTION Image ##### -->
+
+
<!-- ##### STRUCT cairo_path_t ##### -->
<para>
diff --git a/doc/public/tmpl/cairo-pattern.sgml b/doc/public/tmpl/cairo-pattern.sgml
index adcff66..b6c2cd5 100644
--- a/doc/public/tmpl/cairo-pattern.sgml
+++ b/doc/public/tmpl/cairo-pattern.sgml
@@ -28,6 +28,9 @@ cairo_set_source_<emphasis>type</emphasis>() functions.
<!-- ##### SECTION Stability_Level ##### -->
+<!-- ##### SECTION Image ##### -->
+
+
<!-- ##### TYPEDEF cairo_pattern_t ##### -->
<para>
diff --git a/doc/public/tmpl/cairo-pdf.sgml b/doc/public/tmpl/cairo-pdf.sgml
index 4174109..9cc3a6e 100644
--- a/doc/public/tmpl/cairo-pdf.sgml
+++ b/doc/public/tmpl/cairo-pdf.sgml
@@ -20,6 +20,9 @@ PDF files and is a multi-page vector surface backend.
<!-- ##### SECTION Stability_Level ##### -->
+<!-- ##### SECTION Image ##### -->
+
+
<!-- ##### MACRO CAIRO_HAS_PDF_SURFACE ##### -->
<para>
Defined if the PDF surface backend is available.
diff --git a/doc/public/tmpl/cairo-png.sgml b/doc/public/tmpl/cairo-png.sgml
index ef52dce..c65c3fc 100644
--- a/doc/public/tmpl/cairo-png.sgml
+++ b/doc/public/tmpl/cairo-png.sgml
@@ -20,6 +20,9 @@ any surface to a PNG file.
<!-- ##### SECTION Stability_Level ##### -->
+<!-- ##### SECTION Image ##### -->
+
+
<!-- ##### MACRO CAIRO_HAS_PNG_FUNCTIONS ##### -->
<para>
Defined if the PNG functions are available.
diff --git a/doc/public/tmpl/cairo-ps.sgml b/doc/public/tmpl/cairo-ps.sgml
index b6bc3ff..ac8f351 100644
--- a/doc/public/tmpl/cairo-ps.sgml
+++ b/doc/public/tmpl/cairo-ps.sgml
@@ -20,6 +20,9 @@ PostScript files and is a multi-page vector surface backend.
<!-- ##### SECTION Stability_Level ##### -->
+<!-- ##### SECTION Image ##### -->
+
+
<!-- ##### MACRO CAIRO_HAS_PS_SURFACE ##### -->
<para>
Defined if the PostScript surface backend is available.
diff --git a/doc/public/tmpl/cairo-quartz-fonts.sgml b/doc/public/tmpl/cairo-quartz-fonts.sgml
index 0c6a73f..4fcd429 100644
--- a/doc/public/tmpl/cairo-quartz-fonts.sgml
+++ b/doc/public/tmpl/cairo-quartz-fonts.sgml
@@ -21,6 +21,9 @@ implementation of the font backend methods.
<!-- ##### SECTION Stability_Level ##### -->
+<!-- ##### SECTION Image ##### -->
+
+
<!-- ##### MACRO CAIRO_HAS_QUARTZ_FONT ##### -->
<para>
Defined if the Quartz font backend is available.
diff --git a/doc/public/tmpl/cairo-quartz.sgml b/doc/public/tmpl/cairo-quartz.sgml
index bd3d768..4ece817 100644
--- a/doc/public/tmpl/cairo-quartz.sgml
+++ b/doc/public/tmpl/cairo-quartz.sgml
@@ -20,6 +20,9 @@ Apple OS X Quartz rendering system.
<!-- ##### SECTION Stability_Level ##### -->
+<!-- ##### SECTION Image ##### -->
+
+
<!-- ##### MACRO CAIRO_HAS_QUARTZ_SURFACE ##### -->
<para>
Defined if the Quartz surface backend is available.
diff --git a/doc/public/tmpl/cairo-scaled-font.sgml b/doc/public/tmpl/cairo-scaled-font.sgml
index 0a0599a..9dd8c19 100644
--- a/doc/public/tmpl/cairo-scaled-font.sgml
+++ b/doc/public/tmpl/cairo-scaled-font.sgml
@@ -22,6 +22,9 @@ size and transformation and a certain set of font options.
<!-- ##### SECTION Stability_Level ##### -->
+<!-- ##### SECTION Image ##### -->
+
+
<!-- ##### TYPEDEF cairo_scaled_font_t ##### -->
<para>
diff --git a/doc/public/tmpl/cairo-status.sgml b/doc/public/tmpl/cairo-status.sgml
index aed8aa6..fee00c8 100644
--- a/doc/public/tmpl/cairo-status.sgml
+++ b/doc/public/tmpl/cairo-status.sgml
@@ -33,6 +33,9 @@ code is required before or after each individual cairo function call.
<!-- ##### SECTION Stability_Level ##### -->
+<!-- ##### SECTION Image ##### -->
+
+
<!-- ##### ENUM cairo_status_t ##### -->
<para>
@@ -72,6 +75,8 @@ code is required before or after each individual cairo function call.
@CAIRO_STATUS_INVALID_WEIGHT:
@CAIRO_STATUS_INVALID_SIZE:
@CAIRO_STATUS_USER_FONT_NOT_IMPLEMENTED:
+ at CAIRO_STATUS_DEVICE_TYPE_MISMATCH:
+ at CAIRO_STATUS_DEVICE_ERROR:
@CAIRO_STATUS_LAST_STATUS:
<!-- ##### FUNCTION cairo_status_to_string ##### -->
@@ -88,5 +93,6 @@ code is required before or after each individual cairo function call.
</para>
+ at void:
diff --git a/doc/public/tmpl/cairo-surface.sgml b/doc/public/tmpl/cairo-surface.sgml
index c1445f7..645b38b 100644
--- a/doc/public/tmpl/cairo-surface.sgml
+++ b/doc/public/tmpl/cairo-surface.sgml
@@ -27,6 +27,9 @@ cairo_<emphasis>backend</emphasis>_surface_create().
<!-- ##### SECTION Stability_Level ##### -->
+<!-- ##### SECTION Image ##### -->
+
+
<!-- ##### MACRO CAIRO_MIME_TYPE_JP2 ##### -->
<para>
The Joint Photographic Experts Group (JPEG) 2000 image coding standard (ISO/IEC 15444-1). Since 1.10
@@ -224,6 +227,12 @@ URI for an image file (unofficial MIME type). Since 1.10
@CAIRO_SURFACE_TYPE_SCRIPT:
@CAIRO_SURFACE_TYPE_QT:
@CAIRO_SURFACE_TYPE_RECORDING:
+ at CAIRO_SURFACE_TYPE_VG:
+ at CAIRO_SURFACE_TYPE_GL:
+ at CAIRO_SURFACE_TYPE_DRM:
+ at CAIRO_SURFACE_TYPE_TEE:
+ at CAIRO_SURFACE_TYPE_XML:
+ at CAIRO_SURFACE_TYPE_SKIA:
<!-- ##### FUNCTION cairo_surface_get_type ##### -->
<para>
diff --git a/doc/public/tmpl/cairo-svg.sgml b/doc/public/tmpl/cairo-svg.sgml
index 09b413d..ae7baf6 100644
--- a/doc/public/tmpl/cairo-svg.sgml
+++ b/doc/public/tmpl/cairo-svg.sgml
@@ -20,6 +20,9 @@ SVG files and is a multi-page vector surface backend.
<!-- ##### SECTION Stability_Level ##### -->
+<!-- ##### SECTION Image ##### -->
+
+
<!-- ##### MACRO CAIRO_HAS_SVG_SURFACE ##### -->
<para>
Defined if the SVG surface backend is available.
diff --git a/doc/public/tmpl/cairo-text.sgml b/doc/public/tmpl/cairo-text.sgml
index 24e264b..caeb3c0 100644
--- a/doc/public/tmpl/cairo-text.sgml
+++ b/doc/public/tmpl/cairo-text.sgml
@@ -45,6 +45,9 @@ Cairo has two sets of text rendering capabilities:
<!-- ##### SECTION Stability_Level ##### -->
+<!-- ##### SECTION Image ##### -->
+
+
<!-- ##### STRUCT cairo_glyph_t ##### -->
<para>
diff --git a/doc/public/tmpl/cairo-transforms.sgml b/doc/public/tmpl/cairo-transforms.sgml
index 60c8ad9..95f887d 100644
--- a/doc/public/tmpl/cairo-transforms.sgml
+++ b/doc/public/tmpl/cairo-transforms.sgml
@@ -23,6 +23,9 @@ space</firstterm>.
<!-- ##### SECTION Stability_Level ##### -->
+<!-- ##### SECTION Image ##### -->
+
+
<!-- ##### FUNCTION cairo_translate ##### -->
<para>
diff --git a/doc/public/tmpl/cairo-types.sgml b/doc/public/tmpl/cairo-types.sgml
index e79bc7a..a5c9ecd 100644
--- a/doc/public/tmpl/cairo-types.sgml
+++ b/doc/public/tmpl/cairo-types.sgml
@@ -17,6 +17,9 @@ Generic data types used in the cairo API
<!-- ##### SECTION Stability_Level ##### -->
+<!-- ##### SECTION Image ##### -->
+
+
<!-- ##### TYPEDEF cairo_bool_t ##### -->
<para>
diff --git a/doc/public/tmpl/cairo-user-fonts.sgml b/doc/public/tmpl/cairo-user-fonts.sgml
index 5b6dc58..53b15c9 100644
--- a/doc/public/tmpl/cairo-user-fonts.sgml
+++ b/doc/public/tmpl/cairo-user-fonts.sgml
@@ -22,6 +22,9 @@ other application to draw "funky" fonts.
<!-- ##### SECTION Stability_Level ##### -->
+<!-- ##### SECTION Image ##### -->
+
+
<!-- ##### MACRO CAIRO_HAS_USER_FONT ##### -->
<para>
Defined if the user font backend is available.
@@ -88,6 +91,7 @@ this feature (1.8 and later).
</para>
+ at void:
@Returns:
diff --git a/doc/public/tmpl/cairo-version.sgml b/doc/public/tmpl/cairo-version.sgml
index add8881..79828b8 100644
--- a/doc/public/tmpl/cairo-version.sgml
+++ b/doc/public/tmpl/cairo-version.sgml
@@ -117,6 +117,9 @@ if (cairo_version() >= CAIRO_VERSION_ENCODE(1, 0, 0))
<!-- ##### SECTION Stability_Level ##### -->
+<!-- ##### SECTION Image ##### -->
+
+
<!-- ##### MACRO CAIRO_VERSION ##### -->
<para>
The version of cairo available at compile-time, encoded using
@@ -187,6 +190,7 @@ The parameters to this macro must expand to numerical literals.
</para>
+ at void:
@Returns:
@@ -195,6 +199,7 @@ The parameters to this macro must expand to numerical literals.
</para>
+ at void:
@Returns:
diff --git a/doc/public/tmpl/cairo-win32-fonts.sgml b/doc/public/tmpl/cairo-win32-fonts.sgml
index fd7ef3d..a38b6ce 100644
--- a/doc/public/tmpl/cairo-win32-fonts.sgml
+++ b/doc/public/tmpl/cairo-win32-fonts.sgml
@@ -20,6 +20,9 @@ Microsoft Windows systems.
<!-- ##### SECTION Stability_Level ##### -->
+<!-- ##### SECTION Image ##### -->
+
+
<!-- ##### MACRO CAIRO_HAS_WIN32_FONT ##### -->
<para>
Defined if the Microsoft Windows font backend is available.
diff --git a/doc/public/tmpl/cairo-win32.sgml b/doc/public/tmpl/cairo-win32.sgml
index e7901f8..cd48725 100644
--- a/doc/public/tmpl/cairo-win32.sgml
+++ b/doc/public/tmpl/cairo-win32.sgml
@@ -29,6 +29,9 @@ The surface returned by the other win32 constructors is of surface type
<!-- ##### SECTION Stability_Level ##### -->
+<!-- ##### SECTION Image ##### -->
+
+
<!-- ##### MACRO CAIRO_HAS_WIN32_SURFACE ##### -->
<para>
Defined if the Microsoft Windows surface backend is available.
diff --git a/doc/public/tmpl/cairo-xlib-xrender.sgml b/doc/public/tmpl/cairo-xlib-xrender.sgml
index a92805d..db824a0 100644
--- a/doc/public/tmpl/cairo-xlib-xrender.sgml
+++ b/doc/public/tmpl/cairo-xlib-xrender.sgml
@@ -24,6 +24,9 @@ if it is available.
<!-- ##### SECTION Stability_Level ##### -->
+<!-- ##### SECTION Image ##### -->
+
+
<!-- ##### MACRO CAIRO_HAS_XLIB_XRENDER_SURFACE ##### -->
<para>
Defined if the XLib/XRender surface functions are available.
diff --git a/doc/public/tmpl/cairo-xlib.sgml b/doc/public/tmpl/cairo-xlib.sgml
index 446d4a6..3c28c38 100644
--- a/doc/public/tmpl/cairo-xlib.sgml
+++ b/doc/public/tmpl/cairo-xlib.sgml
@@ -24,6 +24,9 @@ if it is available.
<!-- ##### SECTION Stability_Level ##### -->
+<!-- ##### SECTION Image ##### -->
+
+
<!-- ##### MACRO CAIRO_HAS_XLIB_SURFACE ##### -->
<para>
Defined if the Xlib surface backend is available.
diff --git a/doc/public/tmpl/cairo.sgml b/doc/public/tmpl/cairo.sgml
index 31f9d4e..9c3a023 100644
--- a/doc/public/tmpl/cairo.sgml
+++ b/doc/public/tmpl/cairo.sgml
@@ -29,6 +29,9 @@ The cairo drawing context
<!-- ##### SECTION Stability_Level ##### -->
+<!-- ##### SECTION Image ##### -->
+
+
<!-- ##### TYPEDEF cairo_t ##### -->
<para>
commit b9e9ff59348412a1f1f2c57d6185c84f77874c26
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date: Fri May 7 11:21:50 2010 +0100
subsurface: Include device offset in extents
Adjust the subsurface extents so that the user specifies the extents in
world space rather than device space.
diff --git a/src/cairo-surface-subsurface.c b/src/cairo-surface-subsurface.c
index 079f9ed..90fb16d 100644
--- a/src/cairo-surface-subsurface.c
+++ b/src/cairo-surface-subsurface.c
@@ -491,7 +491,8 @@ cairo_surface_create_for_rectangle (cairo_surface_t *target,
{
cairo_surface_subsurface_t *surface;
cairo_rectangle_int_t target_extents;
- cairo_bool_t is_empty;
+ cairo_bool_t ret;
+ int tx, ty;
if (unlikely (target->status))
return _cairo_surface_create_in_error (target->status);
@@ -513,7 +514,7 @@ cairo_surface_create_for_rectangle (cairo_surface_t *target,
surface->extents.height = floor (y + height) - surface->extents.y;
if (_cairo_surface_get_extents (target, &target_extents))
- is_empty = _cairo_rectangle_intersect (&surface->extents, &target_extents);
+ ret = _cairo_rectangle_intersect (&surface->extents, &target_extents);
if (target->backend->type == CAIRO_INTERNAL_SURFACE_TYPE_SUBSURFACE) {
/* Maintain subsurfaces as 1-depth */
@@ -523,6 +524,11 @@ cairo_surface_create_for_rectangle (cairo_surface_t *target,
target = sub->target;
}
+ ret = _cairo_matrix_is_integer_translation (&target->device_transform, &tx, &ty);
+ assert (ret);
+ surface->extents.x += tx;
+ surface->extents.y += ty;
+
surface->target = cairo_surface_reference (target);
surface->owns_target = FALSE;
More information about the cairo-commit
mailing list