Pen::setTransparency()
Setzt die Transparenz des Stiftes in Prozent.
Beispiele

import org.openpatch.scratch.*;
import org.openpatch.scratch.extensions.pen.*;
public class PenSetTransparency {
public PenSetTransparency() {
Stage myStage = new Stage(600, 240);
Pen myPen = new Pen();
myStage.add(myPen);
myPen.down();
myPen.setSize(50);
myPen.setTransparency(20);
myPen.setPosition(0, 0);
myPen.up();
while (myStage.getTimer().forMillis(3000)) {}
myStage.exit();
}
public static void main(String[] args) {
new PenSetTransparency();
}
}
Syntax
Java
.setTransparency(percentage)
Scratch
set pen [transparency v] to (50)
Parameter
Name | Datentyp | Beschreibung |
---|---|---|
percentage | float | Ein Prozentwert. |
Rückgabe
void