473,387 Members | 1,897 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

AntiAliasing DrawLine? Possible?

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
Nov 20 '05 #1
4 5741
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,

--
Frank Eller [.NET MVP]
www.frankeller.de
..NET Developers Group Munich- www.munichdot.net
Nov 20 '05 #2
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
Nov 20 '05 #3
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!

"Frank Eller [MVP]" <fe@frankeller.de> wrote in message news:#S*************@TK2MSFTNGP11.phx.gbl...
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,

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

Nov 20 '05 #4
* "Smoke" <sm***@netgate.com.uy> scripsit:
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.

--
Herfried K. Wagner [MVP]
<http://www.mvps.org/dotnet>
Nov 20 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Leif Wessman | last post by:
From: http://www.php.net/manual/en/function.imagettftext.php "color is the color index. Using the negative of a color index has the effect of turning off antialiasing." I'm using a bundled...
4
by: Jon Cosby | last post by:
I'm using this to draw rectangles in a PictureBox image. Not all of the rectangles are complete, and after drawing several, some of them start disapearing. What's the reason for this? Pen...
1
by: Rich | last post by:
Hello, I am trying to draw a graph on a form. I can draw the box using drawline, and bars inside the box using drawrectangle, but when I try to draw a line inside the box the inner lines are...
2
by: google_groups3 | last post by:
Hi, is it better practise to draw a line on my form using the Graphics.DrawLine command or should I use a label control instead? I am refering to overall speed of the form and amount of memory...
2
by: John | last post by:
I created a number of pictureboxes in a panel, and want to draw lines in those pictureboxes but I cannot. Please see the following code and make corrections. Thanks. Private Sub...
0
by: Lila Godel | last post by:
I am migrating my VB6 GoldMine add-ons to VB.NET to allow for enhancements. I have no problem getting text to print, but I cannot get the 4 PrintPage events that are needed to print a line to work....
0
by: Turbot | last post by:
Does anyone know how to stop a RichTextBox control from antialiasing the text you enter into it?
3
by: Ben Bush | last post by:
I had the following code and when I clicked the left mouse button one time. I got green line and the second click got a purple line and the green disappeared. I was confused by two questions:...
2
by: Hvid Hat | last post by:
Hi Is it somehow possible to call Graphics.DrawLine with List<Point>? Does it only take Point arrays? If so, how can I (easily) convert my List<Point> to a Point array?
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.