[mono-android] DrawLine problem with Paint.StrokeWidth = 1

Narcís Calvet narcis at steema.com
Wed Mar 16 11:35:38 EDT 2011


Hello,

 

I found a problem with Monodroid’s DrawLine method. Plotting a line with a
slight gradient on it using a Paint with  StrokeWidth = 1 doesn’t get
plotted, for example:

 

      Paint pen = new Paint();

      pen.Color = Color.Red;

      pen.StrokeWidth = 1;

      pen.SetStyle(Paint.Style.Stroke);

 

      canvas.DrawLine(100, 100, 150, 110, pen); //doesn't work

      //canvas.DrawLine(100, 100, 150, 90, pen); //doesn't work

      //canvas.DrawLine(100, 100, 150, 100, pen); //works

      //canvas.DrawLine(100, 100, 150, 190, pen); //works

 

Setting StrokeWidth > 1 the line is plotted. Is this a known issue? Is there
any workaround

 

Thanks in advance.

 

 

Best Regards,

Narcís Calvet

Steema Software

http://www.steema.com <http://www.steema.com/> 

http://twitter.com/SteemaSoftware

https://www.facebook.com/SteemaSoftware

 

 

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/mailman/private/monodroid/attachments/20110316/151b4b6a/attachment.html 


More information about the Monodroid mailing list