summaryrefslogtreecommitdiff
path: root/src/cairo-type3-glyph-surface.c
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2011-07-14 21:19:54 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2011-07-19 21:14:34 +0100
commitb132fae5e843c329d1414d1a65b2e8d66b99852f (patch)
tree7df5e21300eefe3abcc30616b22d7f5d3248b4d4 /src/cairo-type3-glyph-surface.c
parentf58ade7bace8c82d0ea6740f56d227696181d616 (diff)
downloadcairo-b132fae5e843c329d1414d1a65b2e8d66b99852f.tar.gz
clip: Rudimentary support for clip-polygon extraction
Step 1, fix the failings sighted recently by tracking clip-boxes as an explicit property of the clipping and of composition. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src/cairo-type3-glyph-surface.c')
-rw-r--r--src/cairo-type3-glyph-surface.c40
1 files changed, 20 insertions, 20 deletions
diff --git a/src/cairo-type3-glyph-surface.c b/src/cairo-type3-glyph-surface.c
index e9e831150..bad0d3b26 100644
--- a/src/cairo-type3-glyph-surface.c
+++ b/src/cairo-type3-glyph-surface.c
@@ -188,7 +188,7 @@ static cairo_int_status_t
_cairo_type3_glyph_surface_paint (void *abstract_surface,
cairo_operator_t op,
const cairo_pattern_t *source,
- cairo_clip_t *clip)
+ const cairo_clip_t *clip)
{
cairo_type3_glyph_surface_t *surface = abstract_surface;
const cairo_surface_pattern_t *pattern;
@@ -224,7 +224,7 @@ _cairo_type3_glyph_surface_mask (void *abstract_surface,
cairo_operator_t op,
const cairo_pattern_t *source,
const cairo_pattern_t *mask,
- cairo_clip_t *clip)
+ const cairo_clip_t *clip)
{
return _cairo_type3_glyph_surface_paint (abstract_surface,
op, mask,
@@ -235,13 +235,13 @@ static cairo_int_status_t
_cairo_type3_glyph_surface_stroke (void *abstract_surface,
cairo_operator_t op,
const cairo_pattern_t *source,
- cairo_path_fixed_t *path,
+ const cairo_path_fixed_t *path,
const cairo_stroke_style_t *style,
const cairo_matrix_t *ctm,
const cairo_matrix_t *ctm_inverse,
double tolerance,
cairo_antialias_t antialias,
- cairo_clip_t *clip)
+ const cairo_clip_t *clip)
{
cairo_type3_glyph_surface_t *surface = abstract_surface;
cairo_int_status_t status;
@@ -261,11 +261,11 @@ static cairo_int_status_t
_cairo_type3_glyph_surface_fill (void *abstract_surface,
cairo_operator_t op,
const cairo_pattern_t *source,
- cairo_path_fixed_t *path,
+ const cairo_path_fixed_t *path,
cairo_fill_rule_t fill_rule,
double tolerance,
cairo_antialias_t antialias,
- cairo_clip_t *clip)
+ const cairo_clip_t *clip)
{
cairo_type3_glyph_surface_t *surface = abstract_surface;
cairo_int_status_t status;
@@ -286,7 +286,7 @@ _cairo_type3_glyph_surface_show_glyphs (void *abstract_surface,
cairo_glyph_t *glyphs,
int num_glyphs,
cairo_scaled_font_t *scaled_font,
- cairo_clip_t *clip,
+ const cairo_clip_t *clip,
int *remaining_glyphs)
{
cairo_type3_glyph_surface_t *surface = abstract_surface;
@@ -418,7 +418,7 @@ _cairo_type3_glyph_surface_analyze_glyph (void *abstract_surface,
{
cairo_type3_glyph_surface_t *surface = abstract_surface;
cairo_scaled_glyph_t *scaled_glyph;
- cairo_status_t status, status2;
+ cairo_int_status_t status, status2;
cairo_output_stream_t *null_stream;
if (unlikely (surface->base.status))
@@ -436,11 +436,11 @@ _cairo_type3_glyph_surface_analyze_glyph (void *abstract_surface,
CAIRO_SCALED_GLYPH_INFO_RECORDING_SURFACE,
&scaled_glyph);
- if (_cairo_status_is_error (status))
+ if (_cairo_int_status_is_error (status))
goto cleanup;
if (status == CAIRO_INT_STATUS_UNSUPPORTED) {
- status = CAIRO_STATUS_SUCCESS;
+ status = CAIRO_INT_STATUS_SUCCESS;
goto cleanup;
}
@@ -451,13 +451,13 @@ _cairo_type3_glyph_surface_analyze_glyph (void *abstract_surface,
status = _cairo_pdf_operators_flush (&surface->pdf_operators);
if (status == CAIRO_INT_STATUS_IMAGE_FALLBACK)
- status = CAIRO_STATUS_SUCCESS;
+ status = CAIRO_INT_STATUS_SUCCESS;
cleanup:
_cairo_scaled_font_thaw_cache (surface->scaled_font);
status2 = _cairo_output_stream_destroy (null_stream);
- if (status == CAIRO_STATUS_SUCCESS)
+ if (status == CAIRO_INT_STATUS_SUCCESS)
status = status2;
return status;
@@ -472,7 +472,7 @@ _cairo_type3_glyph_surface_emit_glyph (void *abstract_surface,
{
cairo_type3_glyph_surface_t *surface = abstract_surface;
cairo_scaled_glyph_t *scaled_glyph;
- cairo_status_t status, status2;
+ cairo_int_status_t status, status2;
double x_advance, y_advance;
cairo_matrix_t font_matrix_inverse;
@@ -492,10 +492,10 @@ _cairo_type3_glyph_surface_emit_glyph (void *abstract_surface,
glyph_index,
CAIRO_SCALED_GLYPH_INFO_METRICS,
&scaled_glyph);
- if (status == CAIRO_STATUS_SUCCESS)
+ if (status == CAIRO_INT_STATUS_SUCCESS)
status = CAIRO_INT_STATUS_IMAGE_FALLBACK;
}
- if (_cairo_status_is_error (status)) {
+ if (_cairo_int_status_is_error (status)) {
_cairo_scaled_font_thaw_cache (surface->scaled_font);
return status;
}
@@ -508,7 +508,7 @@ _cairo_type3_glyph_surface_emit_glyph (void *abstract_surface,
/* The invertability of font_matrix is tested in
* pdf_operators_show_glyphs before any glyphs are mapped to the
* subset. */
- assert (status2 == CAIRO_STATUS_SUCCESS);
+ assert (status2 == CAIRO_INT_STATUS_SUCCESS);
cairo_matrix_transform_distance (&font_matrix_inverse, &x_advance, &y_advance);
*width = x_advance;
@@ -525,7 +525,7 @@ _cairo_type3_glyph_surface_emit_glyph (void *abstract_surface,
_cairo_fixed_to_double (bbox->p2.x),
- _cairo_fixed_to_double (bbox->p1.y));
- if (status == CAIRO_STATUS_SUCCESS) {
+ if (status == CAIRO_INT_STATUS_SUCCESS) {
cairo_output_stream_t *mem_stream;
mem_stream = _cairo_memory_stream_create ();
@@ -540,17 +540,17 @@ _cairo_type3_glyph_surface_emit_glyph (void *abstract_surface,
&surface->base);
status2 = _cairo_pdf_operators_flush (&surface->pdf_operators);
- if (status == CAIRO_STATUS_SUCCESS)
+ if (status == CAIRO_INT_STATUS_SUCCESS)
status = status2;
_cairo_output_stream_printf (surface->stream, "Q\n");
_cairo_type3_glyph_surface_set_stream (surface, stream);
- if (status == CAIRO_STATUS_SUCCESS)
+ if (status == CAIRO_INT_STATUS_SUCCESS)
_cairo_memory_stream_copy (mem_stream, stream);
status2 = _cairo_output_stream_destroy (mem_stream);
- if (status == CAIRO_STATUS_SUCCESS)
+ if (status == CAIRO_INT_STATUS_SUCCESS)
status = status2;
}