Fix issue with shadow color of rendering
This commit is contained in:
parent
7c3ff2d5cb
commit
89975f6754
3 changed files with 11 additions and 3 deletions
|
@ -21,9 +21,9 @@
|
|||
<renderingAttribute name="shadowRendering">
|
||||
<!-- next line corrects for shadowColor appearing very dark with solid shadow in day view -->
|
||||
<filter minzoom="14" nightMode="false" attrIntValue="3" shadowColor="#969696"/>
|
||||
<filter minzoom="14" attrIntValue="3" shadowColor="#464646"/>
|
||||
<filter minzoom="9" maxzoom="13" attrIntValue="1" shadowColor="#464646"/>
|
||||
<filter attrIntValue="0"/>
|
||||
<filter minzoom="14" attrIntValue="3" shadowColor="#464646"/>
|
||||
<filter minzoom="9" maxzoom="13" attrIntValue="1" shadowColor="#464646"/>
|
||||
<filter attrIntValue="0"/>
|
||||
</renderingAttribute>
|
||||
|
||||
<renderingAttribute name="defaultColor">
|
||||
|
|
|
@ -508,6 +508,7 @@ public class MapRenderRepositories {
|
|||
renderingReq.setIntFilter(renderingReq.ALL.R_MINZOOM, requestedBox.getZoom());
|
||||
if(renderingReq.searchRenderingAttribute(RenderingRuleStorageProperties.A_SHADOW_RENDERING)) {
|
||||
currentRenderingContext.shadowRenderingMode = renderingReq.getIntPropertyValue(renderingReq.ALL.R_ATTR_INT_VALUE);
|
||||
currentRenderingContext.shadowRenderingColor = renderingReq.getIntPropertyValue(renderingReq.ALL.R_SHADOW_COLOR);
|
||||
}
|
||||
currentRenderingContext.leftX = (float) requestedBox.getLeftTileX();
|
||||
currentRenderingContext.topY = (float) requestedBox.getTopTileY();
|
||||
|
|
|
@ -126,6 +126,7 @@ public class OsmandRenderer {
|
|||
|
||||
// be aware field is using in C++
|
||||
int shadowRenderingMode = ShadowRenderingMode.BLUR_SHADOW.value;
|
||||
int shadowRenderingColor = 0xff969696;
|
||||
|
||||
// not expect any shadow
|
||||
int shadowLevelMin = 256;
|
||||
|
@ -639,6 +640,9 @@ public class OsmandRenderer {
|
|||
// do not check shadow color here
|
||||
if(rc.shadowRenderingMode == 1) {
|
||||
int shadowColor = req.getIntPropertyValue(req.ALL.R_SHADOW_COLOR);
|
||||
if(shadowColor == 0) {
|
||||
shadowColor = rc.shadowRenderingColor;
|
||||
}
|
||||
int shadowLayer = req.getIntPropertyValue(req.ALL.R_SHADOW_RADIUS);
|
||||
if (shadowColor == 0) {
|
||||
shadowLayer = 0;
|
||||
|
@ -767,6 +771,9 @@ public class OsmandRenderer {
|
|||
if(drawOnlyShadow) {
|
||||
int shadowColor = render.getIntPropertyValue(render.ALL.R_SHADOW_COLOR);
|
||||
int shadowRadius = render.getIntPropertyValue(render.ALL.R_SHADOW_RADIUS);
|
||||
if(shadowColor == 0) {
|
||||
shadowColor = rc.shadowRenderingColor;
|
||||
}
|
||||
drawPolylineShadow(canvas, rc, path, shadowColor, shadowRadius);
|
||||
} else {
|
||||
canvas.drawPath(path, paint);
|
||||
|
|
Loading…
Reference in a new issue