But if I do something like this (VB2005) (forget the buffer)...
---snip---
Private Sub DrawCircle(ByVal g As Graphics)
Dim bm As New Bitmap(256, 256,
Imaging.PixelFormat.Format32bppArgb)
Dim gbuf As Graphics = Graphics.FromImage(bm)
bm.SetPixel(0, 0, Color.Blue)
gbuf.SmoothingMode = Drawing2D.SmoothingMode.HighQuality
gbuf.FillEllipse(Brushes.Black, 0, 0, 11, 11)
g.DrawImageUnscaled(bm, 0, 0)
gbuf.Dispose()
End Sub
---snip---
...I get an antialiased circle which, shall we say, does
not look the same if it was rotated 90 degrees.
Worse, when I turn off antialiasing, I get a 10x10 circle at
(1, 1) rather than a 12x12 one at (0, 0).
Suppose I wanted to create an icon editing program (this is
not the case, but the requirements are similar), I really need
better precision. If I draw a 12x12 circle in Photoshop, antialiased
or not, I get beautiful results.
Is there any way I can get GDI+ to deliver properly rendered
graphics?
Or will have I have to render everything myself, pixel by pixel
(using LockBitmap, etc)?
Or is there a 3rd-party library of better graphics primitives
rendering functions I can buy?
/Joergen Bech
--
Bob Powell [MVP]
Visual C#, System.Drawing
Ramuseco Limited .NET consulting
http://www.ramuseco.com
Find great Windows Forms articles in Windows Forms Tips and Tricks
http://www.bobpowell.net/tipstricks.htm
Answer those GDI+ questions with the GDI+ FAQ
http://www.bobpowell.net/faqmain.htm
All new articles provide code in C# and VB.NET.
Subscribe to the RSS feeds provided and never miss a new article.
"Joergen Bech" <jb...@post1.tele.dk> wrote in message
news:eat3u11md6bsco6lv...@4ax.com...
I guess I'll have to create a test form, allowing
me to try out all possible combinations, but ...
/JB
I see the 10,10 circle at 1,1 when the pixel mode is set to lowest quality.
I agree, this is a lousy looking result.
--
Bob Powell [MVP]
Visual C#, System.Drawing
Ramuseco Limited .NET consulting
http://www.ramuseco.com
Find great Windows Forms articles in Windows Forms Tips and Tricks
http://www.bobpowell.net/tipstricks.htm
Answer those GDI+ questions with the GDI+ FAQ
http://www.bobpowell.net/faqmain.htm
All new articles provide code in C# and VB.NET.
Subscribe to the RSS feeds provided and never miss a new article.
"Joergen Bech" <jb...@post1.tele.dk> wrote in message
news:del4u1d1o3iubpts3...@4ax.com...