[lasem] <svg:clippath> Simplify using view_push_viewport.
- From: Emmanuel Pacaud <emmanuel src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [lasem] <svg:clippath> Simplify using view_push_viewport.
- Date: Sat, 15 Aug 2009 20:12:19 +0000 (UTC)
commit 9c1261176c781b0eba381fbaef595f22f6e7fa67
Author: Emmanuel Pacaud <emmanuel pacaud lapp in2p3 fr>
Date: Sat Aug 15 21:55:49 2009 +0200
<svg:clippath> Simplify using view_push_viewport.
src/lsmsvgclippathelement.c | 17 +++++++----------
1 files changed, 7 insertions(+), 10 deletions(-)
---
diff --git a/src/lsmsvgclippathelement.c b/src/lsmsvgclippathelement.c
index 9409733..4ebb617 100644
--- a/src/lsmsvgclippathelement.c
+++ b/src/lsmsvgclippathelement.c
@@ -56,21 +56,18 @@ lsm_svg_clip_path_element_render (LsmSvgElement *self, LsmSvgView *view)
is_object_bounding_box = (clip->units.value == LSM_SVG_PATTERN_UNITS_OBJECT_BOUNDING_BOX);
if (is_object_bounding_box) {
- LsmSvgMatrix matrix;
- const LsmBox *viewbox;
-
- viewbox = lsm_svg_view_get_clip_extents (view);
- lsm_svg_matrix_init_translate (&matrix, viewbox->x, viewbox->y);
- lsm_svg_matrix_scale (&matrix, viewbox->width, viewbox->height);
- lsm_svg_view_push_viewbox (view, viewbox);
- lsm_svg_view_push_matrix (view, &matrix);
+ const LsmBox *viewport;
+ const static LsmBox viewbox = {.x = 0.0, .y = 0.0, .width = 1.0, .height = 1.0};
+
+ viewport = lsm_svg_view_get_clip_extents (view);
+
+ lsm_svg_view_push_viewport (view, viewport, &viewbox, NULL);
}
LSM_SVG_ELEMENT_CLASS (parent_class)->render (self, view);
if (is_object_bounding_box) {
- lsm_svg_view_pop_matrix (view);
- lsm_svg_view_pop_viewbox (view);
+ lsm_svg_view_pop_viewport (view);
}
lsm_svg_view_pop_style (view);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]