Groups | Blog | Home
all groups > vb.net > january 2004 >

vb.net : AntiAliasing DrawLine? Possible?


Smoke
1/17/2004 9:16:24 PM
It is possible to draw a line on a control using AA? basically, i need the normal .DrawLine funcion but that support antia aliasing.
is this possible? can somebody tellme how?

Thanks for the help, as usual

Smoke
1/17/2004 9:27:06 PM
Oh my godness, you are my hero, i never thought it was that easy...
I was already expecting a "use DX9 your lammer" answer, hehe

Thanks a lot!

[quoted text, click to view]

Frank Eller [MVP]
1/18/2004 1:25:08 AM
Hi,

[quoted text, click to view]

Antialiasing is set in the Graphics object of your control, for example with
a Form:

Graphics g = frm.CreateGraphics();
g.SmoothingMode = SmoothingMode.AntiAlias;
g.DrawLine(...);
g.Dispose();

Regards,

--
Frank Eller [.NET MVP]
www.frankeller.de
..NET Developers Group Munich- www.munichdot.net

Frank Eller [MVP]
1/18/2004 1:26:54 AM
Sorry, I used C# code in the answer ... :

Dim g as Graphics
g = frm1.CreateGraphics()
g.SmoothingMode = SmoothingMode.AntiAlias
....

Regards,

--
Frank Eller [.NET MVP]
www.frankeller.de
..NET Developers Group Munich- www.munichdot.net

hirf-spam-me-here NO[at]SPAM gmx.at
1/18/2004 2:21:45 AM
* "Smoke" <smoke@netgate.com.uy> scripsit:
[quoted text, click to view]

Set the 'Graphics' object's 'SmootingMode' to an appropriate value
before drawing the line.

--
Herfried K. Wagner [MVP]
AddThis Social Bookmark Button