void scaleStrokeWidth(float scaleFactor, byte zoomLevel) { for (int i = 0, n = this.renderInstructions.size(); i < n; ++i) { this.renderInstructions.get(i).scaleStrokeWidth(scaleFactor, zoomLevel); } for (int i = 0, n = this.subRules.size(); i < n; ++i) { this.subRules.get(i).scaleStrokeWidth(scaleFactor, zoomLevel); } }
/** * Scales the stroke width of this RenderTheme by the given factor for a given zoom level * * @param scaleFactor the factor by which the stroke width should be scaled. * @param zoomLevel the zoom level to which this is applied. */ public synchronized void scaleStrokeWidth(float scaleFactor, byte zoomLevel) { if (!strokeScales.containsKey(zoomLevel) || scaleFactor != strokeScales.get(zoomLevel)) { for (int i = 0, n = this.rulesList.size(); i < n; ++i) { Rule rule = this.rulesList.get(i); if (rule.zoomMin <= zoomLevel && rule.zoomMax >= zoomLevel) { rule.scaleStrokeWidth(scaleFactor * this.baseStrokeWidth, zoomLevel); } } strokeScales.put(zoomLevel, scaleFactor); } }
void scaleStrokeWidth(float scaleFactor, byte zoomLevel) { for (int i = 0, n = this.renderInstructions.size(); i < n; ++i) { this.renderInstructions.get(i).scaleStrokeWidth(scaleFactor, zoomLevel); } for (int i = 0, n = this.subRules.size(); i < n; ++i) { this.subRules.get(i).scaleStrokeWidth(scaleFactor, zoomLevel); } }
/** * Scales the stroke width of this RenderTheme by the given factor for a given zoom level * * @param scaleFactor the factor by which the stroke width should be scaled. * @param zoomLevel the zoom level to which this is applied. */ public synchronized void scaleStrokeWidth(float scaleFactor, byte zoomLevel) { if (!strokeScales.containsKey(zoomLevel) || scaleFactor != strokeScales.get(zoomLevel)) { for (int i = 0, n = this.rulesList.size(); i < n; ++i) { Rule rule = this.rulesList.get(i); if (rule.zoomMin <= zoomLevel && rule.zoomMax >= zoomLevel) { rule.scaleStrokeWidth(scaleFactor * this.baseStrokeWidth, zoomLevel); } } strokeScales.put(zoomLevel, scaleFactor); } }