fixed path offset processing in drawSymbolPath.

This commit is contained in:
rachytski 2013-01-18 12:55:55 +03:00 committed by Alex Zolotarev
parent ef39d3264f
commit 05ef929575

View file

@ -59,6 +59,11 @@ namespace graphics
PathPoint pt = pv.front();
double step = pen->m_info.m_step;
if (offset < 0)
offset = fmod(offset, step);
pt = pv.offsetPoint(pt, offset);
m2::RectU texRect = pen->m_texRect;
@ -70,6 +75,14 @@ namespace graphics
double const hw = w / 2.0;
double const hh = h / 2.0;
/// do not render start symbol if it's
/// completely outside the first segment.
if (offset + w < 0)
{
pv.offsetPoint(pt, step);
offset += step;
}
shared_ptr<gl::BaseTexture> tex = pipeline(pen->m_pipelineID).texture();
while (true)