Pen::setTransparency()
Set the transparency
Examples
import org.openpatch.scratch.*;
import org.openpatch.scratch.*;
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(transparency)
Parameters
| Name | Data Type | Description |
|---|---|---|
| transparency | double | transparency of the pen |
Return
void