[core] Render a circle if either the color or stroke color are visible
This updates the circle paint check to pass if the circle stroke is visible but: * The circle color is clear * The circle is transparent * The circle has a radius of 0 Previously, a transparent circle or a circle with a radius of 0 would cause the layer to be passed up even if the circle stroke color had a non zero alpha.
This commit is contained in:
committed by
John Firebaugh
parent
ab20d38883
commit
9924535415
Submodule mapbox-gl-js updated: 2af18eebca...fd73395ef7
@@ -14,9 +14,12 @@ void CircleLayer::Impl::cascade(const CascadeParameters& parameters) {
|
||||
bool CircleLayer::Impl::evaluate(const PropertyEvaluationParameters& parameters) {
|
||||
paint.evaluate(parameters);
|
||||
|
||||
passes = (paint.evaluated.get<CircleRadius>().constantOr(1) > 0
|
||||
&& paint.evaluated.get<CircleColor>().constantOr(Color::black()).a > 0
|
||||
&& paint.evaluated.get<CircleOpacity>().constantOr(1) > 0)
|
||||
passes = ((paint.evaluated.get<CircleRadius>().constantOr(1) > 0 ||
|
||||
paint.evaluated.get<CircleStrokeWidth>().constantOr(1) > 0)
|
||||
&& (paint.evaluated.get<CircleColor>().constantOr(Color::black()).a > 0 ||
|
||||
paint.evaluated.get<CircleStrokeColor>().constantOr(Color::black()).a > 0)
|
||||
&& (paint.evaluated.get<CircleOpacity>().constantOr(1) > 0 ||
|
||||
paint.evaluated.get<CircleStrokeOpacity>().constantOr(1) > 0))
|
||||
? RenderPass::Translucent : RenderPass::None;
|
||||
|
||||
return paint.hasTransition();
|
||||
|
||||
Reference in New Issue
Block a user