[cairo-commit] libsvg/src svg_element.c, 1.31, 1.32 svg_gradient.c,
1.1, 1.2 svg_group.c, 1.23, 1.24 svg_parser.c, 1.28,
1.29 svg_path.c, 1.17, 1.18 svgint.h, 1.40, 1.41
Carl Worth
commit at pdx.freedesktop.org
Thu Apr 29 23:50:35 PDT 2004
Committed by: cworth
Update of /cvs/cairo/libsvg/src
In directory pdx:/tmp/cvs-serv4984/src
Modified Files:
svg_element.c svg_gradient.c svg_group.c svg_parser.c
svg_path.c svgint.h
Log Message:
* src/svg_gradient.c (_svg_gradient_init): Fix missing
intialization of units and spread.
* src/svg_element.c (_svg_element_init_copy): Add missing copy for
ellipse and line.
(_svg_element_deinit): Add missing deinit for a few trivial types.
Index: svg_element.c
===================================================================
RCS file: /cvs/cairo/libsvg/src/svg_element.c,v
retrieving revision 1.31
retrieving revision 1.32
diff -C2 -d -r1.31 -r1.32
*** a/svg_element.c 30 Aug 2003 03:09:07 -0000 1.31
--- b/svg_element.c 30 Apr 2004 06:50:33 -0000 1.32
***************
*** 71,76 ****
break;
case SVG_ELEMENT_TYPE_CIRCLE:
- status = _svg_ellipse_init (&element->e.ellipse);
- break;
case SVG_ELEMENT_TYPE_ELLIPSE:
status = _svg_ellipse_init (&element->e.ellipse);
--- 71,74 ----
***************
*** 132,135 ****
--- 130,140 ----
status = _svg_path_init_copy (&element->e.path, &other->e.path);
break;
+ case SVG_ELEMENT_TYPE_CIRCLE:
+ case SVG_ELEMENT_TYPE_ELLIPSE:
+ status = _svg_ellipse_init_copy (&element->e.ellipse, &other->e.ellipse);
+ break;
+ case SVG_ELEMENT_TYPE_LINE:
+ status = _svg_line_init_copy (&element->e.line, &other->e.line);
+ break;
case SVG_ELEMENT_TYPE_RECT:
status = _svg_rect_init_copy (&element->e.rect, &other->e.rect);
***************
*** 186,189 ****
--- 191,200 ----
status = _svg_path_deinit (&element->e.path);
break;
+ case SVG_ELEMENT_TYPE_CIRCLE:
+ case SVG_ELEMENT_TYPE_ELLIPSE:
+ case SVG_ELEMENT_TYPE_LINE:
+ case SVG_ELEMENT_TYPE_RECT:
+ status = SVG_STATUS_SUCCESS;
+ break;
case SVG_ELEMENT_TYPE_TEXT:
status = _svg_text_deinit (&element->e.text);
Index: svg_gradient.c
===================================================================
RCS file: /cvs/cairo/libsvg/src/svg_gradient.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** a/svg_gradient.c 30 Aug 2003 03:09:07 -0000 1.1
--- b/svg_gradient.c 30 Apr 2004 06:50:33 -0000 1.2
***************
*** 40,43 ****
--- 40,46 ----
_svg_length_init_unit (&gradient->u.linear.y2, 0, SVG_LENGTH_UNIT_PCT, SVG_LENGTH_ORIENTATION_HORIZONTAL);
+ gradient->units = SVG_GRADIENT_UNITS_USER;
+ gradient->spread = SVG_GRADIENT_SPREAD_PAD;
+
_svg_transform_init (&transform);
for (i = 0; i < 6 ; i++) {
Index: svg_group.c
===================================================================
RCS file: /cvs/cairo/libsvg/src/svg_group.c,v
retrieving revision 1.23
retrieving revision 1.24
diff -C2 -d -r1.23 -r1.24
*** a/svg_group.c 26 Apr 2004 18:53:18 -0000 1.23
--- b/svg_group.c 30 Apr 2004 06:50:33 -0000 1.24
***************
*** 37,45 ****
group->element_size = 0;
! _svg_length_init_unit (&group->width, 0, SVG_LENGTH_UNIT_PX, SVG_LENGTH_ORIENTATION_HORIZONTAL);
! _svg_length_init_unit (&group->height, 0, SVG_LENGTH_UNIT_PX, SVG_LENGTH_ORIENTATION_VERTICAL);
!
group->view_box.aspect_ratio = SVG_PRESERVE_ASPECT_RATIO_UNKNOWN;
group->view_box.meet_or_slice = SVG_MEET_OR_SLICE_UNKNOWN;
return SVG_STATUS_SUCCESS;
}
--- 37,48 ----
group->element_size = 0;
! _svg_length_init_unit (&group->width, 0, SVG_LENGTH_UNIT_PX, SVG_LENGTH_ORIENTATION_HORIZONTAL);
! _svg_length_init_unit (&group->height, 0, SVG_LENGTH_UNIT_PX, SVG_LENGTH_ORIENTATION_VERTICAL);
group->view_box.aspect_ratio = SVG_PRESERVE_ASPECT_RATIO_UNKNOWN;
group->view_box.meet_or_slice = SVG_MEET_OR_SLICE_UNKNOWN;
+
+ _svg_length_init_unit (&group->x, 0, SVG_LENGTH_UNIT_PX, SVG_LENGTH_ORIENTATION_HORIZONTAL);
+ _svg_length_init_unit (&group->y, 0, SVG_LENGTH_UNIT_PX, SVG_LENGTH_ORIENTATION_VERTICAL);
+
return SVG_STATUS_SUCCESS;
}
Index: svg_parser.c
===================================================================
RCS file: /cvs/cairo/libsvg/src/svg_parser.c,v
retrieving revision 1.28
retrieving revision 1.29
diff -C2 -d -r1.28 -r1.29
*** a/svg_parser.c 29 Apr 2004 19:51:17 -0000 1.28
--- b/svg_parser.c 30 Apr 2004 06:50:33 -0000 1.29
***************
*** 729,733 ****
status = _svg_parser_new_leaf_element (parser, path_element, SVG_ELEMENT_TYPE_CIRCLE);
if (status)
! return status;
_svg_attribute_get_length (attributes, "cx", &((*path_element)->e.ellipse.cx), "0");
--- 729,733 ----
status = _svg_parser_new_leaf_element (parser, path_element, SVG_ELEMENT_TYPE_CIRCLE);
if (status)
! return SVG_STATUS_PARSE_ERROR;
_svg_attribute_get_length (attributes, "cx", &((*path_element)->e.ellipse.cx), "0");
Index: svg_path.c
===================================================================
RCS file: /cvs/cairo/libsvg/src/svg_path.c,v
retrieving revision 1.17
retrieving revision 1.18
diff -C2 -d -r1.17 -r1.18
*** a/svg_path.c 26 Apr 2004 18:53:18 -0000 1.17
--- b/svg_path.c 30 Apr 2004 06:50:33 -0000 1.18
***************
*** 143,150 ****
_svg_ellipse_init (svg_ellipse_t *ellipse)
{
! _svg_length_init_unit (&ellipse->cx, 0, SVG_LENGTH_UNIT_PX, SVG_LENGTH_ORIENTATION_HORIZONTAL);
! _svg_length_init_unit (&ellipse->cy, 0, SVG_LENGTH_UNIT_PX, SVG_LENGTH_ORIENTATION_VERTICAL);
! _svg_length_init_unit (&ellipse->rx, 0, SVG_LENGTH_UNIT_PX, SVG_LENGTH_ORIENTATION_HORIZONTAL);
! _svg_length_init_unit (&ellipse->ry, 0, SVG_LENGTH_UNIT_PX, SVG_LENGTH_ORIENTATION_VERTICAL);
return SVG_STATUS_SUCCESS;
--- 143,158 ----
_svg_ellipse_init (svg_ellipse_t *ellipse)
{
! _svg_length_init_unit (&ellipse->cx, 0, SVG_LENGTH_UNIT_PX, SVG_LENGTH_ORIENTATION_HORIZONTAL);
! _svg_length_init_unit (&ellipse->cy, 0, SVG_LENGTH_UNIT_PX, SVG_LENGTH_ORIENTATION_VERTICAL);
! _svg_length_init_unit (&ellipse->rx, 0, SVG_LENGTH_UNIT_PX, SVG_LENGTH_ORIENTATION_HORIZONTAL);
! _svg_length_init_unit (&ellipse->ry, 0, SVG_LENGTH_UNIT_PX, SVG_LENGTH_ORIENTATION_VERTICAL);
!
! return SVG_STATUS_SUCCESS;
! }
!
! svg_status_t
! _svg_ellipse_init_copy (svg_ellipse_t *ellipse, svg_ellipse_t *other)
! {
! *ellipse = *other;
return SVG_STATUS_SUCCESS;
***************
*** 163,166 ****
--- 171,182 ----
svg_status_t
+ _svg_line_init_copy (svg_line_t *line, svg_line_t *other)
+ {
+ *line = *other;
+
+ return SVG_STATUS_SUCCESS;
+ }
+
+ svg_status_t
_svg_rect_init (svg_rect_element_t *rect)
{
Index: svgint.h
===================================================================
RCS file: /cvs/cairo/libsvg/src/svgint.h,v
retrieving revision 1.40
retrieving revision 1.41
diff -C2 -d -r1.40 -r1.41
*** a/svgint.h 26 Apr 2004 18:53:18 -0000 1.40
--- b/svgint.h 30 Apr 2004 06:50:33 -0000 1.41
***************
*** 591,597 ****
--- 591,603 ----
svg_status_t
+ _svg_ellipse_init_copy (svg_ellipse_t *ellipse, svg_ellipse_t *other);
+
+ svg_status_t
_svg_line_init (svg_line_t *line);
svg_status_t
+ _svg_line_init_copy (svg_line_t *line, svg_line_t *other);
+
+ svg_status_t
_svg_rect_init (svg_rect_element_t *rect);
More information about the cairo-commit
mailing list