{"action":"created","comment":{"url":"https://api.github.com/repos/mapsme/omim/pulls/comments/124570794","pull_request_review_id":46872574,"id":124570794,"diff_hunk":"@@ -1067,31 +1094,38 @@ void ApplyLineFeatureAdditional::Finish(ref_ptr<dp::TextureManager> texMng,\n         continue;\n \n       if (m_shieldRule != nullptr && !roadShields.empty())\n-      {\n-        auto const & offsets = shape->GetOffsets();\n-        ASSERT(!offsets.empty(), ());\n-        if (offsets.size() == 1)\n-        {\n-          shieldPositions.push_back(spline->GetPoint(0.5 * spline->GetLength()).m_pos);\n-        }\n-        else\n-        {\n-          for (size_t i = 0; i + 1 < offsets.size(); i++)\n-          {\n-            double const p = 0.5 * (offsets[i] + offsets[i + 1]);\n-            shieldPositions.push_back(spline->GetPoint(p).m_pos);\n-          }\n-        }\n-      }\n+        CalculateRoadShieldPositions(shape->GetOffsets(), spline, shieldPositions);\n \n       m_insertShape(std::move(shape));\n       baseTextIndex += kPathTextBaseTextStep;\n     }\n   }\n+  else if (m_shieldRule != nullptr && !roadShields.empty())\n+  {\n+    for (auto const & spline : m_clippedSplines)\n+    {\n+      float const vs = static_cast<float>(df::VisualParams::Instance().GetVisualScale());\n+      float const pixelLength = 300.0f * vs;\n+      std::vector<float> offsets;\n+      PathTextLayout::CalculatePositions(static_cast<float>(spline->GetLength()),\n+                                         m_currentScaleGtoP, pixelLength, offsets);\n+      if (!offsets.empty())\n+        CalculateRoadShieldPositions(offsets, spline, shieldPositions);\n+    }\n+  }\n \n   if (shieldPositions.empty())\n     return;\n \n+  ASSERT(m_shieldRule != nullptr, ());\n+  int constexpr kDefaultMinDistance = 50;\n+  double const mainScale = df::VisualParams::Instance().GetVisualScale();","path":"drape_frontend/apply_feature_functors.cpp","position":147,"original_position":147,"commit_id":"6f51e11a927449062400b2bc9f345aafcd8a4f01","original_commit_id":"6f51e11a927449062400b2bc9f345aafcd8a4f01","user":{"login":"darina","id":1092934,"avatar_url":"https://avatars3.githubusercontent.com/u/1092934?v=3","gravatar_id":"","url":"https://api.github.com/users/darina","html_url":"https://github.com/darina","followers_url":"https://api.github.com/users/darina/followers","following_url":"https://api.github.com/users/darina/following{/other_user}","gists_url":"https://api.github.com/users/darina/gists{/gist_id}","starred_url":"https://api.github.com/users/darina/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/darina/subscriptions","organizations_url":"https://api.github.com/users/darina/orgs","repos_url":"https://api.github.com/users/darina/repos","events_url":"https://api.github.com/users/darina/events{/privacy}","received_events_url":"https://api.github.com/users/darina/received_events","type":"User","site_admin":false},"body":"предлагаю vs назвать, как везде","created_at":"2017-06-28T15:17:58Z","updated_at":"2017-06-28T15:17:58Z","html_url":"https://github.com/mapsme/omim/pull/6416#discussion_r124570794","pull_request_url":"https://api.github.com/repos/mapsme/omim/pulls/6416","_links":{"self":{"href":"https://api.github.com/repos/mapsme/omim/pulls/comments/124570794"},"html":{"href":"https://github.com/mapsme/omim/pull/6416#discussion_r124570794"},"pull_request":{"href":"https://api.github.com/repos/mapsme/omim/pulls/6416"}}},"pull_request":{"url":"https://api.github.com/repos/mapsme/omim/pulls/6416","id":127943713,"html_url":"https://github.com/mapsme/omim/pull/6416","diff_url":"https://github.com/mapsme/omim/pull/6416.diff","patch_url":"https://github.com/mapsme/omim/pull/6416.patch","issue_url":"https://api.github.com/repos/mapsme/omim/issues/6416","number":6416,"state":"open","locked":false,"title":"Fixed shields rendering on roads without name","user":{"login":"rokuz","id":5437220,"avatar_url":"https://avatars2.githubusercontent.com/u/5437220?v=3","gravatar_id":"","url":"https://api.github.com/users/rokuz","html_url":"https://github.com/rokuz","followers_url":"https://api.github.com/users/rokuz/followers","following_url":"https://api.github.com/users/rokuz/following{/other_user}","gists_url":"https://api.github.com/users/rokuz/gists{/gist_id}","starred_url":"https://api.github.com/users/rokuz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rokuz/subscriptions","organizations_url":"https://api.github.com/users/rokuz/orgs","repos_url":"https://api.github.com/users/rokuz/repos","events_url":"https://api.github.com/users/rokuz/events{/privacy}","received_events_url":"https://api.github.com/users/rokuz/received_events","type":"User","site_admin":false},"body":"https://jira.mail.ru/browse/MAPSME-4808","created_at":"2017-06-28T14:56:33Z","updated_at":"2017-06-28T15:17:58Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ffdd669454259f34702fb15767ead491901088f0","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/mapsme/omim/pulls/6416/commits","review_comments_url":"https://api.github.com/repos/mapsme/omim/pulls/6416/comments","review_comment_url":"https://api.github.com/repos/mapsme/omim/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mapsme/omim/issues/6416/comments","statuses_url":"https://api.github.com/repos/mapsme/omim/statuses/6f51e11a927449062400b2bc9f345aafcd8a4f01","head":{"label":"rokuz:fxied-shield-empty-names","ref":"fxied-shield-empty-names","sha":"6f51e11a927449062400b2bc9f345aafcd8a4f01","user":{"login":"rokuz","id":5437220,"avatar_url":"https://avatars2.githubusercontent.com/u/5437220?v=3","gravatar_id":"","url":"https://api.github.com/users/rokuz","html_url":"https://github.com/rokuz","followers_url":"https://api.github.com/users/rokuz/followers","following_url":"https://api.github.com/users/rokuz/following{/other_user}","gists_url":"https://api.github.com/users/rokuz/gists{/gist_id}","starred_url":"https://api.github.com/users/rokuz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rokuz/subscriptions","organizations_url":"https://api.github.com/users/rokuz/orgs","repos_url":"https://api.github.com/users/rokuz/repos","events_url":"https://api.github.com/users/rokuz/events{/privacy}","received_events_url":"https://api.github.com/users/rokuz/received_events","type":"User","site_admin":false},"repo":{"id":43427777,"name":"omim","full_name":"rokuz/omim","owner":{"login":"rokuz","id":5437220,"avatar_url":"https://avatars2.githubusercontent.com/u/5437220?v=3","gravatar_id":"","url":"https://api.github.com/users/rokuz","html_url":"https://github.com/rokuz","followers_url":"https://api.github.com/users/rokuz/followers","following_url":"https://api.github.com/users/rokuz/following{/other_user}","gists_url":"https://api.github.com/users/rokuz/gists{/gist_id}","starred_url":"https://api.github.com/users/rokuz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rokuz/subscriptions","organizations_url":"https://api.github.com/users/rokuz/orgs","repos_url":"https://api.github.com/users/rokuz/repos","events_url":"https://api.github.com/users/rokuz/events{/privacy}","received_events_url":"https://api.github.com/users/rokuz/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/rokuz/omim","description":"MAPS.ME - Offline OpenStreetMap maps for iOS/Android/Mac/Linux/Windows","fork":true,"url":"https://api.github.com/repos/rokuz/omim","forks_url":"https://api.github.com/repos/rokuz/omim/forks","keys_url":"https://api.github.com/repos/rokuz/omim/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rokuz/omim/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rokuz/omim/teams","hooks_url":"https://api.github.com/repos/rokuz/omim/hooks","issue_events_url":"https://api.github.com/repos/rokuz/omim/issues/events{/number}","events_url":"https://api.github.com/repos/rokuz/omim/events","assignees_url":"https://api.github.com/repos/rokuz/omim/assignees{/user}","branches_url":"https://api.github.com/repos/rokuz/omim/branches{/branch}","tags_url":"https://api.github.com/repos/rokuz/omim/tags","blobs_url":"https://api.github.com/repos/rokuz/omim/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rokuz/omim/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rokuz/omim/git/refs{/sha}","trees_url":"https://api.github.com/repos/rokuz/omim/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rokuz/omim/statuses/{sha}","languages_url":"https://api.github.com/repos/rokuz/omim/languages","stargazers_url":"https://api.github.com/repos/rokuz/omim/stargazers","contributors_url":"https://api.github.com/repos/rokuz/omim/contributors","subscribers_url":"https://api.github.com/repos/rokuz/omim/subscribers","subscription_url":"https://api.github.com/repos/rokuz/omim/subscription","commits_url":"https://api.github.com/repos/rokuz/omim/commits{/sha}","git_commits_url":"https://api.github.com/repos/rokuz/omim/git/commits{/sha}","comments_url":"https://api.github.com/repos/rokuz/omim/comments{/number}","issue_comment_url":"https://api.github.com/repos/rokuz/omim/issues/comments{/number}","contents_url":"https://api.github.com/repos/rokuz/omim/contents/{+path}","compare_url":"https://api.github.com/repos/rokuz/omim/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rokuz/omim/merges","archive_url":"https://api.github.com/repos/rokuz/omim/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rokuz/omim/downloads","issues_url":"https://api.github.com/repos/rokuz/omim/issues{/number}","pulls_url":"https://api.github.com/repos/rokuz/omim/pulls{/number}","milestones_url":"https://api.github.com/repos/rokuz/omim/milestones{/number}","notifications_url":"https://api.github.com/repos/rokuz/omim/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rokuz/omim/labels{/name}","releases_url":"https://api.github.com/repos/rokuz/omim/releases{/id}","deployments_url":"https://api.github.com/repos/rokuz/omim/deployments","created_at":"2015-09-30T10:51:34Z","updated_at":"2016-01-11T09:50:49Z","pushed_at":"2017-06-28T14:56:08Z","git_url":"git://github.com/rokuz/omim.git","ssh_url":"git@github.com:rokuz/omim.git","clone_url":"https://github.com/rokuz/omim.git","svn_url":"https://github.com/rokuz/omim","homepage":null,"size":3181008,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"mapsme:master","ref":"master","sha":"de6624671df9c9ea18d3af458be832a265d4d3fd","user":{"login":"mapsme","id":14185141,"avatar_url":"https://avatars2.githubusercontent.com/u/14185141?v=3","gravatar_id":"","url":"https://api.github.com/users/mapsme","html_url":"https://github.com/mapsme","followers_url":"https://api.github.com/users/mapsme/followers","following_url":"https://api.github.com/users/mapsme/following{/other_user}","gists_url":"https://api.github.com/users/mapsme/gists{/gist_id}","starred_url":"https://api.github.com/users/mapsme/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mapsme/subscriptions","organizations_url":"https://api.github.com/users/mapsme/orgs","repos_url":"https://api.github.com/users/mapsme/repos","events_url":"https://api.github.com/users/mapsme/events{/privacy}","received_events_url":"https://api.github.com/users/mapsme/received_events","type":"Organization","site_admin":false},"repo":{"id":42798033,"name":"omim","full_name":"mapsme/omim","owner":{"login":"mapsme","id":14185141,"avatar_url":"https://avatars2.githubusercontent.com/u/14185141?v=3","gravatar_id":"","url":"https://api.github.com/users/mapsme","html_url":"https://github.com/mapsme","followers_url":"https://api.github.com/users/mapsme/followers","following_url":"https://api.github.com/users/mapsme/following{/other_user}","gists_url":"https://api.github.com/users/mapsme/gists{/gist_id}","starred_url":"https://api.github.com/users/mapsme/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mapsme/subscriptions","organizations_url":"https://api.github.com/users/mapsme/orgs","repos_url":"https://api.github.com/users/mapsme/repos","events_url":"https://api.github.com/users/mapsme/events{/privacy}","received_events_url":"https://api.github.com/users/mapsme/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mapsme/omim","description":"🗺️ MAPS.ME — Offline OpenStreetMap maps for iOS and Android","fork":false,"url":"https://api.github.com/repos/mapsme/omim","forks_url":"https://api.github.com/repos/mapsme/omim/forks","keys_url":"https://api.github.com/repos/mapsme/omim/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mapsme/omim/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mapsme/omim/teams","hooks_url":"https://api.github.com/repos/mapsme/omim/hooks","issue_events_url":"https://api.github.com/repos/mapsme/omim/issues/events{/number}","events_url":"https://api.github.com/repos/mapsme/omim/events","assignees_url":"https://api.github.com/repos/mapsme/omim/assignees{/user}","branches_url":"https://api.github.com/repos/mapsme/omim/branches{/branch}","tags_url":"https://api.github.com/repos/mapsme/omim/tags","blobs_url":"https://api.github.com/repos/mapsme/omim/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mapsme/omim/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mapsme/omim/git/refs{/sha}","trees_url":"https://api.github.com/repos/mapsme/omim/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mapsme/omim/statuses/{sha}","languages_url":"https://api.github.com/repos/mapsme/omim/languages","stargazers_url":"https://api.github.com/repos/mapsme/omim/stargazers","contributors_url":"https://api.github.com/repos/mapsme/omim/contributors","subscribers_url":"https://api.github.com/repos/mapsme/omim/subscribers","subscription_url":"https://api.github.com/repos/mapsme/omim/subscription","commits_url":"https://api.github.com/repos/mapsme/omim/commits{/sha}","git_commits_url":"https://api.github.com/repos/mapsme/omim/git/commits{/sha}","comments_url":"https://api.github.com/repos/mapsme/omim/comments{/number}","issue_comment_url":"https://api.github.com/repos/mapsme/omim/issues/comments{/number}","contents_url":"https://api.github.com/repos/mapsme/omim/contents/{+path}","compare_url":"https://api.github.com/repos/mapsme/omim/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mapsme/omim/merges","archive_url":"https://api.github.com/repos/mapsme/omim/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mapsme/omim/downloads","issues_url":"https://api.github.com/repos/mapsme/omim/issues{/number}","pulls_url":"https://api.github.com/repos/mapsme/omim/pulls{/number}","milestones_url":"https://api.github.com/repos/mapsme/omim/milestones{/number}","notifications_url":"https://api.github.com/repos/mapsme/omim/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mapsme/omim/labels{/name}","releases_url":"https://api.github.com/repos/mapsme/omim/releases{/id}","deployments_url":"https://api.github.com/repos/mapsme/omim/deployments","created_at":"2015-09-20T02:57:13Z","updated_at":"2017-06-28T14:26:38Z","pushed_at":"2017-06-28T14:56:33Z","git_url":"git://github.com/mapsme/omim.git","ssh_url":"git@github.com:mapsme/omim.git","clone_url":"https://github.com/mapsme/omim.git","svn_url":"https://github.com/mapsme/omim","homepage":"","size":3213149,"stargazers_count":2308,"watchers_count":2308,"language":"C++","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":474,"mirror_url":null,"open_issues_count":513,"forks":474,"open_issues":513,"watchers":2308,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mapsme/omim/pulls/6416"},"html":{"href":"https://github.com/mapsme/omim/pull/6416"},"issue":{"href":"https://api.github.com/repos/mapsme/omim/issues/6416"},"comments":{"href":"https://api.github.com/repos/mapsme/omim/issues/6416/comments"},"review_comments":{"href":"https://api.github.com/repos/mapsme/omim/pulls/6416/comments"},"review_comment":{"href":"https://api.github.com/repos/mapsme/omim/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mapsme/omim/pulls/6416/commits"},"statuses":{"href":"https://api.github.com/repos/mapsme/omim/statuses/6f51e11a927449062400b2bc9f345aafcd8a4f01"}}}}
{"actor":{"display_login":"darina"}}