Chapter 13

Drawing Shapes

In This Chapter

arrow Creating basic shapes such as lines, rectangles, circles, and ellipses

arrow Creating shapes you can see through

arrow Creating gradient fills

arrow Rotating, translating, and scaling shapes

arrow Drawing some text

arrow Combining shapes with union, intersect, and subtract operations

Were you one of those kids who, way back in school, passed away the boring hours of algebra class by doodling in the margins of the book? If so, you’re in luck. Now that you’re a grownup and you’re mastering JavaFX programming, you don’t have to doodle in the book. Instead, you can write programs that doodle onscreen.

This chapter is a brief introduction to the fascinating world of drawing in JavaFX. Specifically, you figure out how to draw two-dimensional objects such as lines, arcs, rectangles, ellipses, and so on. You can set the style used to draw the shape’s outline, and you can fill ...

Get JavaFX For Dummies now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.