Skip to content

Commit

Permalink
Minor code reformatting only.
Browse files Browse the repository at this point in the history
  • Loading branch information
chrtannus committed Oct 4, 2017
1 parent 99525ca commit c53cca4
Showing 1 changed file with 16 additions and 17 deletions.
Expand Up @@ -86,15 +86,14 @@ public BoundedDouble getZoom() {

public void setZoom(BoundedDouble zf){
zoom = zf;

//update height
heightInPixels = (int) ((zoom.getValue()/100) * initialHPixel);
//update width
widthInPixels = (int) ((zoom.getValue()/100) * initialWPixel);
//update inch measures
// update height
heightInPixels = (int) ((zoom.getValue() / 100) * initialHPixel);
// update width
widthInPixels = (int) ((zoom.getValue() / 100) * initialWPixel);
// update inch measures
final double dpi = resolution.getSelectedValue().doubleValue();
widthInInches = new Double( widthInPixels/dpi);
heightInInches = new Double( heightInPixels/dpi);
widthInInches = new Double(widthInPixels / dpi);
heightInInches = new Double(heightInPixels / dpi);
}

// ----------------------------
Expand Down Expand Up @@ -152,13 +151,13 @@ public void setWidth(Double width) {
} else {
// update zoom
final double dpi = resolution.getSelectedValue().doubleValue();
zoom.setValue(( ((double)width * dpi) / initialWPixel) * 100.0);
zoom.setValue((((double) width * dpi) / initialWPixel) * 100.0);

widthInInches = width;
widthInPixels = (int) (widthInInches * dpi);
heightInPixels = (int) ((zoom.getValue()/100) * initialHPixel);
heightInInches = heightInPixels/dpi;

heightInPixels = (int) ((zoom.getValue() / 100) * initialHPixel);
heightInInches = heightInPixels / dpi;
}
}

Expand Down Expand Up @@ -195,13 +194,13 @@ public void setHeight(Double height) {
heightInInches = heightInPixels / dpi;
} else {
final double dpi = resolution.getSelectedValue().doubleValue();
zoom.setValue(( ((double)height * dpi) / initialHPixel) * 100.0);
zoom.setValue((((double) height * dpi) / initialHPixel) * 100.0);

heightInPixels = (int) (height * dpi);
heightInInches = height;
widthInPixels = (int) ((zoom.getValue()/100) * initialWPixel);
widthInInches = widthInPixels/dpi;

widthInPixels = (int) ((zoom.getValue() / 100) * initialWPixel);
widthInInches = widthInPixels / dpi;
}
}

Expand Down

0 comments on commit c53cca4

Please sign in to comment.