From 93dd045f275c263dad6a373414483aef1d55e5f4 Mon Sep 17 00:00:00 2001 From: nek0 Date: Sun, 11 Dec 2016 00:09:57 +0100 Subject: [PATCH] simplified line width --- src/Affection/Draw.hs | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/Affection/Draw.hs b/src/Affection/Draw.hs index 6e1c4e4..a31c96d 100644 --- a/src/Affection/Draw.hs +++ b/src/Affection/Draw.hs @@ -28,11 +28,9 @@ drawRect buf color dt rect@G.GeglRectangle{..} = let col = colorize pc color in G.Pixel px py col - Line width -> - if (px >= rectangleX && px <= (rectangleX + width) || - px <= (rectangleX + rectangleWidth) && px >= (rectangleX + rectangleWidth - width)) && - (py >= rectangleY && py <= (rectangleY + width) || - py <= (rectangleY + rectangleHeight) && py >= (rectangleY + rectangleHeight - width)) + Line size -> + if not ((px >= (rectangleX + size) && px < (rectangleX + rectangleWidth - size)) && + (py >= (rectangleY + size) && py < (rectangleY + rectangleHeight - size))) then let col = colorize pc color in G.Pixel px py col