Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Windows Forms / Drawing / July 2005

Tip: Looking for answers? Try searching our database.

Pen Width less than one pixel.

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Bhavin - 29 Jul 2005 02:18 GMT
Hi,
Excuse me if this is too naive a question. Though i have been using
System.Drawing since some time now, i admit i donot know a LOT about it yet.

Is a pen-width of lesser than one pixel supported at all?

If i draw two lines with a pen of 0.5 pixels, alongside each other, is there
anyway to make them appear as if it were one line 1 pixel wide? Or will
anything less than 1 be taken as 1 by the .Net framework?

Thanks in advance for any help.

-bhavin
James Westgate - 29 Jul 2005 09:49 GMT
Hi,

The native underlying type is a float (single) so you can, however when the
lines are drawn you may or may not see the difference depending on a few
things liek the SmoothingMode and the ScaleTransform of the underlying
graphcis obejct, that is the zoom level and the level of smoothing. On a
printer however you will see the difference.

James

Signature

Create interactive diagrams and flowcharts with ERM Diagram at
http://www.crainiate.net

Take the ERM Tour at http://www.flowchartcontrol.com

> Hi,
> Excuse me if this is too naive a question. Though i have been using
[quoted text clipped - 10 lines]
>
> -bhavin
Bhavin - 30 Jul 2005 21:29 GMT
Thanks James.
I have been playing around with lines and pens a bit and wanted a
confirmation from someone from the community that the framework doesnt
default the pen width to 1 pixel as a minimum.

I could actually get a visual difference between a 0.5 pix line and 1 pix
line using AntiAlias and HighQuality Smoothing modes (after your reply).

Thanks again for the tips.

-Bhavin

> Hi,
>
[quoted text clipped - 20 lines]
>>
>> -bhavin

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.