Introduce Svg struct in core::svg
This commit is contained in:
parent
8708101c89
commit
d4b08462e5
18 changed files with 146 additions and 257 deletions
|
|
@ -580,13 +580,7 @@ impl Engine {
|
|||
);
|
||||
}
|
||||
#[cfg(feature = "svg")]
|
||||
Image::Vector {
|
||||
handle,
|
||||
color,
|
||||
bounds,
|
||||
rotation,
|
||||
opacity,
|
||||
} => {
|
||||
Image::Vector(svg, bounds) => {
|
||||
let physical_bounds = *bounds * _transformation;
|
||||
|
||||
if !_clip_bounds.intersects(&physical_bounds) {
|
||||
|
|
@ -597,7 +591,7 @@ impl Engine {
|
|||
.then_some(_clip_mask as &_);
|
||||
|
||||
let center = physical_bounds.center();
|
||||
let radians = f32::from(*rotation);
|
||||
let radians = f32::from(svg.rotation);
|
||||
|
||||
let transform = into_transform(_transformation).post_rotate_at(
|
||||
radians.to_degrees(),
|
||||
|
|
@ -606,10 +600,10 @@ impl Engine {
|
|||
);
|
||||
|
||||
self.vector_pipeline.draw(
|
||||
handle,
|
||||
*color,
|
||||
&svg.handle,
|
||||
svg.color,
|
||||
physical_bounds,
|
||||
*opacity,
|
||||
svg.opacity,
|
||||
_pixels,
|
||||
transform,
|
||||
clip_mask,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue