Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix rendering of source clipped images with the MCU renderer
The slide puzzle makes use of the source-clip-* properties and that unveiled three issues: * For the scale factor from image space to physical pixel space (sx/sy), use the source clip size, as we're only drawing those pixels. That means that the call sites of draw_image_impl need to pass the correct original image size if there is no source clip. * Similarly, the scaled_clip is in image coordinates, but needs to be relative to the source-clip-x/y * The geometry for the target rectangle on screen must originate at (0, 0) so that the apllication of sx/sy only changes the size.
- Loading branch information
Showing
1 changed file
with
62 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters