Skip to content

Commit 47814f4

Browse files
committed
fix formatting to match style guide
1 parent 9ff4ce3 commit 47814f4

File tree

3 files changed

+9
-7
lines changed

3 files changed

+9
-7
lines changed

core/src/processing/awt/ShimAWT.java

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ static public Object getNativeImage(PImage img) {
237237
}
238238

239239

240-
static public void resizeImage(PImage img, int w, int h,int interpolationMode) { // ignore
240+
static public void resizeImage(PImage img, int w, int h, int interpolationMode) { // ignore
241241
if (w <= 0 && h <= 0) {
242242
throw new IllegalArgumentException("width or height must be > 0 for resize");
243243
}
@@ -251,7 +251,8 @@ static public void resizeImage(PImage img, int w, int h,int interpolationMode) {
251251
}
252252

253253
BufferedImage bimg =
254-
shrinkImage((BufferedImage) img.getNative(), w*img.pixelDensity, h*img.pixelDensity,interpolationMode);
254+
shrinkImage((BufferedImage) img.getNative(), w*img.pixelDensity,
255+
h*img.pixelDensity, interpolationMode);
255256

256257
PImage temp = new PImageAWT(bimg);
257258
img.pixelWidth = temp.width;
@@ -314,8 +315,9 @@ static private BufferedImage shrinkImage(BufferedImage img,
314315
scratchImage = new BufferedImage(w, h, type);
315316
g2 = scratchImage.createGraphics();
316317
}
317-
//convert the passed int value of interpolationMode to the object expected by setRenderingHint
318-
Object interpolationModeValue = switch(interpolationMode){
318+
// convert the passed int value of interpolationMode to the object expected
319+
// by setRenderingHint
320+
Object interpolationModeValue = switch(interpolationMode) {
319321
case 0 -> RenderingHints.VALUE_INTERPOLATION_NEAREST_NEIGHBOR;
320322
//case 1 is the same as the default
321323
case 2 -> RenderingHints.VALUE_INTERPOLATION_BICUBIC;

core/src/processing/core/PConstants.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -483,7 +483,7 @@ public interface PConstants {
483483
int WAIT = Cursor.WAIT_CURSOR;
484484

485485

486-
//image interpolation modes
486+
// image interpolation modes
487487
int NEAREST_NEIGHBOR = 0;
488488
int BILINEAR = 1;
489489
int BICUBIC = 2;

core/src/processing/core/PImage.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -502,7 +502,7 @@ public Object clone() throws CloneNotSupportedException { // ignore
502502
*/
503503
public void resize(int w, int h,int interpolationMode) { // ignore
504504
//throw new RuntimeException("resize() not implemented for this PImage type");
505-
ShimAWT.resizeImage(this, w, h,interpolationMode);
505+
ShimAWT.resizeImage(this, w, h, interpolationMode);
506506
}
507507

508508
/**
@@ -527,7 +527,7 @@ public void resize(int w, int h,int interpolationMode) { // ignore
527527
* @see PImage#get(int, int, int, int)
528528
*/
529529
public void resize(int w, int h) { // ignore
530-
resize(w,h,1);
530+
resize(w, h, 1);
531531
}
532532

533533

0 commit comments

Comments
 (0)