CSE 8B Chapter Notes - Chapter 14.7-14.11: Javafx, Comic Sans, Ellipse
Document Summary
Syntax for creating colors: public color(double r, double g, double b, double opacity) r, g, and b rgb values of color ranging from 0. 0 1. 10. Opacity transparency of color defined from 0. 0 1. 0. Is immutable: once create, properties cannot be changed. Can call on static methods to create color objects ie. color(r,g,b) Font describes font name, weight, and size javafx. scene. text. font used to create fonts. Fonts can be created via constructors or static methods: fonts defined by name, weight, posture, and size. Postures are 2 constants: fontposture. italic and fontposture. regular. Example of creating 2 fonts: font f1 = new font( sans serif , 16), fonf f2 = font. font( comic sans , fontweight. bold, fontposture. italic, 12); Font objects are immutable: once created, you cannot change its properties. Imageview class used to display an image javafx. scene. image. image used to get the image class javafx. scene. image. imageview used to get imageview class. Imageview objects cannot be shared: cannot place imageview multiple times in a pane/ scene.