Skip to content

Commit

Permalink
encapsulation
Browse files Browse the repository at this point in the history
  • Loading branch information
ISO53 committed Jul 14, 2024
1 parent 43e9f33 commit bb540bf
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/main/java/org/iso53/InteractiveImagePanel.java
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ protected void paintComponent(Graphics g) {
* @param ratio the scaling ratio. A ratio greater than 1 enlarges the image, less than 1 shrinks the image.
* @return a new BufferedImage that is a scaled version of the original image.
*/
public BufferedImage scaleImageFast(BufferedImage source, double ratio) {
private BufferedImage scaleImageFast(BufferedImage source, double ratio) {
BufferedImage bi = new BufferedImage(
(int) (source.getWidth() * ratio),
(int) (source.getHeight() * ratio),
Expand All @@ -165,7 +165,7 @@ public BufferedImage scaleImageFast(BufferedImage source, double ratio) {
* @param ratio the scaling ratio. A ratio greater than 1 enlarges the image, less than 1 shrinks the image.
* @return a new BufferedImage that is a scaled version of the original image.
*/
public BufferedImage scaleImagePretty(BufferedImage source, double ratio) {
private BufferedImage scaleImagePretty(BufferedImage source, double ratio) {
int targetWidth = (int) (source.getWidth() * ratio);
int targetHeight = (int) (source.getHeight() * ratio);

Expand All @@ -185,7 +185,7 @@ public BufferedImage scaleImagePretty(BufferedImage source, double ratio) {
* @return a new BufferedImage that is a scaled version of the original image or null if an unsupported scaling
* strategy is specified.
*/
public BufferedImage scaleImage(BufferedImage source, double ratio) {
private BufferedImage scaleImage(BufferedImage source, double ratio) {
switch (scale) {
case FAST -> {
return scaleImageFast(source, ratio);
Expand Down

0 comments on commit bb540bf

Please sign in to comment.