From c2aefd31861a5f9122b764f4fabbb484fb4678d9 Mon Sep 17 00:00:00 2001
From: John Mitchell <6656977+StarArawn@users.noreply.github.com>
Date: Mon, 1 May 2023 20:59:57 -0400
Subject: [PATCH] Fixed SVGs

---
 examples/svg.rs                | 20 +++++++++++++-------
 src/render/unified/pipeline.rs |  4 ++--
 2 files changed, 15 insertions(+), 9 deletions(-)

diff --git a/examples/svg.rs b/examples/svg.rs
index 6416404..480c558 100644
--- a/examples/svg.rs
+++ b/examples/svg.rs
@@ -20,17 +20,23 @@ fn startup(
     let parent_id = None;
     rsx! {
         <KayakAppBundle>
-            <KSvgBundle
-                svg={KSvg(svg)}
+            <ElementBundle
                 styles={KStyle {
                     position_type: StyleProp::Value(KPositionType::SelfDirected),
-                    left: StyleProp::Value(Units::Pixels(10.0)),
-                    top: StyleProp::Value(Units::Pixels(10.0)),
-                    width: StyleProp::Value(Units::Pixels(800.0)),
-                    height: StyleProp::Value(Units::Pixels(800.0)),
+                    left: StyleProp::Value(Units::Pixels(-34.545261 * 7.6)),
+                    top: StyleProp::Value(Units::Pixels(10.0 - 95.557219 * 7.6)),
                     ..Default::default()
                 }}
-            />
+            >
+                <KSvgBundle
+                    svg={KSvg(svg)}
+                    styles={KStyle {
+                        width: StyleProp::Value(Units::Pixels(800.0)),
+                        height: StyleProp::Value(Units::Pixels(800.0)),
+                        ..Default::default()
+                    }}
+                />
+            </ElementBundle>
         </KayakAppBundle>
     };
 
diff --git a/src/render/unified/pipeline.rs b/src/render/unified/pipeline.rs
index 1f929da..e0945b3 100644
--- a/src/render/unified/pipeline.rs
+++ b/src/render/unified/pipeline.rs
@@ -951,8 +951,8 @@ pub fn queue_quads_inner(
                     color,
                     uv: [0.0; 4],
                     pos_size: [
-                        sprite_rect.min.x,
-                        sprite_rect.min.y,
+                        0.0,
+                        0.0,
                         sprite_rect.size().x,
                         sprite_rect.size().y,
                     ],
-- 
GitLab