[cairo-commit] 3 commits - ROADMAP src/cairo-ft-font.c src/cairo-surface.c

Carl Worth cworth at kemper.freedesktop.org
Sun Jun 25 01:09:51 PDT 2006


 ROADMAP             |   24 +++++++++++++++---------
 src/cairo-ft-font.c |   16 +---------------
 src/cairo-surface.c |   31 +++++++++++++------------------
 3 files changed, 29 insertions(+), 42 deletions(-)

New commits:
diff-tree 9ab5678e53219f95de7183e300bba3edac7fe72d (from 95355c854f1894e7bbcd370f3bb0d00223c077b6)
Author: Carl Worth <cworth at cworth.org>
Date:   Sun Jun 25 10:02:10 2006 +0200

    Fix bug 7268: Fix coordinate space for _cairo_surface_get_extents
    
    Previously this function was attempting to return values in surface
    space, (but even then it was doing it wrong). However, all callers
    actually expect values in backend space. Fixing this cleans up bug
    7268 quite nicely.

diff --git a/ROADMAP b/ROADMAP
index c65b2b0..8b9305c 100644
--- a/ROADMAP
+++ b/ROADMAP
@@ -57,7 +57,7 @@ cairo 1.2.0 plans
      6617  With cairo 1.0.4 some text just disappears
      6759  fontconfig option AntiAlias doesn't work in cairo 1.1.2
     ✓6955  Some characters aren't displayed when using xlib (cache u...
-     7268  positive device_offset values don't work as source
+    ✓7268  positive device_offset values don't work as source
     ✓	   PDF emit_glyph function needs to support bitmapped glyphs
     ✓	   PS emit_glyph function needs to support bitmapped glyphs
     ✓	   SVG emit_glyph function needs to support bitmapped glyphs
