Windows Vista Forums
Vista Forums Home Join Vista Forums Windows 7 Forum Vista Tutorials Tags
Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks.

Go Back   Vista Forums > Misc Newsgroups > Avalon

Vista - Re: Drawing difference between Avaon and GDI

 
 
Old 11-07-2006   #1 (permalink)
Seema Ramchandani [msft]


 
 

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
 

Thread Tools


Similar Threads
Thread Forum
Canvas does not allow drawing Vista General
paintshop drawing etc Vista General
Drawing Packages Vista General


Vista Forums 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 Ltd

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