OpenConcerto

Dépôt officiel du code source de l'ERP OpenConcerto
sonarqube

svn://code.openconcerto.org/openconcerto

Rev

Rev 73 | Rev 180 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 73 Rev 80
Line 95... Line 95...
95
     * 
95
     * 
96
     * @param name the name of the attribute, eg "x".
96
     * @param name the name of the attribute, eg "x".
97
     * @param val the value of the attribute in {@link #getUnit()}, eg 15.3.
97
     * @param val the value of the attribute in {@link #getUnit()}, eg 15.3.
98
     */
98
     */
99
    public void setSVGAttr(String name, Number val) {
99
    public void setSVGAttr(String name, Number val) {
100
        this.setSVGAttr(name, val + this.getUnit().getSymbol());
100
        this.setSVGAttr(name, this.getUnit().format(val));
101
    }
101
    }
102
 
102
 
103
    public final double getRatio() {
103
    public final double getRatio() {
104
        return this.getWidth().doubleValue() / this.getHeight().doubleValue();
104
        return this.getWidth().doubleValue() / this.getHeight().doubleValue();
105
    }
105
    }