Skip to content

Commit bb540bf

Browse files
committed
encapsulation
1 parent 43e9f33 commit bb540bf

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/main/java/org/iso53/InteractiveImagePanel.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ protected void paintComponent(Graphics g) {
142142
* @param ratio the scaling ratio. A ratio greater than 1 enlarges the image, less than 1 shrinks the image.
143143
* @return a new BufferedImage that is a scaled version of the original image.
144144
*/
145-
public BufferedImage scaleImageFast(BufferedImage source, double ratio) {
145+
private BufferedImage scaleImageFast(BufferedImage source, double ratio) {
146146
BufferedImage bi = new BufferedImage(
147147
(int) (source.getWidth() * ratio),
148148
(int) (source.getHeight() * ratio),
@@ -165,7 +165,7 @@ public BufferedImage scaleImageFast(BufferedImage source, double ratio) {
165165
* @param ratio the scaling ratio. A ratio greater than 1 enlarges the image, less than 1 shrinks the image.
166166
* @return a new BufferedImage that is a scaled version of the original image.
167167
*/
168-
public BufferedImage scaleImagePretty(BufferedImage source, double ratio) {
168+
private BufferedImage scaleImagePretty(BufferedImage source, double ratio) {
169169
int targetWidth = (int) (source.getWidth() * ratio);
170170
int targetHeight = (int) (source.getHeight() * ratio);
171171

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

0 commit comments

Comments
 (0)