[librsvg] Use cairo_line_cap_t directly
- From: Christian Persch <chpe src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [librsvg] Use cairo_line_cap_t directly
- Date: Mon, 7 Nov 2011 19:26:57 +0000 (UTC)
commit 00b68a14f5e26f14b1856bd87cfdd93276e98cd2
Author: Christian Persch <chpe gnome org>
Date: Thu Sep 15 18:23:00 2011 +0200
Use cairo_line_cap_t directly
Although it appears this property is only parsed, but not used
when rendering...
rsvg-styles.c | 8 ++++----
rsvg-styles.h | 8 +-------
2 files changed, 5 insertions(+), 11 deletions(-)
---
diff --git a/rsvg-styles.c b/rsvg-styles.c
index 72f48ca..3092754 100644
--- a/rsvg-styles.c
+++ b/rsvg-styles.c
@@ -105,7 +105,7 @@ rsvg_state_init (RsvgState * state)
state->stroke_opacity = 0xff;
state->stroke_width = _rsvg_css_parse_length ("1");
state->miter_limit = 4;
- state->cap = RSVG_PATH_STROKE_CAP_BUTT;
+ state->cap = CAIRO_LINE_CAP_BUTT;
state->join = CAIRO_LINE_JOIN_MITER;
state->stop_opacity = 0xff;
state->fill_rule = CAIRO_FILL_RULE_WINDING;
@@ -616,11 +616,11 @@ rsvg_parse_style_pair (RsvgHandle * ctx,
} else if (g_str_equal (name, "stroke-linecap")) {
state->has_cap = TRUE;
if (g_str_equal (value, "butt"))
- state->cap = RSVG_PATH_STROKE_CAP_BUTT;
+ state->cap = CAIRO_LINE_CAP_BUTT;
else if (g_str_equal (value, "round"))
- state->cap = RSVG_PATH_STROKE_CAP_ROUND;
+ state->cap = CAIRO_LINE_CAP_ROUND;
else if (g_str_equal (value, "square"))
- state->cap = RSVG_PATH_STROKE_CAP_SQUARE;
+ state->cap = CAIRO_LINE_CAP_SQUARE;
else
g_warning (_("unknown line cap style %s\n"), value);
} else if (g_str_equal (name, "stroke-opacity")) {
diff --git a/rsvg-styles.h b/rsvg-styles.h
index cbfe855..2c5ab6d 100644
--- a/rsvg-styles.h
+++ b/rsvg-styles.h
@@ -64,12 +64,6 @@ typedef enum {
/* enums and data structures are ABI compatible with libart */
-typedef enum {
- RSVG_PATH_STROKE_CAP_BUTT,
- RSVG_PATH_STROKE_CAP_ROUND,
- RSVG_PATH_STROKE_CAP_SQUARE
-} RsvgPathStrokeCapType;
-
typedef struct _RsvgVpathDash RsvgVpathDash;
struct _RsvgVpathDash {
@@ -112,7 +106,7 @@ struct _RsvgState {
double miter_limit;
gboolean has_miter_limit;
- RsvgPathStrokeCapType cap;
+ cairo_line_cap_t cap;
gboolean has_cap;
cairo_line_join_t join;
gboolean has_join;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]