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
Originally posted by Thraka October 26, 2023
I'm trying to flip some sprites contained within a sprite sheet, but it doesn't seem to work as expected. I'm doing these things:
get the path rectangle of where my sprite is located
clip the context to that rectangle
apply a flip to the clip context
It seems that flip is restricted to the clip for the output of the flip operation, but it's using the entire image as the input. How do I restrict flip to use the clip region as the source and target of the operation?
texture.Mutate(context =>{varoptions= context.Configuration.GetGraphicsOptions(); options.Antialias =false; context.Configuration.SetGraphicsOptions(options);// Rectangle from other library I'm usingvarfontGlyphRect= font.GetGlyphSourceRectangle(1);// Transform into SixLabors rectangleRectangleFrect=new(fontGlyphRect.X, fontGlyphRect.Y, fontGlyphRect.Width, fontGlyphRect.Height);// Convert rect to IPath to clip, then flip that clipped area context.Clip(new RectangularPolygon(rect),context2 => context2.Flip(FlipMode.Vertical));});
The text was updated successfully, but these errors were encountered:
Discussed in #2573
Originally posted by Thraka October 26, 2023
I'm trying to flip some sprites contained within a sprite sheet, but it doesn't seem to work as expected. I'm doing these things:
It seems that flip is restricted to the clip for the output of the flip operation, but it's using the entire image as the input. How do I restrict flip to use the clip region as the source and target of the operation?
The text was updated successfully, but these errors were encountered: