[cairo] [PATCH 03/39] [OpenVG] Removal of dead code, reindentation.
tardyp at gmail.com
tardyp at gmail.com
Fri Jul 10 10:02:05 PDT 2009
From: Øyvind Kolås <pippin at gimp.org>
---
src/cairo-openvg-surface.c | 87 +++++++++++++++++---------------------------
1 files changed, 33 insertions(+), 54 deletions(-)
diff --git a/src/cairo-openvg-surface.c b/src/cairo-openvg-surface.c
index 9a1bdfc..ecbd848 100644
--- a/src/cairo-openvg-surface.c
+++ b/src/cairo-openvg-surface.c
@@ -220,15 +220,15 @@ _cairo_path_to_openvg_path_close_path (void *closure)
static cairo_status_t
_cairo_quartz_cairo_path_to_openvg_path (cairo_path_fixed_t *path,
- openvg_stroke_t *stroke)
+ openvg_stroke_t *stroke)
{
return _cairo_path_fixed_interpret (path,
- CAIRO_DIRECTION_FORWARD,
- _cairo_path_to_openvg_path_move_to,
- _cairo_path_to_openvg_path_line_to,
- _cairo_path_to_openvg_path_curve_to,
- _cairo_path_to_openvg_path_close_path,
- stroke);
+ CAIRO_DIRECTION_FORWARD,
+ _cairo_path_to_openvg_path_move_to,
+ _cairo_path_to_openvg_path_line_to,
+ _cairo_path_to_openvg_path_curve_to,
+ _cairo_path_to_openvg_path_close_path,
+ stroke);
}
@@ -240,26 +240,26 @@ static VGBlendMode
_cairo_openvg_cairo_operator_to_openvg (cairo_operator_t op)
{
switch (op) {
- /*case CAIRO_OPERATOR_CLEAR:
- return kPrivateCGCompositeClear;*/
- case CAIRO_OPERATOR_SOURCE:
- return VG_BLEND_SRC;
- case CAIRO_OPERATOR_OVER:
- return VG_BLEND_SRC_OVER;
- case CAIRO_OPERATOR_IN:
+ /*case CAIRO_OPERATOR_CLEAR:
+ return kPrivateCGCompositeClear;*/
+ case CAIRO_OPERATOR_SOURCE:
+ return VG_BLEND_SRC;
+ case CAIRO_OPERATOR_OVER:
+ return VG_BLEND_SRC_OVER;
+ case CAIRO_OPERATOR_IN:
return VG_BLEND_SRC_IN;
- case CAIRO_OPERATOR_OUT:
- case CAIRO_OPERATOR_ATOP:
- return VG_BLEND_SRC_ATOP_SH;
- case CAIRO_OPERATOR_DEST:
- case CAIRO_OPERATOR_DEST_OVER:
- case CAIRO_OPERATOR_DEST_IN:
- case CAIRO_OPERATOR_DEST_OUT:
- case CAIRO_OPERATOR_DEST_ATOP:
- case CAIRO_OPERATOR_XOR:
- case CAIRO_OPERATOR_ADD:
- case CAIRO_OPERATOR_SATURATE:
- case CAIRO_OPERATOR_CLEAR:
+ case CAIRO_OPERATOR_OUT:
+ case CAIRO_OPERATOR_ATOP:
+ return VG_BLEND_SRC_ATOP_SH;
+ case CAIRO_OPERATOR_DEST:
+ case CAIRO_OPERATOR_DEST_OVER:
+ case CAIRO_OPERATOR_DEST_IN:
+ case CAIRO_OPERATOR_DEST_OUT:
+ case CAIRO_OPERATOR_DEST_ATOP:
+ case CAIRO_OPERATOR_XOR:
+ case CAIRO_OPERATOR_ADD:
+ case CAIRO_OPERATOR_SATURATE:
+ case CAIRO_OPERATOR_CLEAR:
return VG_BLEND_MULTIPLY;
}
@@ -270,9 +270,9 @@ static VGCapStyle
_cairo_openvg_cairo_line_cap_to_openvg (cairo_line_cap_t ccap)
{
switch (ccap) {
- case CAIRO_LINE_CAP_BUTT: return VG_CAP_BUTT; break;
- case CAIRO_LINE_CAP_ROUND: return VG_CAP_ROUND; break;
- case CAIRO_LINE_CAP_SQUARE: return VG_CAP_SQUARE; break;
+ case CAIRO_LINE_CAP_BUTT: return VG_CAP_BUTT; break;
+ case CAIRO_LINE_CAP_ROUND: return VG_CAP_ROUND; break;
+ case CAIRO_LINE_CAP_SQUARE: return VG_CAP_SQUARE; break;
}
return VG_CAP_BUTT;
@@ -282,39 +282,18 @@ static VGJoinStyle
_cairo_openvg_cairo_line_join_to_openvg (cairo_line_join_t cjoin)
{
switch (cjoin) {
- case CAIRO_LINE_JOIN_MITER: return VG_JOIN_MITER; break;
- case CAIRO_LINE_JOIN_ROUND: return VG_JOIN_ROUND; break;
- case CAIRO_LINE_JOIN_BEVEL: return VG_JOIN_BEVEL; break;
+ case CAIRO_LINE_JOIN_MITER: return VG_JOIN_MITER; break;
+ case CAIRO_LINE_JOIN_ROUND: return VG_JOIN_ROUND; break;
+ case CAIRO_LINE_JOIN_BEVEL: return VG_JOIN_BEVEL; break;
}
return VG_JOIN_MITER;
}
-#if 0
-typedef struct _cairo_matrix {
- double xx; double yx;
- double xy; double yy;
- double x0; double y0;
-} cairo_matrix_t;
-#endif
-
-/* { sx, shy, w0, shx, sy, w1, tx, ty, w2 } */
-
static void
_cairo_openvg_cairo_matrix_to_openvg (const cairo_matrix_t *src,
- VGfloat *dst
-
- )
+ VGfloat *dst)
{
- /*VGfloat state[9];*/
-#if 0
- dst->a = src->xx;
- dst->b = src->yx;
- dst->c = src->xy;
- dst->d = src->yy;
- dst->tx = src->x0;
- dst->ty = src->y0;
-#endif
dst[0] = /* sx */ src->xx;
dst[1] = /* shy */ src->yx;
dst[2] = /* w0 */ 0;
--
1.6.0.4
More information about the cairo
mailing list