Introduce Image struct in core::image
This commit is contained in:
parent
974ae6d1e7
commit
92bd3ecd6b
19 changed files with 184 additions and 334 deletions
|
|
@ -550,14 +550,7 @@ impl Engine {
|
|||
) {
|
||||
match image {
|
||||
#[cfg(feature = "image")]
|
||||
Image::Raster {
|
||||
handle,
|
||||
filter_method,
|
||||
bounds,
|
||||
rotation,
|
||||
opacity,
|
||||
snap: _,
|
||||
} => {
|
||||
Image::Raster(raster, bounds) => {
|
||||
let physical_bounds = *bounds * _transformation;
|
||||
|
||||
if !_clip_bounds.intersects(&physical_bounds) {
|
||||
|
|
@ -568,7 +561,7 @@ impl Engine {
|
|||
.then_some(_clip_mask as &_);
|
||||
|
||||
let center = physical_bounds.center();
|
||||
let radians = f32::from(*rotation);
|
||||
let radians = f32::from(raster.rotation);
|
||||
|
||||
let transform = into_transform(_transformation).post_rotate_at(
|
||||
radians.to_degrees(),
|
||||
|
|
@ -577,10 +570,10 @@ impl Engine {
|
|||
);
|
||||
|
||||
self.raster_pipeline.draw(
|
||||
handle,
|
||||
*filter_method,
|
||||
&raster.handle,
|
||||
raster.filter_method,
|
||||
*bounds,
|
||||
*opacity,
|
||||
raster.opacity,
|
||||
_pixels,
|
||||
transform,
|
||||
clip_mask,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue