From df2bdad0f07a861147cb34dc45e15158e84751c5 Mon Sep 17 00:00:00 2001 From: Darafei Praliaskouski Date: Fri, 17 May 2013 18:13:25 +0300 Subject: [PATCH] [graphics] removed useless check for minimal width --- graphics/pen.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/graphics/pen.cpp b/graphics/pen.cpp index 7829d653c8..2686331e96 100644 --- a/graphics/pen.cpp +++ b/graphics/pen.cpp @@ -32,9 +32,6 @@ namespace graphics if (symbol != 0) m_icon = Icon::Info(symbol); - if (m_w < 1.0) - m_w = 1.0; - if (!m_icon.m_name.empty()) { m_isSolid = false; @@ -259,6 +256,11 @@ namespace graphics if (info.m_isSolid) { /// draw circle + + // we need symmetrical non-antialiased circle. To achive symmetry, ceil it to pixel boundary + // exact sub-pixel line width gets set later, and texture gets sceled down a bit for anti-aliasing + float r = ceil(info.m_w / 2.0); + agg::rendering_buffer buf( (unsigned char *)&v(0, 0), rect.SizeX(), @@ -275,7 +277,6 @@ namespace graphics agg::scanline_u8 s; agg::rasterizer_scanline_aa<> rasterizer; - float r = ceil(info.m_w / 2.0); agg::ellipse ell;