This repository was archived by the owner on Aug 8, 2023. It is now read-only.
Repository navigation
improve round line joins for semi-transparent lines - #1839
Merged
Merged
Conversation
This was referenced Jul 6, 2015
Contributor
Author
|
@incanus changing tolerance from 3 to 10 looks good to me. Can you check if it looks ok to you? diff --git a/src/mbgl/map/annotation.cpp b/src/mbgl/map/annotation.cpp
index a0f65cd..71b479d 100644
--- a/src/mbgl/map/annotation.cpp
+++ b/src/mbgl/map/annotation.cpp
@@ -133,7 +133,7 @@ AnnotationManager::addTileFeature(const uint32_t annotationID,
features.push_back(Convert::create(Tags(), featureType, rings));
- shapeTilers.emplace(annotationID, std::make_unique<GeoJSONVT>(features, maxZoom));
+ shapeTilers.emplace(annotationID, std::make_unique<GeoJSONVT>(features, maxZoom, 4, 100, 10));
} else {
|
Contributor
Looks pretty good to me as well. |
Contributor
mapbox/mapbox-gl-js#1359 Round line joins used to be drawn by adding a semicircle cap to the end of each segment. This looked fine for opaque lines not for semi-transparent lines. This changes the triangulation so that round line joins don't overlap with segments. The gap between segments is filled with small triangles that look like pie slices. The edge of the round linejoin is made up of many short straight lines that look round at the sizes we draw lines. Since sharp angles are infrequent, this does not significantly affect the total number of triangles created. Joins for angles that are really sharp are still drawn with overlap.
to make them look better when drawn semi-transparently
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
ports mapbox/mapbox-gl-js#1359