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
When drawing images with image attributes having wrap mode set to WrapMode.TileFlipXY, the image is sometimes repeated outside the destination rectangle. Seems a bit random when this happens and if it is repeated for X, Y or both.
The below code:
using var backBuffer = new Bitmap(973, 560);
using (var graphics = Graphics.FromImage(backBuffer))
{
graphics.Clear(Color.White);
using var testImage = new Bitmap(1570, 1377);
using (var graphics2 = Graphics.FromImage(testImage))
{
graphics2.Clear(Color.Red);
using var pen = new Pen(Color.Black, 10);
graphics2.DrawLine(pen, 0, 0, testImage.Width, testImage.Height);
graphics2.DrawRectangle(pen, 0, 0, testImage.Width, testImage.Height);
}
var destRect = new Rectangle(192, 49, 486, 360);
var imageAttributes = new ImageAttributes();
imageAttributes.SetWrapMode(WrapMode.TileFlipXY);
graphics.DrawImage(testImage, destRect, 0, 0, testImage.Width, testImage.Height, GraphicsUnit.Pixel, imageAttributes);
}
Results in this image:
Expected it to like like this (Windows):
We are building libgdiplus from main.
The text was updated successfully, but these errors were encountered:
When drawing images with image attributes having wrap mode set to WrapMode.TileFlipXY, the image is sometimes repeated outside the destination rectangle. Seems a bit random when this happens and if it is repeated for X, Y or both.
The below code:
Results in this image:
Expected it to like like this (Windows):
We are building libgdiplus from main.
The text was updated successfully, but these errors were encountered: