Meu primeiro desenho com JavaFX.
Código-fonte:
import javafx.ui.canvas.*;
import javafx.ui.*;
Canvas {
content: [
// cat head
Ellipse { cx:200, cy:100, radiusX:100, radiusY:50, fill:black },
// right ear
Arc { x:200, y:10, height:150, width:100,
startAngle:-20, length:90, closure:PIE, fill:black},
// left ear
Arc { x:100, y:10, height:150, width:100,
startAngle:110, length:90, closure:PIE, fill:black},
// left eye
Ellipse { cx:160, cy:100, radiusX:30, radiusY:15, fill:white},
Ellipse { cx:160, cy:100, radiusX:5, radiusY:15, fill:black},
// right eye
Ellipse { cx:240, cy:100, radiusX:30, radiusY:15, fill:white},
Ellipse { cx:240, cy:100, radiusX:5, radiusY:15, fill:black},
// nose
Arc { x:185, y:110, height:20, width:30,
startAngle:45, length:90, closure:PIE, fill:white},
]
}
Sim, foi uma tentativa de reproduzir este outro gato. 🙂