[lasem] svg: restore oveflow=hidden for other elements than marker.
- From: Emmanuel Pacaud <emmanuel src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [lasem] svg: restore oveflow=hidden for other elements than marker.
- Date: Sat, 29 Sep 2012 22:04:13 +0000 (UTC)
commit 682fc24cfe7bd5f80574fbf531688a5d8cf8ad4e
Author: Emmanuel Pacaud <emmanuel gnome org>
Date: Sun Sep 30 00:03:35 2012 +0200
svg: restore oveflow=hidden for other elements than marker.
src/lsmsvgclippathelement.c | 2 +-
src/lsmsvgimageelement.c | 2 +-
src/lsmsvgmarkerelement.c | 2 +-
src/lsmsvgpatternelement.c | 2 +-
src/lsmsvgsvgelement.c | 4 ++--
src/lsmsvgview.c | 5 +++--
src/lsmsvgview.h | 3 ++-
7 files changed, 11 insertions(+), 9 deletions(-)
---
diff --git a/src/lsmsvgclippathelement.c b/src/lsmsvgclippathelement.c
index 2fe7386..305907d 100644
--- a/src/lsmsvgclippathelement.c
+++ b/src/lsmsvgclippathelement.c
@@ -63,7 +63,7 @@ lsm_svg_clip_path_element_render (LsmSvgElement *self, LsmSvgView *view)
viewport = lsm_svg_view_get_clip_extents (view);
- lsm_svg_view_push_viewport (view, viewport, &viewbox, NULL);
+ lsm_svg_view_push_viewport (view, viewport, &viewbox, NULL, LSM_SVG_OVERFLOW_HIDDEN);
}
LSM_SVG_ELEMENT_CLASS (parent_class)->render (self, view);
diff --git a/src/lsmsvgimageelement.c b/src/lsmsvgimageelement.c
index add99ce..ed4546d 100644
--- a/src/lsmsvgimageelement.c
+++ b/src/lsmsvgimageelement.c
@@ -122,7 +122,7 @@ lsm_svg_image_element_render (LsmSvgElement *self, LsmSvgView *view)
viewbox.width = gdk_pixbuf_get_width (image->pixbuf);
viewbox.height = gdk_pixbuf_get_height (image->pixbuf);
- lsm_svg_view_push_viewport (view, &viewport, &viewbox, &image->preserve_aspect_ratio.value);
+ lsm_svg_view_push_viewport (view, &viewport, &viewbox, &image->preserve_aspect_ratio.value, LSM_SVG_OVERFLOW_HIDDEN);
lsm_svg_view_show_pixbuf (view, image->pixbuf);
diff --git a/src/lsmsvgmarkerelement.c b/src/lsmsvgmarkerelement.c
index 1b8cd73..88b783e 100644
--- a/src/lsmsvgmarkerelement.c
+++ b/src/lsmsvgmarkerelement.c
@@ -106,7 +106,7 @@ _marker_element_render (LsmSvgElement *self, LsmSvgView *view)
if (lsm_svg_view_push_matrix (view, &matrix)) {
lsm_svg_view_push_viewport (view, &viewport, &viewbox,
- &marker->preserve_aspect_ratio.value);
+ &marker->preserve_aspect_ratio.value, style->overflow->value);
LSM_SVG_ELEMENT_CLASS (parent_class)->render (self, view);
diff --git a/src/lsmsvgpatternelement.c b/src/lsmsvgpatternelement.c
index 8c08d94..7b842a8 100644
--- a/src/lsmsvgpatternelement.c
+++ b/src/lsmsvgpatternelement.c
@@ -264,7 +264,7 @@ lsm_svg_pattern_element_render (LsmSvgElement *self, LsmSvgView *view)
(is_viewbox_defined && pattern->viewbox.value.width > 0.0 && pattern->viewbox.value.height > 0.0)) {
lsm_svg_view_push_viewport (view, &viewport, is_viewbox_defined ? &pattern->viewbox.value : NULL,
- &pattern->preserve_aspect_ratio.value);
+ &pattern->preserve_aspect_ratio.value, LSM_SVG_OVERFLOW_HIDDEN);
LSM_SVG_ELEMENT_CLASS (parent_class)->render (LSM_SVG_ELEMENT (referenced_pattern), view);
diff --git a/src/lsmsvgsvgelement.c b/src/lsmsvgsvgelement.c
index 8e73f18..62f9a4b 100644
--- a/src/lsmsvgsvgelement.c
+++ b/src/lsmsvgsvgelement.c
@@ -140,7 +140,7 @@ _svg_element_render (LsmSvgElement *self, LsmSvgView *view)
viewport.x, viewport.y, viewport.width, viewport.height);
lsm_svg_view_push_viewport (view, &viewport, is_viewbox_defined ? &svg->viewbox.value : NULL,
- &svg->preserve_aspect_ratio.value);
+ &svg->preserve_aspect_ratio.value, LSM_SVG_OVERFLOW_HIDDEN);
LSM_SVG_ELEMENT_CLASS (parent_class)->render (self, view);
@@ -152,7 +152,7 @@ _svg_element_render (LsmSvgElement *self, LsmSvgView *view)
void
lsm_svg_svg_element_render (LsmSvgSvgElement *svg, LsmSvgView *view)
{
- lsm_svg_view_push_viewport (view, &svg->svg_box, NULL, NULL);
+ lsm_svg_view_push_viewport (view, &svg->svg_box, NULL, NULL, LSM_SVG_OVERFLOW_HIDDEN);
lsm_svg_element_render (LSM_SVG_ELEMENT (svg), view);
lsm_svg_view_pop_viewport (view);
}
diff --git a/src/lsmsvgview.c b/src/lsmsvgview.c
index f276366..6eb8d7a 100644
--- a/src/lsmsvgview.c
+++ b/src/lsmsvgview.c
@@ -1611,7 +1611,8 @@ _compute_viewbox_scale (const LsmBox *viewport, const LsmBox *viewbox,
void
lsm_svg_view_push_viewport (LsmSvgView *view, const LsmBox *viewport, const LsmBox *viewbox,
- const LsmSvgPreserveAspectRatio *aspect_ratio)
+ const LsmSvgPreserveAspectRatio *aspect_ratio,
+ LsmSvgOverflow overflow)
{
cairo_t *cairo;
const LsmBox *actual_viewbox;
@@ -1638,7 +1639,7 @@ lsm_svg_view_push_viewport (LsmSvgView *view, const LsmBox *viewport, const LsmB
cairo_restore (cairo);
}
- if (view->style != NULL && view->style->overflow->value == LSM_SVG_OVERFLOW_HIDDEN) {
+ if (overflow == LSM_SVG_OVERFLOW_HIDDEN) {
cairo_rectangle (cairo, viewport->x, viewport->y, viewport->width, viewport->height);
cairo_clip (cairo);
}
diff --git a/src/lsmsvgview.h b/src/lsmsvgview.h
index 0bb4438..37e7091 100644
--- a/src/lsmsvgview.h
+++ b/src/lsmsvgview.h
@@ -126,7 +126,8 @@ void lsm_svg_view_push_viewbox (LsmSvgView *view, const LsmBox *viewbox);
void lsm_svg_view_pop_viewbox (LsmSvgView *view);
void lsm_svg_view_push_viewport (LsmSvgView *view, const LsmBox *viewport,
const LsmBox *viewbox,
- const LsmSvgPreserveAspectRatio *aspect_ratio);
+ const LsmSvgPreserveAspectRatio *aspect_ratio,
+ LsmSvgOverflow overflow);
void lsm_svg_view_pop_viewport (LsmSvgView *view);
void lsm_svg_view_viewbox_to_viewport (LsmSvgView *view,
const LsmBox *viewport, const LsmBox *viewbox,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]