void scaleTextSize(float scaleFactor, byte zoomLevel) { for (int i = 0, n = this.renderInstructions.size(); i < n; ++i) { this.renderInstructions.get(i).scaleTextSize(scaleFactor, zoomLevel); } for (int i = 0, n = this.subRules.size(); i < n; ++i) { this.subRules.get(i).scaleTextSize(scaleFactor, zoomLevel); } } }
/** * Scales the text size of this RenderTheme by the given factor for a given zoom level. * * @param scaleFactor the factor by which the text size should be scaled. * @param zoomLevel the zoom level to which this is applied. */ public synchronized void scaleTextSize(float scaleFactor, byte zoomLevel) { if (!textScales.containsKey(zoomLevel) || scaleFactor != textScales.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.scaleTextSize(scaleFactor * this.baseTextSize, zoomLevel); } } textScales.put(zoomLevel, scaleFactor); } }
void scaleTextSize(float scaleFactor, byte zoomLevel) { for (int i = 0, n = this.renderInstructions.size(); i < n; ++i) { this.renderInstructions.get(i).scaleTextSize(scaleFactor, zoomLevel); } for (int i = 0, n = this.subRules.size(); i < n; ++i) { this.subRules.get(i).scaleTextSize(scaleFactor, zoomLevel); } } }
/** * Scales the text size of this RenderTheme by the given factor for a given zoom level. * * @param scaleFactor the factor by which the text size should be scaled. * @param zoomLevel the zoom level to which this is applied. */ public synchronized void scaleTextSize(float scaleFactor, byte zoomLevel) { if (!textScales.containsKey(zoomLevel) || scaleFactor != textScales.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.scaleTextSize(scaleFactor * this.baseTextSize, zoomLevel); } } textScales.put(zoomLevel, scaleFactor); } }