© The Author(s), under exclusive license to APress Media, LLC, part of Springer Nature 2022
K. Sharan, P. SpäthLearn JavaFX 17https://doi.org/10.1007/978-1-4842-7848-2_14

14. Understanding 2D Shapes

Kishori Sharan1   and Peter Späth2
(1)
Montgomery, AL, USA
(2)
Leipzig, Sachsen, Germany
 
In this chapter, you will learn:
  • What 2D shapes are and how they are represented in JavaFX

  • How to draw 2D shapes

  • How to draw complex shapes using the Path class

  • How to draw shapes using the Scalable Vector Graphics (SVG)

  • How to combine shapes to build another shape

  • How to use strokes for a shape

  • How to style shapes using Cascading Style Sheets (CSS)

The examples of this chapter lie in the com.jdojo.shape package. In order for them to work, you must add a corresponding line to ...

Get Learn JavaFX 17: Building User Experience and Interfaces with Java 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.