forked from organicmaps/organicmaps
fixed path offset processing in drawSymbolPath.
This commit is contained in:
parent
ef39d3264f
commit
05ef929575
1 changed files with 13 additions and 0 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Reference in a new issue