Rajeeshcv.com

Sharing my knowledge

1px line issue in silverlight

Posted on: 24 May 2008 | Filed under: Siliverlight | 1 comments

You might have noticed an issue when creating a line with 1px stroke thickness, when rendering the stroke thickness is more than 1px which is not we are expecting.

Image

Output of this looks like below

Image

Actually this is happening because, the rendering algorithm used inside.

 

So what we need to do to fix this issue......???

Fix: Very simple, add a translate transformation of 0.5 for both X and Y axis.

Image

 

Now if you run, u will get a correct 1px line.

Image

If you like this please share :

Comments

crackym

crackym

Commented one year ago
Thank U~

Leave your comments