Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Mac: Drawing one pixel line in retina causes it to be too large, so h…

…andle that case specifically
  • Loading branch information...
commit 2862fb2cd78b88776e7d02b0cd017d431f31a247 1 parent 41c17f3
@cwensley cwensley authored
Showing with 5 additions and 0 deletions.
  1. +5 −0 Source/Eto.Platform.Mac/Drawing/GraphicsHandler.cs
View
5 Source/Eto.Platform.Mac/Drawing/GraphicsHandler.cs
@@ -212,6 +212,11 @@ void EndDrawing ()
public void DrawLine (Color color, int startx, int starty, int endx, int endy)
{
StartDrawing ();
+ if (startx == endx && starty == endy) {
+ // drawing a one pixel line in retina display draws more than just one pixel
+ DrawRectangle (color, startx, starty, 1, 1);
+ return;
+ }
context.SetStrokeColor (Generator.Convert (color));
context.SetLineCap (CGLineCap.Square);
context.SetLineWidth (1.0F);
Please sign in to comment.
Something went wrong with that request. Please try again.