SHAPE DRAWING TOOLS in Java 8: JavaFX 8 Tutorial (Coding in JavaFX Step by Step Build Graphics Toolkit Book 2) by Shufen Kuo & Bing-Chao Huang

SHAPE DRAWING TOOLS in Java 8: JavaFX 8 Tutorial (Coding in JavaFX Step by Step Build Graphics Toolkit Book 2) by Shufen Kuo & Bing-Chao Huang

Author:Shufen Kuo & Bing-Chao Huang [Kuo, Shufen]
Language: eng
Format: epub
Tags: COMPUTERS/Programming Languages/Java
Published: 2016-04-23T07:00:00+00:00


Figure 5-4. Snapshot of various icon drawing using Bézier Curve Drawer module.

Compile and run the application. Try these steps to test it:

Move mouse to a location on the drawing board.

Press the mouse and release it without dragging, this action creates a start point, a red circle is shown on the drawing board.

Move mouse to another location and drag it around the drawing board to draw a curve.

Release the mouse when you are satisfied with the shape of curve.

Move mouse to another location, drag to draw another curve which connect to previous curve.

Release the mouse when you are satisfied with the shape of this curve.

Repeat previous two steps several times to draw more curves added to the path.

If you are not satisfied with the curve you just drew, hit Delete key to delete it, and continue draw more curves.

Now, try to draw a straight line: move mouse inside the area of red circle, drag the mouse to a location, then release the mouse.

Draw more curves and lines added to the same path.

Try to draw a curve not connected to previous curve: Move the mouse to a location and press the mouse then release it without dragging, this action creates a start point.

Move the mouse to location and press the mouse, this is the end point.

Drag the mouse to draw a curve.

Finally, release the mouse when you are satisfied with the shape of this curve.



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.