[cairo-commit] 3 commits - src/cairo-svg-surface.c test/cairo-test.c
Emmanuel Pacaud
emmanuel at kemper.freedesktop.org
Mon Apr 17 02:27:45 PDT 2006
- Previous message: [cairo-commit] goocanvas/src goocanvasellipseview.c, 1.7,
1.8 goocanvasgroupview.c, 1.9, 1.10 goocanvasimageview.c, 1.7,
1.8 goocanvasitemviewsimple.c, 1.1, 1.2 goocanvaspathview.c,
1.5, 1.6 goocanvaspolylineview.c, 1.8, 1.9 goocanvasrectview.c,
1.7, 1.8 goocanvastextview.c, 1.8, 1.9 goocanvasview.c, 1.12, 1.13
- Next message: [cairo-commit] src/cairo-svg-surface.c
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
src/cairo-svg-surface.c | 12 +-----------
test/cairo-test.c | 15 ++++++++++++++-
2 files changed, 15 insertions(+), 12 deletions(-)
New commits:
diff-tree 9e2a2ea0da93065c46a6d6249f98a319ee6158dd (from c01805bafd5ad68263a3e644787cd7c04838124b)
Author: Emmanuel Pacaud <emmanuel.pacaud at free.fr>
Date: Mon Apr 17 11:07:15 2006 +0200
SVG: Don't insert /n/r in base64 encoded image data
That doesn't work since libxml replace them by
They were intended to ease readability of generated files.
diff --git a/src/cairo-svg-surface.c b/src/cairo-svg-surface.c
index b65796e..da38a1e 100644
--- a/src/cairo-svg-surface.c
+++ b/src/cairo-svg-surface.c
@@ -368,7 +368,6 @@ typedef struct {
unsigned int in_mem;
unsigned char src[3];
unsigned char dst[5];
- unsigned int count;
unsigned int trailing;
} base64_write_closure_t;
@@ -402,11 +401,6 @@ base64_write_func (void *closure,
data++;
length--;
}
- info->count++;
- if (info->count >= 18) {
- info->count = 0;
- xmlBufferCat (info->buffer, CC2XML ("\r\n"));
- }
dst[0] = base64_table[src[0] >> 2];
dst[1] = base64_table[(src[0] & 0x03) << 4 | src[1] >> 4];
dst[2] = base64_table[(src[1] & 0x0f) << 2 | src[2] >> 6];
@@ -446,7 +440,6 @@ _cairo_surface_base64_encode (cairo_surf
info.buffer = xmlBufferCreate();
info.in_mem = 0;
- info.count = 0;
info.trailing = 0;
memset (info.dst, '\x0', 5);
*buffer = info.buffer;
diff-tree c01805bafd5ad68263a3e644787cd7c04838124b (from 62d2f7cbf3718cfc982286ec62878c9d6eff09fa)
Author: Emmanuel Pacaud <emmanuel.pacaud at free.fr>
Date: Mon Apr 17 10:21:50 2006 +0200
SVG: Don't check for content type in create_similar, and mark surface as modified when clearing it.
diff --git a/src/cairo-svg-surface.c b/src/cairo-svg-surface.c
index eb01214..b65796e 100644
--- a/src/cairo-svg-surface.c
+++ b/src/cairo-svg-surface.c
@@ -305,10 +305,6 @@ _cairo_svg_surface_create_similar (void
{
cairo_svg_surface_t *template = abstract_src;
- if (content != CAIRO_CONTENT_COLOR_ALPHA &&
- content != CAIRO_CONTENT_COLOR)
- return (cairo_surface_t *) &_cairo_surface_nil;
-
return _cairo_svg_surface_create_for_document (template->document,
content, width, height);
}
@@ -1101,6 +1097,7 @@ _cairo_svg_surface_paint (void *abs
xmlSetProp (rect, CC2XML ("height"), C2XML (buffer));
xmlSetProp (rect, CC2XML ("style"), CC2XML ("opacity:1; stroke:none; fill:rgb(0,0,0);"));
}
+ surface->modified = TRUE;
return CAIRO_STATUS_SUCCESS;
}
}
diff-tree 62d2f7cbf3718cfc982286ec62878c9d6eff09fa (from 347083b3f0be2f07d1953278b8516774253752f1)
Author: Emmanuel Pacaud <emmanuel.pacaud at free.fr>
Date: Mon Apr 17 09:54:03 2006 +0200
SVG: Return UNTESTED for test involving operators.
unbounded-operator, operator-clear, operator-source, clip-operator
diff --git a/test/cairo-test.c b/test/cairo-test.c
index 9105a1b..fce38fe 100644
--- a/test/cairo-test.c
+++ b/test/cairo-test.c
@@ -183,7 +183,7 @@ typedef struct _cairo_test_target
cairo_test_create_target_surface_t create_target_surface;
cairo_test_write_to_png_t write_to_png;
cairo_test_cleanup_target_t cleanup_target;
- void *closure;
+ void *closure;
} cairo_test_target_t;
static char *
@@ -1298,6 +1298,14 @@ cleanup_pdf (void *closure)
#if CAIRO_HAS_SVG_SURFACE && CAIRO_CAN_TEST_SVG_SURFACE
#include "cairo-svg.h"
+static const char *svg_ignored_tests[] = {
+ "operator-source",
+ "operator-clear",
+ "clip-operator",
+ "unbounded-operator",
+ NULL
+};
+
cairo_user_data_key_t svg_closure_key;
typedef struct _svg_target_closure
@@ -1314,9 +1322,14 @@ create_svg_surface (cairo_test_t *test,
{
int width = test->width;
int height = test->height;
+ int i;
svg_target_closure_t *ptc;
cairo_surface_t *surface;
+ for (i = 0; svg_ignored_tests[i] != NULL; i++)
+ if (strcmp (test->name, svg_ignored_tests[i]) == 0)
+ return NULL;
+
*closure = ptc = xmalloc (sizeof (svg_target_closure_t));
ptc->width = width;
- Previous message: [cairo-commit] goocanvas/src goocanvasellipseview.c, 1.7,
1.8 goocanvasgroupview.c, 1.9, 1.10 goocanvasimageview.c, 1.7,
1.8 goocanvasitemviewsimple.c, 1.1, 1.2 goocanvaspathview.c,
1.5, 1.6 goocanvaspolylineview.c, 1.8, 1.9 goocanvasrectview.c,
1.7, 1.8 goocanvastextview.c, 1.8, 1.9 goocanvasview.c, 1.12, 1.13
- Next message: [cairo-commit] src/cairo-svg-surface.c
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the cairo-commit
mailing list