-
-
Notifications
You must be signed in to change notification settings - Fork 43
Open
Description
Discussed in #339
Originally posted by woutware September 3, 2024
Tested with SixLabors.ImageSharp 3.1.5, SixLabors.ImageSharp.Drawing 2.1.4, .NET 6.0:
Program to reproduce (Only draws line from (10, 10) to (20, 10). The part where it draws over itself is not drawn):
using System;
using SixLabors.ImageSharp.PixelFormats;
using SixLabors.ImageSharp;
using SixLabors.ImageSharp.Processing;
using SixLabors.ImageSharp.Drawing.Processing;
using SixLabors.Fonts;
namespace ConsoleApp {
public static class SixLaborsBug {
public static void DrawLineBug2() {
Image<Bgra32> bitmap = new Image<Bgra32>(Configuration.Default, 100, 100, new Bgra32(0, 0, 0));
// Only draws line from (10, 10) to (20, 10). The part where it draws over itself is not drawn.
bitmap.Mutate(
context => {
context.DrawLine(Color.Aqua, 1f, new PointF(10, 10), new PointF(90, 10), new PointF(20, 10));
}
);
bitmap.Save(@"C:\tmp\DrawLineBug2.png");
}
}
}
Attached is the output bitmap.
lindexi
Metadata
Metadata
Assignees
Labels
No labels