Ignore:
Timestamp:
2018-09-15T13:50:24+02:00 (6 years ago)
Author:
donvip
Message:

fix UnnecessaryParentheses warnings

File:
1 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/seachart/src/render/Renderer.java

    r33195 r34652  
    423423        if (delta == null) delta = new Delta(Handle.CC);
    424424        if (bg == null) bg = new Color(0x00000000, true);
    425         if ((str == null) || (str.isEmpty())) str = " ";
     425        if (str == null || str.isEmpty()) str = " ";
    426426        FontRenderContext frc = g2.getFontRenderContext();
    427         GlyphVector gv = font.deriveFont((float) (font.getSize())).createGlyphVector(frc, str.equals(" ") ? "M" : str);
     427        GlyphVector gv = font.deriveFont((float) font.getSize()).createGlyphVector(frc, str.equals(" ") ? "M" : str);
    428428        Rectangle2D bounds = gv.getVisualBounds();
    429429        double width = bounds.getWidth();
     
    593593                    pos.translate((mid.getX() - centre.getX()), (mid.getY() - centre.getY()));
    594594                    Symbol label = new Symbol();
    595                     label.add(new Instr(Form.BBOX, new Rectangle2D.Double((-width / 2), (-height), width, height)));
     595                    label.add(new Instr(Form.BBOX, new Rectangle2D.Double((-width / 2), -height, width, height)));
    596596                    label.add(new Instr(Form.TEXT, new Caption(str, font, colour, new Delta(Handle.BC))));
    597597                    Symbols.drawSymbol(g2, label, sScale, centre.getX(), centre.getY(), null, new Delta(Handle.BC, pos));
     
    603603    public static void lightSector(Color col1, Color col2, double radius, double s1, double s2, Double dir, String str) {
    604604        if ((zoom >= 16) && (radius > 0.2)) {
    605             radius /= (Math.pow(2, zoom-15));
     605            radius /= Math.pow(2, zoom-15);
    606606        }
    607607        double mid = (((s1 + s2) / 2) + (s1 > s2 ? 180 : 0)) % 360;
     
    632632                    2 * (radial - arcWidth), -(s1 + 90), ((s1 < s2) ? (s1 - s2) : (s1 - s2 - 360)), Arc2D.OPEN));
    633633        }
    634         if ((str != null) && (!str.isEmpty())) {
     634        if (str != null && !str.isEmpty()) {
    635635            Font font = new Font("Arial", Font.PLAIN, 40);
    636636            double arc = (s2 > s1) ? (s2 - s1) : (s2 - s1 + 360);
Note: See TracChangeset for help on using the changeset viewer.