/** * Creates a new LiteShape object. * * @param geom - the wrapped geometry * @param at - the transformation applied to the geometry in order to get to the shape points * @param generalize - set to true if the geometry need to be generalized during rendering */ public LiteShape(Geometry geom, AffineTransform at, boolean generalize) { if (geom != null) this.geometry = getGeometryFactory().createGeometry(geom); this.affineTransform = at; this.generalize = generalize; if (at == null) { yScale = xScale = 1; return; } xScale = (float) Math.sqrt( (at.getScaleX() * at.getScaleX()) + (at.getShearX() * at.getShearX())); yScale = (float) Math.sqrt( (at.getScaleY() * at.getScaleY()) + (at.getShearY() * at.getShearY())); }
/** * Creates a new LiteShape object. * * @param geom - the wrapped geometry * @param at - the transformation applied to the geometry in order to get to the shape points * @param generalize - set to true if the geometry need to be generalized * during rendering * */ public LiteShape(Geometry geom, AffineTransform at, boolean generalize) { if( geom!=null) this.geometry =getGeometryFactory().createGeometry(geom); this.affineTransform = at; this.generalize = generalize; if (at==null){ yScale=xScale=1; return; } xScale = (float) Math.sqrt( (at.getScaleX() * at.getScaleX()) + (at.getShearX() * at.getShearX())); yScale = (float) Math.sqrt( (at.getScaleY() * at.getScaleY()) + (at.getShearY() * at.getShearY())); }
/** * Creates a new LiteShape object. * * @param geom - the wrapped geometry * @param at - the transformation applied to the geometry in order to get to the shape points * @param generalize - set to true if the geometry need to be generalized * during rendering * */ public LiteShape(Geometry geom, AffineTransform at, boolean generalize) { if( geom!=null) this.geometry =getGeometryFactory().createGeometry(geom); this.affineTransform = at; this.generalize = generalize; if (at==null){ yScale=xScale=1; return; } xScale = (float) Math.sqrt( (at.getScaleX() * at.getScaleX()) + (at.getShearX() * at.getShearX())); yScale = (float) Math.sqrt( (at.getScaleY() * at.getScaleY()) + (at.getShearY() * at.getShearY())); }