forked from organicmaps/organicmaps
setting for rendering precise solid path instead of fast and non-accurate.
This commit is contained in:
parent
b7c0883f04
commit
5714f24665
7 changed files with 17 additions and 6 deletions
|
@ -125,6 +125,7 @@ RenderPolicyMT::RenderPolicyMT(RenderPolicy::Params const & p)
|
|||
dp.m_visualScale = VisualScale();
|
||||
dp.m_isSynchronized = false;
|
||||
dp.m_useGuiResources = true;
|
||||
dp.m_fastSolidPath = false;
|
||||
|
||||
m_drawer.reset(new DrawerYG(dp));
|
||||
|
||||
|
|
|
@ -127,6 +127,7 @@ RenderPolicyST::RenderPolicyST(Params const & p)
|
|||
dp.m_visualScale = VisualScale();
|
||||
dp.m_isSynchronized = false;
|
||||
dp.m_useGuiResources = true;
|
||||
dp.m_fastSolidPath = false;
|
||||
|
||||
m_drawer.reset();
|
||||
m_drawer.reset(new DrawerYG(dp));
|
||||
|
|
|
@ -103,6 +103,7 @@ SimpleRenderPolicy::SimpleRenderPolicy(Params const & p)
|
|||
dp.m_skin = make_shared_ptr(yg::loadSkin(m_resourceManager, SkinName()));
|
||||
dp.m_visualScale = VisualScale();
|
||||
dp.m_isSynchronized = true;
|
||||
dp.m_fastSolidPath = false;
|
||||
|
||||
m_drawer.reset(new DrawerYG(dp));
|
||||
|
||||
|
|
|
@ -139,6 +139,7 @@ TilingRenderPolicyMT::TilingRenderPolicyMT(Params const & p)
|
|||
dp.m_visualScale = VisualScale();
|
||||
dp.m_useGuiResources = true;
|
||||
dp.m_isSynchronized = false;
|
||||
dp.m_fastSolidPath = false;
|
||||
|
||||
m_drawer.reset(new DrawerYG(dp));
|
||||
|
||||
|
|
|
@ -154,6 +154,7 @@ TilingRenderPolicyST::TilingRenderPolicyST(Params const & p)
|
|||
dp.m_visualScale = VisualScale();
|
||||
dp.m_useGuiResources = true;
|
||||
dp.m_isSynchronized = false;
|
||||
dp.m_fastSolidPath = false;
|
||||
// p.m_isDebugging = true;
|
||||
|
||||
m_drawer.reset(new DrawerYG(dp));
|
||||
|
|
|
@ -10,11 +10,15 @@ namespace yg
|
|||
{
|
||||
namespace gl
|
||||
{
|
||||
PathRenderer::Params::Params() : m_drawPathes(true)
|
||||
PathRenderer::Params::Params()
|
||||
: m_drawPathes(true),
|
||||
m_fastSolidPath(true)
|
||||
{}
|
||||
|
||||
PathRenderer::PathRenderer(Params const & params)
|
||||
: base_t(params), m_drawPathes(params.m_drawPathes)
|
||||
: base_t(params),
|
||||
m_drawPathes(params.m_drawPathes),
|
||||
m_fastSolidPath(params.m_fastSolidPath)
|
||||
{}
|
||||
|
||||
void PathRenderer::drawPath(m2::PointD const * points, size_t pointsCount, double offset, uint32_t styleID, double depth)
|
||||
|
@ -38,9 +42,9 @@ namespace yg
|
|||
ASSERT(style->m_cat == ResourceStyle::ELineStyle, ());
|
||||
|
||||
LineStyle const * lineStyle = static_cast<LineStyle const *>(style);
|
||||
if (lineStyle->m_isSolid)
|
||||
if (m_fastSolidPath && lineStyle->m_isSolid)
|
||||
{
|
||||
drawSolidPath(points, pointsCount, styleID, depth);
|
||||
drawFastSolidPath(points, pointsCount, styleID, depth);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -226,7 +230,7 @@ namespace yg
|
|||
}
|
||||
}
|
||||
|
||||
void PathRenderer::drawSolidPath(m2::PointD const * points, size_t pointsCount, uint32_t styleID, double depth)
|
||||
void PathRenderer::drawFastSolidPath(m2::PointD const * points, size_t pointsCount, uint32_t styleID, double depth)
|
||||
{
|
||||
ASSERT_GREATER_OR_EQUAL(pointsCount, 2, ());
|
||||
ResourceStyle const * style(skin()->fromID(styleID));
|
||||
|
|
|
@ -14,8 +14,9 @@ namespace yg
|
|||
unsigned m_pathCount;
|
||||
unsigned m_pointsCount;
|
||||
bool m_drawPathes;
|
||||
bool m_fastSolidPath;
|
||||
|
||||
void drawSolidPath(m2::PointD const * points, size_t pointsCount, uint32_t styleID, double depth);
|
||||
void drawFastSolidPath(m2::PointD const * points, size_t pointsCount, uint32_t styleID, double depth);
|
||||
|
||||
public:
|
||||
|
||||
|
@ -24,6 +25,7 @@ namespace yg
|
|||
struct Params : base_t::Params
|
||||
{
|
||||
bool m_drawPathes;
|
||||
bool m_fastSolidPath;
|
||||
Params();
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue