Java 2D Graphics For example, you might place
Java 2D Graphics For example, you might place the new shape behind the other elements on the drawing surface. The 2D API’s compositing rules are covered in Chapter 5. 2.5 Coordinate Space Java 2D objects live in a plane defined by Cartesian coordinates. This plane is called User Coordinate Space, or just User Space. When objects are drawn on a screen or a printer, User Space coordinates are transformed into Device Space coordinates. Device Space corresponds to a particular monitor or printer usually, one unit in Device Space corresponds to one pixel of a device. By default, User Space and Device Space are aligned, with the x and y axes oriented as shown in Figure 2.7. The x axis increases from left to right, and the y axis increases from top to bottom. The origin is placed at the upper left corner of the drawing surface. This applies for any device, where left, right, top, and bottom are defined in terms of the device itself the sides of a monitor, for example, or the orientation of a sheet of paper in a printer. Note that the y axis is aligned so that it increases as you go down this may be the opposite of what you were expecting. Figure 2.7. Device Space coordinate system Although User Space and Device Space are aligned by default, some scaling must take place to ensure that objects are drawn the same size, regardless of the output device. Device Space is determined by the resolution of a particular device. A monitor, for example, typically has about 72 pixels per inch, while a laser printer generally has 300 or 600 pixels per inch (or DPI, dots per inch). User Space is converted to Device Space when objects are drawn. A transformation is used to convert from one system to the other. The default transformation converts 72 User Space page 24
Note: If you are looking for good and high quality web space to host and run your application check Lunarwebhost Tomcat Web Hosting services