Skip to content

Commit c2aefd3

Browse files
committed
Fixed SVGs
1 parent 9455f60 commit c2aefd3

File tree

2 files changed

+15
-9
lines changed

2 files changed

+15
-9
lines changed

examples/svg.rs

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,17 +20,23 @@ fn startup(
2020
let parent_id = None;
2121
rsx! {
2222
<KayakAppBundle>
23-
<KSvgBundle
24-
svg={KSvg(svg)}
23+
<ElementBundle
2524
styles={KStyle {
2625
position_type: StyleProp::Value(KPositionType::SelfDirected),
27-
left: StyleProp::Value(Units::Pixels(10.0)),
28-
top: StyleProp::Value(Units::Pixels(10.0)),
29-
width: StyleProp::Value(Units::Pixels(800.0)),
30-
height: StyleProp::Value(Units::Pixels(800.0)),
26+
left: StyleProp::Value(Units::Pixels(-34.545261 * 7.6)),
27+
top: StyleProp::Value(Units::Pixels(10.0 - 95.557219 * 7.6)),
3128
..Default::default()
3229
}}
33-
/>
30+
>
31+
<KSvgBundle
32+
svg={KSvg(svg)}
33+
styles={KStyle {
34+
width: StyleProp::Value(Units::Pixels(800.0)),
35+
height: StyleProp::Value(Units::Pixels(800.0)),
36+
..Default::default()
37+
}}
38+
/>
39+
</ElementBundle>
3440
</KayakAppBundle>
3541
};
3642

src/render/unified/pipeline.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -951,8 +951,8 @@ pub fn queue_quads_inner(
951951
color,
952952
uv: [0.0; 4],
953953
pos_size: [
954-
sprite_rect.min.x,
955-
sprite_rect.min.y,
954+
0.0,
955+
0.0,
956956
sprite_rect.size().x,
957957
sprite_rect.size().y,
958958
],

0 commit comments

Comments
 (0)