You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I seem to have run into an issue where the transform I set (translation only at this point) has no effect on clips.
Take the example below
ctx.clear(SolidSource::from_unpremultiplied_argb(0xff,0xff,0xff,0xff));
ctx.set_transform(&Transform::translation(50.,50.));
ctx.push_clip_rect(IntRect{min:IntPoint::zero(),max:IntPoint::new(100,100)});let fill = Source::Solid(SolidSource::from_unpremultiplied_argb(0xff,0xff,0,0));
ctx.fill_rect(0.,0.,200.,200.,&fill,&DrawOptions::default());
The result I get is the following:
If the transform were working, it would begin at (50, 50) and extend to (150, 150), however, reaches from (0, 0) to (100, 100). You can tell because the red rectangle is only 50x50 and offset to (50, 50).
If this is expected, what would the best approach be for computing the absolute transform, such that I can offset the clip accordingly?
The text was updated successfully, but these errors were encountered:
I seem to have run into an issue where the transform I set (translation only at this point) has no effect on clips.
Take the example below
The result I get is the following:

If the transform were working, it would begin at (50, 50) and extend to (150, 150), however, reaches from (0, 0) to (100, 100). You can tell because the red rectangle is only 50x50 and offset to (50, 50).
If this is expected, what would the best approach be for computing the absolute transform, such that I can offset the clip accordingly?
The text was updated successfully, but these errors were encountered: