Windows Vista Forums
Vista Forums Home Join Vista Forums Webcasts Vista Tutorials Tags

Welcome to Vista Forums we are your forum to discuss Windows Vista x64 and x86 systems. Whether you need help or just want to post an idea you have on Vista, this is the forum for you.
Register at Vista forums...the world biggest Windows Vista resource Join Vista Forums Now

Go Back   Vista Forums > Microsoft Technical Newsgroups > Avalon

Re: Drawing difference between Avaon and GDI

Update your Vista Drivers Update Your Drivers Now!!
Closed Thread
 
Thread Tools Display Modes
Old 11-07-2006   #1 (permalink)
Seema Ramchandani [msft]
Guest


 

Re: Drawing difference between Avaon and GDI

Hello Lei,
I just wrote a blogpost on how you can get a sharp WPF line while keeping
the anti-aliased effects for diagonal/curved lines, check out the
SnapsToDevicePixels property:

http://blogs.msdn.com/seema/archive/...red-lines.aspx

Enjoy!
SeemaR
http://blogs.msdn.com/seema/


"Lei Jiang" wrote:

> I agree with you. Anti-aliasing really make lines looks smooth, but in some
> situation, I want the lines looks exactly the same width. If Avalon provide
> an option that make me could aligns the line with the center of a pixel, it
> would be great. In my situation, the precise position of a rectangle is not
> important, but a rectangle with different line width is not acceptable.
>
> "Frank Hileman" <frankhil@no.spamming.prodigesoftware.com> дÈëÏûÏ¢
> news:uPhlDxlWFHA.2256@TK2MSFTNGP14.phx.gbl...
> > For the rectangular labels in green, specifically: it is clear here that

> you
> > need a rectangle positioning and width that is precisely aligns the center
> > of a pixel with the center of the rectangle lines. If Avalon does not
> > provide an easy way to do this, it should be added, as it is a common
> > requirement.
> >
> > Anti-aliasing does not solve the fractional pixel problem. As you can see,
> > it can make the problem worse.
> >
> > In VG.net you can control anti-aliasing with a RenderAppearance property.

> If
> > you turn off anti-aliasing for the rectangle you will get the correct
> > effect. This property can also be set on a composite object, so that all
> > elements within are affected. A similar property in Avalon would be very
> > helpful. It would also be helpful to have pixel-perfect control over
> > positioning and sizes.
> >
> > Another thing that would help is control over the gamma correction used

> when
> > computing the fractional pixel values for anti-aliasing. A gamma

> correction
> > that looks good over a light background generally works poorly over a dark
> > background.
> >
> > As a "fudge" in Avalon you can make line widths thicker. This will not
> > correct the true problem of pixel misalignment -- some lines will appear
> > thicker than others. Pablo's comment about the resolution of display

> devices
> > increasing is true in the long-term -- but I suspect the term is very long
> > in the real world, perhaps 10 years to be widespread, and longer for
> > industrial applications, which often use low-end display devices.
> >
> > Regards,
> > Frank Hileman
> >
> > check out VG.net: http://www.vgdotnet.com
> > Animated vector graphics system
> > Integrated Visual Studio .NET graphics editor
> >
> > "Lei Jiang" <code@263.net> wrote in message
> > news:%23$%23CLFXWFHA.3712@TK2MSFTNGP09.phx.gbl...
> > >I am porting a graphics program from GDI to Avalon and found there are

> some
> > > differences between the drawing in Avalon and that in GDI.
> > >
> > > Please see the attachment(I have compressed them to save the bandwidth),
> > > lines and texts in both picture use the same
> > > color and size, but it seems the lines and texts in Avalon are more
> > > "obscure" and "gloomy". This makes the drawing not that clear.
> > >
> > > Is there any method that could make the drawing in Avalon more "birght"
> > > and
> > > "clear", just like that in GDI?
> > >
> > > Thanks!
> > >
> > >
> > >
> > >

> >
> >

>
>
>


My System SpecsSystem Spec
Closed Thread

Thread Tools
Display Modes



Similar Threads
Thread Thread Starter Forum Replies Last Post
Canvas does not allow drawing PhredBear Vista General 2 08-13-2008 02:07 PM
paintshop drawing etc Mudnox Vista General 0 10-30-2007 07:17 AM
Drawing Packages Andrew Aitchison Vista General 1 05-05-2007 05:16 PM
Drawing over title bar Keith Patrick Avalon 5 03-31-2007 03:38 PM
WPF Custom Drawing Weston Weems Avalon 3 08-24-2006 11:42 AM


Vistax64.com is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
Designer Media 2005-2008

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51