Skip to content

Commit 6a107a7

Browse files
author
github-actions
committed
style: apply google format
1 parent 126c30f commit 6a107a7

File tree

1 file changed

+6
-9
lines changed
  • src/org/openpatch/scratch/extensions/pen

1 file changed

+6
-9
lines changed

src/org/openpatch/scratch/extensions/pen/Pen.java

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,7 @@ void add(Point point) {
6161
private double x;
6262
private double y;
6363

64-
public Pen() {
65-
}
64+
public Pen() {}
6665

6766
public Pen(Sprite s) {
6867
this.sprite = s;
@@ -180,9 +179,9 @@ public void changeTransparency(double step) {
180179
* @param y y coordinate
181180
*/
182181
public void setPosition(double x, double y) {
183-
this.x = x;
184-
this.y = y;
185-
if (this.down) {
182+
this.x = x;
183+
this.y = y;
184+
if (this.down) {
186185
this.currentPath.add(new Point(x, y, this.color, this.transparency, this.size));
187186
}
188187
}
@@ -243,15 +242,13 @@ public void eraseAll() {
243242

244243
/** Draw the line which the pen has drawn. */
245244
public void draw() {
246-
if (this.stage == null)
247-
return;
245+
if (this.stage == null) return;
248246
PGraphics buffer = this.stage.getBackgroundBuffer();
249247
if (!this.isInBackground()) {
250248
buffer = this.stage.getForegroundBuffer();
251249
}
252250
int pointsBufferSize = this.pathsBuffer.size();
253-
if (pointsBufferSize <= 0)
254-
return;
251+
if (pointsBufferSize <= 0) return;
255252

256253
Iterator<Path> pathsBufferIter = this.pathsBuffer.iterator();
257254

0 commit comments

Comments
 (0)