AntiAliasing DrawLine? Possible?

S

Smoke

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
 
F

Frank Eller [MVP]

Hi,
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?

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,
 
F

Frank Eller [MVP]

Sorry, I used C# code in the answer ... :

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

Regards,
 
S

Smoke

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!
 
H

Herfried K. Wagner [MVP]

* "Smoke said:
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?

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

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top