/** * Used to rescale the provided dash array. * * @param dashArray the unscaled dash array. If null, the method returns null. * @param mapScale the mapScale in pixels per meter. * @param uom the unit of measure that will be used to scale. * @return the rescaled dash array */ protected float[] rescale(float[] dashArray, Unit<Length> unitOfMeasure) { if (dashArray == null) return null; if (unitOfMeasure == null || unitOfMeasure.equals(Units.PIXEL)) return dashArray; float[] rescaledDashArray = new float[dashArray.length]; for (int i = 0; i < rescaledDashArray.length; i++) { rescaledDashArray[i] = (float) rescale((double) dashArray[i], unitOfMeasure); } return rescaledDashArray; }
double rescaled = rescale(measure, uom); return ff.literal(rescaled); } else {