Chapter 4 PDF Flashcards
What does JavaFX use
JavaFX uses a mixed performance/art metaphor.
How is graphical output created in Java FX
We start with a window and then slowly add one or more scenes. To produce graphical output, we add a canvas to our scene and draw shapes and text on the canvas
When our Java FX application begins what occurs
When our application begin, the window opens and displays whatever we have drawn onto the canvas
What is the purpose of the Canvas class in JavaFX
The Canvas class provides an area on which we can draw shapes and text
What is the function of the GraphicsContext class
The GraphicsContext class provides methods to draw shapes and text on the Canvas and to set the current color
What are some practical applications of the graphicsContext class Methods
The methods are available for drawing lines, rectangles, ovals and other shapes as well as displaying text and setting colors
What is special about the GraphicsContext methods
They have a void return type so the method calls are standalone statements
Give an example of the Stroke method in Java FX
The stroke method draws an outlined shape in the current stroke color
Give an example of the fill method in Java FX
The fill method draws a solid shape in the current fill color
What is the default background color for GraphicsContext method
The default background color is white
How does the color class define color
The color class defines colors using the RGB system.
What are all RGB colors composed of
All RBG color is composed of red, green,blue components. Each components value can range from 0 to 255 (00 to FF in hexadecimal)
What is the relation between the number value and the concentration of that component in the color
The higher the value, the higher the concentration of that component in the color
How would you write the color white in hexadecimal
(FF,FF,FF)
What is the color black in hexadecimal
(00,00,00)