Skip to content

Commit aee1adc

Browse files
committed
improve color management
1 parent e45e5f6 commit aee1adc

File tree

7 files changed

+454
-11
lines changed

7 files changed

+454
-11
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ index: 4
44
lang: en
55
---
66

7+
## 4.15.0
8+
9+
- 🚀 Feat: All methods return a color now return a Color object.
10+
711
## 4.14.0
812

913
- 🚀 Feat: Add `enableYSort`-method to the stage. This sorts all sprites regarding their y-coordinate.

resources/build.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ author.url=https://openpatch.org
4040
# This is NOT a direct link to where to download it.
4141

4242
library.url=https://github.com/openpatch/scratch-for-java
43-
library.version=4.14.0
43+
library.version=4.15.0
4444

4545

4646
# Set the category (or categories) of your Library from the following list:

src/org/openpatch/scratch/Sprite.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -536,10 +536,10 @@ public void changeTint(double step) {
536536
/**
537537
* Retrieves the tint value of the current costume.
538538
*
539-
* @return the tint value of the current costume, or 0 if there are no costumes.
539+
* @return the tint value of the current costume, or null if there are no costumes.
540540
*/
541-
public double getTint() {
542-
if (this.costumes.size() == 0) return 0;
541+
public Color getTint() {
542+
if (this.costumes.size() == 0) return null;
543543
return this.costumes.get(currentCostume).getTint();
544544
}
545545

src/org/openpatch/scratch/Stage.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -928,6 +928,14 @@ public void setColor(double r, double g, double b) {
928928
this.color.setRGB(r, g, b);
929929
}
930930

931+
/**
932+
* Returns the current color of the stage.
933+
* @return the current color
934+
*/
935+
public Color getColor() {
936+
return this.color;
937+
}
938+
931939
/**
932940
* Sets the color of the stage.
933941
*

0 commit comments

Comments
 (0)