From c7196470eff3d74a38350051352ac35ef30c8c8e Mon Sep 17 00:00:00 2001 From: Anton Marunko Date: Tue, 29 Jan 2019 10:14:12 +0600 Subject: [PATCH] Fix lint warnings --- Source/render/TextRenderer.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Source/render/TextRenderer.swift b/Source/render/TextRenderer.swift index 27129cea..6f19a29f 100644 --- a/Source/render/TextRenderer.swift +++ b/Source/render/TextRenderer.swift @@ -58,14 +58,14 @@ class TextRenderer: NodeRenderer { attributes[NSAttributedString.Key.strokeColor] = getTextColor(c) } var width = stroke.width - if (hasFill) { + if hasFill { // To use fill and stroke at the same time width should be negative: // https://developer.apple.com/library/archive/qa/qa1531/_index.html width *= -1 } attributes[NSAttributedString.Key.strokeWidth] = width as NSObject? } - if (attributes.count > 1) { + if attributes.count > 1 { MGraphicsPushContext(context) message.draw(in: getBounds(font), withAttributes: attributes) MGraphicsPopContext()