diff --git a/src/cairo-surface.c b/src/cairo-surface.c
index dd45147..0aafa73 100644
--- a/src/cairo-surface.c
+++ b/src/cairo-surface.c
@@ -1649,37 +1649,32 @@ _cairo_surface_set_clip (cairo_surface_t
  * possibly be recorded, in otherwords, it is the maximum extent of
  * potentially usable coordinates.
  *
- * For simple pixel-based surfaces, it can be a close bound on the
- * retained pixel region.
- *
  * For vector surfaces, (PDF, PS, SVG and meta-surfaces), the surface
  * might be conceived as unbounded, but we force the user to provide a
- * maximum size at the time of surface_create.
+ * maximum size at the time of surface_create. So get_extents uses
+ * that size.
+ *
+ * NOTE: The coordinates returned are in "backend" space rather than
+ * "surface" space. That is, they are relative to the true (0,0)
+ * origin rather than the device_transform origin. This might seem a
+ * bit inconsistent with other cairo_surface interfaces, but all
+ * current callers are within the surface layer where backend space is
+ * desired.
+ *
+ * This behavior would have to be changed is we ever exported a public
+ * variant of this function.
  */
-
 cairo_status_t
 _cairo_surface_get_extents (cairo_surface_t         *surface,
 			    cairo_rectangle_int16_t *rectangle)
 {
-    cairo_status_t status;
-
     if (surface->status)
 	return surface->status;
 
     if (surface->finished)
 	return CAIRO_STATUS_SURFACE_FINISHED;
 
-    status = surface->backend->get_extents (surface, rectangle);
-
-    /* XXX: FRAGILE: This code is currently ignoring any scaling in
-     * the device_transform. This will almost certainly need to be
-     * changed for device_transform scaling will work. */
-    rectangle->x = rectangle->x + surface->device_transform.x0;
-    rectangle->y = rectangle->y + surface->device_transform.y0;
-    rectangle->width = rectangle->width - surface->device_transform.x0;
-    rectangle->height = rectangle->height - surface->device_transform.y0;
-
-    return status;
+    return surface->backend->get_extents (surface, rectangle);
 }
 
 cairo_status_t
diff-tree 95355c854f1894e7bbcd370f3bb0d00223c077b6 (from 4c7074ceb42c50fc55929291330658f693c66bc7)
Author: Carl Worth <cworth at cworth.org>
Date:   Sun Jun 25 02:25:16 2006 +0200

    ROADMAP: Note that SVG bitmap glyphs now work. Move some bugs to a punt list.

diff --git a/ROADMAP b/ROADMAP
index b873b77..c65b2b0 100644
--- a/ROADMAP
+++ b/ROADMAP
@@ -48,26 +48,32 @@ cairo-1.4 (October 2006): Better perform
  - New rasterization
  - Finer-grained fallbacks for PS/PDF
 
-cairo 1.2.0 essential features
-We don't expect to release without these being complete.
-========================================================
+cairo 1.2.0 plans
+=================
+ xlib backend
+     add cairo_xlib_surface_get_width/height
+
  Bug fixes (For each XXXX, see: https://bugs.freedesktop.org/show_bug.cgi?id=XXXX )
      6617  With cairo 1.0.4 some text just disappears
      6759  fontconfig option AntiAlias doesn't work in cairo 1.1.2
-     6806  cairo 1.0.4 crash progressbar in window
     ✓6955  Some characters aren't displayed when using xlib (cache u...
      7268  positive device_offset values don't work as source
     ✓	   PDF emit_glyph function needs to support bitmapped glyphs
     ✓	   PS emit_glyph function needs to support bitmapped glyphs
-	   SVG emit_glyph function needs to support bitmapped glyphs
+    ✓	   SVG emit_glyph function needs to support bitmapped glyphs
     ✓	   PDF: minefield page one is falling back unnecessarily
-	   PDF: minefield shows too-tiny bitmapped fonts in image fallback
-	   PDF: minefield shows strangely hinted glyph shapes (only without truetype subsetting)
-	   PDF: minefield has broken selection (only with truetype subsetting code)
+	   should be possible to draw caps with degenerate paths
 
  Fix memory leaks
      1. Ensure 'make check-valgrind' passes with no leaks
 
+ Bugs that won't be fixed
+ ------------------------
+     6806  cairo 1.0.4 crash progressbar in window
+     PDF: minefield shows too-tiny bitmapped fonts in image fallback
+     PDF: minefield shows strangely hinted glyph shapes (only without truetype subsetting)
+     PDF: minefield has broken selection (only with truetype subsetting code)
+
  cairo 1.1.10 snapshot includes everything below here
  ----------------------------------------------------
 ✓Bug fixes
diff-tree 4c7074ceb42c50fc55929291330658f693c66bc7 (from 3a313070e5b5a1168225dec008f63ff68ed20559)
Author: Carl Worth <cworth at cworth.org>
Date:   Sun Jun 25 02:23:14 2006 +0200

    Remove comment which had been incorrectly copied

diff --git a/src/cairo-ft-font.c b/src/cairo-ft-font.c
index 9db46d2..c70e8da 100644
--- a/src/cairo-ft-font.c
+++ b/src/cairo-ft-font.c
@@ -1029,21 +1029,7 @@ _render_glyph_outline (FT_Face          
     return CAIRO_STATUS_SUCCESS;
 }
 
-/* Converts a bitmap (or other) FT_GlyphSlot into an image
- *
- * This could go through _render_glyph_bitmap as well, letting
- * FreeType convert the outline to a bitmap, but doing it ourselves
- * has two minor advantages: first, we save a copy of the bitmap
- * buffer: we can directly use the buffer that FreeType renders
- * into.
- *
- * Second, it may help when we add support for subpixel
- * rendering: the Xft code does it this way. (Keith thinks that
- * it may also be possible to get the subpixel rendering with
- * FT_Render_Glyph: something worth looking into in more detail
- * when we add subpixel support. If so, we may want to eliminate
- * this version of the code path entirely.
- */
+/* Converts a bitmap (or other) FT_GlyphSlot into an image */
 static cairo_status_t
 _render_glyph_bitmap (FT_Face		      face,
 		      cairo_font_options_t   *font_options,


More information about the cairo-commit mailing list