2362N/A * Copyright (c) 1998, 2006, Oracle and/or its affiliates. All rights reserved. 0N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 0N/A * This code is free software; you can redistribute it and/or modify it 0N/A * under the terms of the GNU General Public License version 2 only, as 2362N/A * published by the Free Software Foundation. Oracle designates this 0N/A * particular file as subject to the "Classpath" exception as provided 2362N/A * by Oracle in the LICENSE file that accompanied this code. 0N/A * This code is distributed in the hope that it will be useful, but WITHOUT 0N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 0N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 0N/A * version 2 for more details (a copy is included in the LICENSE file that 0N/A * accompanied this code). 0N/A * You should have received a copy of the GNU General Public License version 0N/A * 2 along with this work; if not, write to the Free Software Foundation, 0N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 2362N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 2362N/A * or visit www.oracle.com if you need additional information or have any 0N/A * Drawing methods will be forwarded to this object. 0N/A * The PrinterJob controlling the current printing. 0N/A * Keeps track of where drawing occurs on the page. 0N/A * Track information about the types of drawing 0N/A * performed by the printing application. 0N/A * If true the application will only be drawing AWT style 0N/A * graphics, no Java2D graphics. 0N/A * The new PeekGraphics2D will forward state changing 0N/A * calls to 'graphics'. 'printerJob' is stored away 0N/A * so that the printing application can get the PrinterJob 0N/A * Return the Graphics2D object that does the drawing 0N/A * for this instance. 0N/A * Set the Graphics2D instance which will do the 0N/A * The caller promises that only AWT graphics will be drawn. 0N/A * The print system can use this information to make general 0N/A * assumptions about the types of graphics to be drawn without 0N/A * requiring the application to draw the contents multiple 0N/A * Return a Spans instance describing the parts of the page in 0N/A * to which drawing occurred. 0N/A * Returns the device configuration associated with this Graphics2D. 0N/A/* The Delegated Graphics Methods */ 0N/A * Creates a new <code>Graphics</code> object that is 0N/A * a copy of this <code>Graphics</code> object. 0N/A * @return a new graphics context that is a copy of 0N/A * this graphics context. 0N/A /* This exception can not happen unless this 0N/A * class no longer implements the Cloneable 0N/A // can never happen. 0N/A * Translates the origin of the graphics context to the point 0N/A * (<i>x</i>, <i>y</i>) in the current coordinate system. 0N/A * Modifies this graphics context so that its new origin corresponds 0N/A * to the point (<i>x</i>, <i>y</i>) in this graphics context's 0N/A * original coordinate system. All coordinates used in subsequent 0N/A * rendering operations on this graphics context will be relative 0N/A * to this new origin. 0N/A * @param x the <i>x</i> coordinate. 0N/A * @param y the <i>y</i> coordinate. 0N/A * Concatenates the current transform of this Graphics2D with a 0N/A * translation transformation. 0N/A * This is equivalent to calling transform(T), where T is an 0N/A * AffineTransform represented by the following matrix: 0N/A * Concatenates the current transform of this Graphics2D with a 0N/A * rotation transformation. 0N/A * This is equivalent to calling transform(R), where R is an 0N/A * AffineTransform represented by the following matrix: 0N/A * [ cos(theta) -sin(theta) 0 ] 0N/A * [ sin(theta) cos(theta) 0 ] 0N/A * Rotating with a positive angle theta rotates points on the positive 0N/A * x axis toward the positive y axis. 0N/A * @param theta The angle of rotation in radians. 0N/A * Concatenates the current transform of this Graphics2D with a 0N/A * translated rotation transformation. 0N/A * This is equivalent to the following sequence of calls: 0N/A * translate(-x, -y); 0N/A * Rotating with a positive angle theta rotates points on the positive 0N/A * x axis toward the positive y axis. 0N/A * @param theta The angle of rotation in radians. 0N/A * @param x The x coordinate of the origin of the rotation 0N/A * @param y The x coordinate of the origin of the rotation 0N/A * Concatenates the current transform of this Graphics2D with a 0N/A * scaling transformation. 0N/A * This is equivalent to calling transform(S), where S is an 0N/A * AffineTransform represented by the following matrix: 0N/A * Concatenates the current transform of this Graphics2D with a 0N/A * shearing transformation. 0N/A * This is equivalent to calling transform(SH), where SH is an 0N/A * AffineTransform represented by the following matrix: 0N/A * @param shx The factor by which coordinates are shifted towards the 0N/A * positive X axis direction according to their Y coordinate 0N/A * @param shy The factor by which coordinates are shifted towards the 0N/A * positive Y axis direction according to their X coordinate 0N/A * Gets this graphics context's current color. 0N/A * @return this graphics context's current color. 0N/A * @see java.awt.Color 0N/A * @see java.awt.Graphics#setColor 0N/A * Sets this graphics context's current color to the specified 0N/A * color. All subsequent graphics operations using this graphics 0N/A * context use this specified color. 0N/A * @param c the new rendering color. 0N/A * @see java.awt.Color 0N/A * @see java.awt.Graphics#getColor 0N/A * Sets the paint mode of this graphics context to overwrite the 0N/A * destination with this graphics context's current color. 0N/A * This sets the logical pixel operation function to the paint or 0N/A * overwrite mode. All subsequent rendering operations will 0N/A * overwrite the destination with the current color. 0N/A * Sets the paint mode of this graphics context to alternate between 0N/A * this graphics context's current color and the new specified color. 0N/A * This specifies that logical pixel operations are performed in the 0N/A * XOR mode, which alternates pixels between the current color and 0N/A * a specified XOR color. 0N/A * When drawing operations are performed, pixels which are the 0N/A * current color are changed to the specified color, and vice versa. 0N/A * Pixels that are of colors other than those two colors are changed 0N/A * in an unpredictable but reversible manner; if the same figure is 0N/A * drawn twice, then all pixels are restored to their original values. 0N/A * @param c1 the XOR alternation color 0N/A * Gets the current font. 0N/A * @return this graphics context's current font. 0N/A * @see java.awt.Font 0N/A * @see java.awt.Graphics#setFont 0N/A * Sets this graphics context's font to the specified font. 0N/A * All subsequent text operations using this graphics context 0N/A * @param font the font. 0N/A * @see java.awt.Graphics#getFont 0N/A * @see java.awt.Graphics#drawChars(java.lang.String, int, int) 0N/A * @see java.awt.Graphics#drawString(byte[], int, int, int, int) 0N/A * @see java.awt.Graphics#drawBytes(char[], int, int, int, int) 0N/A * Gets the font metrics for the specified font. 0N/A * @return the font metrics for the specified font. 0N/A * @param f the specified font 0N/A * @see java.awt.Graphics#getFont 0N/A * @see java.awt.FontMetrics 0N/A * @see java.awt.Graphics#getFontMetrics() 0N/A * Get the rendering context of the font 0N/A * within this Graphics2D context. 0N/A * Returns the bounding rectangle of the current clipping area. 0N/A * The coordinates in the rectangle are relative to the coordinate 0N/A * system origin of this graphics context. 0N/A * @return the bounding rectangle of the current clipping area. 0N/A * @see java.awt.Graphics#getClip 0N/A * @see java.awt.Graphics#clipRect 0N/A * @see java.awt.Graphics#setClip(int, int, int, int) 0N/A * @see java.awt.Graphics#setClip(Shape) 0N/A * Intersects the current clip with the specified rectangle. 0N/A * The resulting clipping area is the intersection of the current 0N/A * clipping area and the specified rectangle. 0N/A * This method can only be used to make the current clip smaller. 0N/A * To set the current clip larger, use any of the setClip methods. 0N/A * Rendering operations have no effect outside of the clipping area. 0N/A * @param x the x coordinate of the rectangle to intersect the clip with 0N/A * @param y the y coordinate of the rectangle to intersect the clip with 0N/A * @param width the width of the rectangle to intersect the clip with 0N/A * @param height the height of the rectangle to intersect the clip with 0N/A * @see #setClip(int, int, int, int) 0N/A * @see #setClip(Shape) 0N/A * Sets the current clip to the rectangle specified by the given 0N/A * Rendering operations have no effect outside of the clipping area. 0N/A * @param x the <i>x</i> coordinate of the new clip rectangle. 0N/A * @param y the <i>y</i> coordinate of the new clip rectangle. 0N/A * @param width the width of the new clip rectangle. 0N/A * @param height the height of the new clip rectangle. 0N/A * @see java.awt.Graphics#clipRect 0N/A * @see java.awt.Graphics#setClip(Shape) 0N/A * Gets the current clipping area. 0N/A * @return a <code>Shape</code> object representing the 0N/A * current clipping area. 0N/A * @see java.awt.Graphics#getClipBounds 0N/A * @see java.awt.Graphics#clipRect 0N/A * @see java.awt.Graphics#setClip(int, int, int, int) 0N/A * @see java.awt.Graphics#setClip(Shape) 0N/A * Sets the current clipping area to an arbitrary clip shape. 0N/A * Not all objects which implement the <code>Shape</code> 0N/A * interface can be used to set the clip. The only 0N/A * <code>Shape</code> objects which are guaranteed to be 0N/A * supported are <code>Shape</code> objects which are 0N/A * obtained via the <code>getClip</code> method and via 0N/A * <code>Rectangle</code> objects. 0N/A * @see java.awt.Graphics#getClip() 0N/A * @see java.awt.Graphics#clipRect 0N/A * @see java.awt.Graphics#setClip(int, int, int, int) 0N/A * Copies an area of the component by a distance specified by 0N/A * <code>dx</code> and <code>dy</code>. From the point specified 0N/A * by <code>x</code> and <code>y</code>, this method 0N/A * copies downwards and to the right. To copy an area of the 0N/A * component to the left or upwards, specify a negative value for 0N/A * <code>dx</code> or <code>dy</code>. 0N/A * If a portion of the source rectangle lies outside the bounds 0N/A * of the component, or is obscured by another window or component, 0N/A * <code>copyArea</code> will be unable to copy the associated 0N/A * pixels. The area that is omitted can be refreshed by calling 0N/A * the component's <code>paint</code> method. 0N/A * @param x the <i>x</i> coordinate of the source rectangle. 0N/A * @param y the <i>y</i> coordinate of the source rectangle. 0N/A * @param width the width of the source rectangle. 0N/A * @param height the height of the source rectangle. 0N/A * @param dx the horizontal distance to copy the pixels. 0N/A * @param dy the vertical distance to copy the pixels. 0N/A // This method is not supported for printing so we do nothing here. 0N/A * Draws a line, using the current color, between the points 0N/A * <code>(x1, y1)</code> and <code>(x2, y2)</code> 0N/A * in this graphics context's coordinate system. 0N/A * @param x1 the first point's <i>x</i> coordinate. 0N/A * @param y1 the first point's <i>y</i> coordinate. 0N/A * @param x2 the second point's <i>x</i> coordinate. 0N/A * @param y2 the second point's <i>y</i> coordinate. 0N/A * Fills the specified rectangle. 0N/A * The left and right edges of the rectangle are at 0N/A * <code>x</code> and <code>x + width - 1</code>. 0N/A * The top and bottom edges are at 0N/A * <code>y</code> and <code>y + height - 1</code>. 0N/A * The resulting rectangle covers an area 0N/A * <code>width</code> pixels wide by 0N/A * <code>height</code> pixels tall. 0N/A * The rectangle is filled using the graphics context's current color. 0N/A * @param x the <i>x</i> coordinate 0N/A * of the rectangle to be filled. 0N/A * @param y the <i>y</i> coordinate 0N/A * of the rectangle to be filled. 0N/A * @param width the width of the rectangle to be filled. 0N/A * @param height the height of the rectangle to be filled. 0N/A * @see java.awt.Graphics#fillRect 0N/A * @see java.awt.Graphics#clearRect 0N/A * Clears the specified rectangle by filling it with the background 0N/A * color of the current drawing surface. This operation does not 0N/A * use the current paint mode. 0N/A * Beginning with Java 1.1, the background color 0N/A * of offscreen images may be system dependent. Applications should 0N/A * use <code>setColor</code> followed by <code>fillRect</code> to 0N/A * ensure that an offscreen image is cleared to a specific color. 0N/A * @param x the <i>x</i> coordinate of the rectangle to clear. 0N/A * @param y the <i>y</i> coordinate of the rectangle to clear. 0N/A * @param width the width of the rectangle to clear. 0N/A * @param height the height of the rectangle to clear. 0N/A * @see java.awt.Graphics#fillRect(int, int, int, int) 0N/A * @see java.awt.Graphics#drawRect 0N/A * @see java.awt.Graphics#setColor(java.awt.Color) 0N/A * @see java.awt.Graphics#setPaintMode 0N/A * @see java.awt.Graphics#setXORMode(java.awt.Color) 0N/A * Draws an outlined round-cornered rectangle using this graphics 0N/A * context's current color. The left and right edges of the rectangle 0N/A * are at <code>x</code> and <code>x + width</code>, 0N/A * respectively. The top and bottom edges of the rectangle are at 0N/A * <code>y</code> and <code>y + height</code>. 0N/A * @param x the <i>x</i> coordinate of the rectangle to be drawn. 0N/A * @param y the <i>y</i> coordinate of the rectangle to be drawn. 0N/A * @param width the width of the rectangle to be drawn. 0N/A * @param height the height of the rectangle to be drawn. 0N/A * @param arcWidth the horizontal diameter of the arc 0N/A * at the four corners. 0N/A * @param arcHeight the vertical diameter of the arc 0N/A * at the four corners. 0N/A * @see java.awt.Graphics#fillRoundRect 0N/A * Fills the specified rounded corner rectangle with the current color. 0N/A * The left and right edges of the rectangle 0N/A * are at <code>x</code> and <code>x + width - 1</code>, 0N/A * respectively. The top and bottom edges of the rectangle are at 0N/A * <code>y</code> and <code>y + height - 1</code>. 0N/A * @param x the <i>x</i> coordinate of the rectangle to be filled. 0N/A * @param y the <i>y</i> coordinate of the rectangle to be filled. 0N/A * @param width the width of the rectangle to be filled. 0N/A * @param height the height of the rectangle to be filled. 0N/A * @param arcWidth the horizontal diameter 0N/A * of the arc at the four corners. 0N/A * @param arcHeight the vertical diameter 0N/A * of the arc at the four corners. 0N/A * @see java.awt.Graphics#drawRoundRect 0N/A * Draws the outline of an oval. 0N/A * The result is a circle or ellipse that fits within the 0N/A * rectangle specified by the <code>x</code>, <code>y</code>, 0N/A * <code>width</code>, and <code>height</code> arguments. 0N/A * The oval covers an area that is 0N/A * <code>width + 1</code> pixels wide 0N/A * and <code>height + 1</code> pixels tall. 0N/A * @param x the <i>x</i> coordinate of the upper left 0N/A * corner of the oval to be drawn. 0N/A * @param y the <i>y</i> coordinate of the upper left 0N/A * corner of the oval to be drawn. 0N/A * @param width the width of the oval to be drawn. 0N/A * @param height the height of the oval to be drawn. 0N/A * @see java.awt.Graphics#fillOval 0N/A * Fills an oval bounded by the specified rectangle with the 0N/A * @param x the <i>x</i> coordinate of the upper left corner 0N/A * of the oval to be filled. 0N/A * @param y the <i>y</i> coordinate of the upper left corner 0N/A * of the oval to be filled. 0N/A * @param width the width of the oval to be filled. 0N/A * @param height the height of the oval to be filled. 0N/A * @see java.awt.Graphics#drawOval 0N/A * Draws the outline of a circular or elliptical arc 0N/A * covering the specified rectangle. 0N/A * The resulting arc begins at <code>startAngle</code> and extends 0N/A * for <code>arcAngle</code> degrees, using the current color. 0N/A * Angles are interpreted such that 0 degrees 0N/A * is at the 3 o'clock position. 0N/A * A positive value indicates a counter-clockwise rotation 0N/A * while a negative value indicates a clockwise rotation. 0N/A * The center of the arc is the center of the rectangle whose origin 0N/A * is (<i>x</i>, <i>y</i>) and whose size is specified by the 0N/A * <code>width</code> and <code>height</code> arguments. 0N/A * The resulting arc covers an area 0N/A * <code>width + 1</code> pixels wide 0N/A * by <code>height + 1</code> pixels tall. 0N/A * @param x the <i>x</i> coordinate of the 0N/A * upper-left corner of the arc to be drawn. 0N/A * @param y the <i>y</i> coordinate of the 0N/A * upper-left corner of the arc to be drawn. 0N/A * @param width the width of the arc to be drawn. 0N/A * @param height the height of the arc to be drawn. 0N/A * @param startAngle the beginning angle. 0N/A * @param arcAngle the angular extent of the arc, 0N/A * relative to the start angle. 0N/A * @see java.awt.Graphics#fillArc 0N/A * Fills a circular or elliptical arc covering the specified rectangle. 0N/A * The resulting arc begins at <code>startAngle</code> and extends 0N/A * for <code>arcAngle</code> degrees. 0N/A * Angles are interpreted such that 0 degrees 0N/A * is at the 3 o'clock position. 0N/A * A positive value indicates a counter-clockwise rotation 0N/A * while a negative value indicates a clockwise rotation. 0N/A * The center of the arc is the center of the rectangle whose origin 0N/A * is (<i>x</i>, <i>y</i>) and whose size is specified by the 0N/A * <code>width</code> and <code>height</code> arguments. 0N/A * The resulting arc covers an area 0N/A * <code>width + 1</code> pixels wide 0N/A * by <code>height + 1</code> pixels tall. 0N/A * @param x the <i>x</i> coordinate of the 0N/A * upper-left corner of the arc to be filled. 0N/A * @param y the <i>y</i> coordinate of the 0N/A * upper-left corner of the arc to be filled. 0N/A * @param width the width of the arc to be filled. 0N/A * @param height the height of the arc to be filled. 0N/A * @param startAngle the beginning angle. 0N/A * @param arcAngle the angular extent of the arc, 0N/A * relative to the start angle. 0N/A * @see java.awt.Graphics#drawArc 0N/A * Draws a sequence of connected lines defined by 0N/A * arrays of <i>x</i> and <i>y</i> coordinates. 0N/A * Each pair of (<i>x</i>, <i>y</i>) coordinates defines a point. 0N/A * The figure is not closed if the first point 0N/A * differs from the last point. 0N/A * @param xPoints an array of <i>x</i> points 0N/A * @param yPoints an array of <i>y</i> points 0N/A * @param nPoints the total number of points 0N/A * @see java.awt.Graphics#drawPolygon(int[], int[], int) 0N/A * Draws a closed polygon defined by 0N/A * arrays of <i>x</i> and <i>y</i> coordinates. 0N/A * Each pair of (<i>x</i>, <i>y</i>) coordinates defines a point. 0N/A * This method draws the polygon defined by <code>nPoint</code> line 0N/A * segments, where the first <code>nPoint - 1</code> 0N/A * line segments are line segments from 0N/A * <code>(xPoints[i - 1], yPoints[i - 1])</code> 0N/A * to <code>(xPoints[i], yPoints[i])</code>, for 0N/A * 1 ≤ <i>i</i> ≤ <code>nPoints</code>. 0N/A * The figure is automatically closed by drawing a line connecting 0N/A * the final point to the first point, if those points are different. 0N/A * @param xPoints a an array of <code>x</code> coordinates. 0N/A * @param yPoints a an array of <code>y</code> coordinates. 0N/A * @param nPoints a the total number of points. 0N/A * @see java.awt.Graphics#fillPolygon 0N/A * @see java.awt.Graphics#drawPolyline 0N/A * Fills a closed polygon defined by 0N/A * arrays of <i>x</i> and <i>y</i> coordinates. 0N/A * This method draws the polygon defined by <code>nPoint</code> line 0N/A * segments, where the first <code>nPoint - 1</code> 0N/A * line segments are line segments from 0N/A * <code>(xPoints[i - 1], yPoints[i - 1])</code> 0N/A * to <code>(xPoints[i], yPoints[i])</code>, for 0N/A * 1 ≤ <i>i</i> ≤ <code>nPoints</code>. 0N/A * The figure is automatically closed by drawing a line connecting 0N/A * the final point to the first point, if those points are different. 0N/A * The area inside the polygon is defined using an 0N/A * even-odd fill rule, also known as the alternating rule. 0N/A * @param xPoints a an array of <code>x</code> coordinates. 0N/A * @param yPoints a an array of <code>y</code> coordinates. 0N/A * @param nPoints a the total number of points. 0N/A * @see java.awt.Graphics#drawPolygon(int[], int[], int) 0N/A * Draws the text given by the specified string, using this 0N/A * graphics context's current font and color. The baseline of the 0N/A * first character is at position (<i>x</i>, <i>y</i>) in this 0N/A * graphics context's coordinate system. 0N/A * @param str the string to be drawn. 0N/A * @param x the <i>x</i> coordinate. 0N/A * @param y the <i>y</i> coordinate. 0N/A * @see java.awt.Graphics#drawBytes 0N/A * @see java.awt.Graphics#drawChars 0N/A * Draws the text given by the specified iterator, using this 0N/A * graphics context's current color. The iterator has to specify a font 0N/A * for each character. The baseline of the 0N/A * first character is at position (<i>x</i>, <i>y</i>) in this 0N/A * graphics context's coordinate system. 0N/A * The rendering attributes applied include the clip, transform, 0N/A * paint or color, and composite attributes. 0N/A * For characters in script systems such as Hebrew and Arabic, 0N/A * the glyphs may be draw from right to left, in which case the 0N/A * coordinate supplied is the the location of the leftmost character 0N/A * @param iterator the iterator whose text is to be drawn 0N/A * @param x,y the coordinates where the iterator's text should be drawn. 0N/A * @see java.awt.Graphics#setColor 0N/A * @see #setTransform 0N/A * @see #setComposite 0N/A * Draws the text given by the specified iterator, using this 0N/A * graphics context's current color. The iterator has to specify a font 0N/A * for each character. The baseline of the 0N/A * first character is at position (<i>x</i>, <i>y</i>) in this 0N/A * graphics context's coordinate system. 0N/A * The rendering attributes applied include the clip, transform, 0N/A * paint or color, and composite attributes. 0N/A * For characters in script systems such as Hebrew and Arabic, 0N/A * the glyphs may be draw from right to left, in which case the 0N/A * coordinate supplied is the the location of the leftmost character 0N/A * @param iterator the iterator whose text is to be drawn 0N/A * @param x,y the coordinates where the iterator's text should be drawn. 0N/A * @see java.awt.Graphics#setColor 0N/A * @see #setTransform 0N/A * @see #setComposite 0N/A * Draws as much of the specified image as is currently available. 0N/A * The image is drawn with its top-left corner at 0N/A * (<i>x</i>, <i>y</i>) in this graphics context's coordinate 0N/A * space. Transparent pixels in the image do not affect whatever 0N/A * pixels are already there. 0N/A * This method returns immediately in all cases, even if the 0N/A * complete image has not yet been loaded, and it has not been dithered 0N/A * and converted for the current output device. 0N/A * If the image has not yet been completely loaded, then 0N/A * <code>drawImage</code> returns <code>false</code>. As more of 0N/A * the image becomes available, the process that draws the image notifies 0N/A * the specified image observer. 0N/A * @param img the specified image to be drawn. 0N/A * @param x the <i>x</i> coordinate. 0N/A * @param y the <i>y</i> coordinate. 0N/A * @param observer object to be notified as more of 0N/A * the image is converted. 0N/A * @see java.awt.Image 0N/A * @see java.awt.image.ImageObserver 0N/A * @see java.awt.image.ImageObserver#imageUpdate(java.awt.Image, int, int, int, int, int) 0N/A /* The ImageWaiter creation does not return until the 0N/A * Draws as much of the specified image as has already been scaled 0N/A * to fit inside the specified rectangle. 0N/A * The image is drawn inside the specified rectangle of this 0N/A * graphics context's coordinate space, and is scaled if 0N/A * necessary. Transparent pixels do not affect whatever pixels 0N/A * are already there. 0N/A * This method returns immediately in all cases, even if the 0N/A * entire image has not yet been scaled, dithered, and converted 0N/A * for the current output device. 0N/A * If the current output representation is not yet complete, then 0N/A * <code>drawImage</code> returns <code>false</code>. As more of 0N/A * the image becomes available, the process that draws the image notifies 0N/A * the image observer by calling its <code>imageUpdate</code> method. 0N/A * A scaled version of an image will not necessarily be 0N/A * available immediately just because an unscaled version of the 0N/A * image has been constructed for this output device. Each size of 0N/A * the image may be cached separately and generated from the original 0N/A * data in a separate image production sequence. 0N/A * @param img the specified image to be drawn. 0N/A * @param x the <i>x</i> coordinate. 0N/A * @param y the <i>y</i> coordinate. 0N/A * @param width the width of the rectangle. 0N/A * @param height the height of the rectangle. 0N/A * @param observer object to be notified as more of 0N/A * the image is converted. 0N/A * @see java.awt.Image 0N/A * @see java.awt.image.ImageObserver 0N/A * @see java.awt.image.ImageObserver#imageUpdate(java.awt.Image, int, int, int, int, int) 0N/A * Draws as much of the specified image as is currently available. 0N/A * The image is drawn with its top-left corner at 0N/A * (<i>x</i>, <i>y</i>) in this graphics context's coordinate 0N/A * space. Transparent pixels are drawn in the specified 0N/A * This operation is equivalent to filling a rectangle of the 0N/A * width and height of the specified image with the given color and then 0N/A * drawing the image on top of it, but possibly more efficient. 0N/A * This method returns immediately in all cases, even if the 0N/A * complete image has not yet been loaded, and it has not been dithered 0N/A * and converted for the current output device. 0N/A * If the image has not yet been completely loaded, then 0N/A * <code>drawImage</code> returns <code>false</code>. As more of 0N/A * the image becomes available, the process that draws the image notifies 0N/A * the specified image observer. 0N/A * @param img the specified image to be drawn. 0N/A * @param x the <i>x</i> coordinate. 0N/A * @param y the <i>y</i> coordinate. 0N/A * @param bgcolor the background color to paint under the 0N/A * non-opaque portions of the image. 0N/A * @param observer object to be notified as more of 0N/A * the image is converted. 0N/A * @see java.awt.Image 0N/A * @see java.awt.image.ImageObserver 0N/A * @see java.awt.image.ImageObserver#imageUpdate(java.awt.Image, int, int, int, int, int) 0N/A /* The ImageWaiter creation does not return until the 0N/A * Draws as much of the specified image as has already been scaled 0N/A * to fit inside the specified rectangle. 0N/A * The image is drawn inside the specified rectangle of this 0N/A * graphics context's coordinate space, and is scaled if 0N/A * necessary. Transparent pixels are drawn in the specified 0N/A * This operation is equivalent to filling a rectangle of the 0N/A * width and height of the specified image with the given color and then 0N/A * drawing the image on top of it, but possibly more efficient. 0N/A * This method returns immediately in all cases, even if the 0N/A * entire image has not yet been scaled, dithered, and converted 0N/A * for the current output device. 0N/A * If the current output representation is not yet complete then 0N/A * <code>drawImage</code> returns <code>false</code>. As more of 0N/A * the image becomes available, the process that draws the image notifies 0N/A * the specified image observer. 0N/A * A scaled version of an image will not necessarily be 0N/A * available immediately just because an unscaled version of the 0N/A * image has been constructed for this output device. Each size of 0N/A * the image may be cached separately and generated from the original 0N/A * data in a separate image production sequence. 0N/A * @param img the specified image to be drawn. 0N/A * @param x the <i>x</i> coordinate. 0N/A * @param y the <i>y</i> coordinate. 0N/A * @param width the width of the rectangle. 0N/A * @param height the height of the rectangle. 0N/A * @param bgcolor the background color to paint under the 0N/A * non-opaque portions of the image. 0N/A * @param observer object to be notified as more of 0N/A * the image is converted. 0N/A * @see java.awt.Image 0N/A * @see java.awt.image.ImageObserver 0N/A * @see java.awt.image.ImageObserver#imageUpdate(java.awt.Image, int, int, int, int, int) 0N/A * Draws as much of the specified area of the specified image as is 0N/A * currently available, scaling it on the fly to fit inside the 0N/A * specified area of the destination drawable surface. Transparent pixels 0N/A * do not affect whatever pixels are already there. 0N/A * This method returns immediately in all cases, even if the 0N/A * image area to be drawn has not yet been scaled, dithered, and converted 0N/A * for the current output device. 0N/A * If the current output representation is not yet complete then 0N/A * <code>drawImage</code> returns <code>false</code>. As more of 0N/A * the image becomes available, the process that draws the image notifies 0N/A * the specified image observer. 0N/A * This method always uses the unscaled version of the image 0N/A * to render the scaled rectangle and performs the required 0N/A * scaling on the fly. It does not use a cached, scaled version 0N/A * of the image for this operation. Scaling of the image from source 0N/A * to destination is performed such that the first coordinate 0N/A * of the source rectangle is mapped to the first coordinate of 0N/A * the destination rectangle, and the second source coordinate is 0N/A * mapped to the second destination coordinate. The subimage is 0N/A * scaled and flipped as needed to preserve those mappings. 0N/A * @param img the specified image to be drawn 0N/A * @param dx1 the <i>x</i> coordinate of the first corner of the 0N/A * destination rectangle. 0N/A * @param dy1 the <i>y</i> coordinate of the first corner of the 0N/A * destination rectangle. 0N/A * @param dx2 the <i>x</i> coordinate of the second corner of the 0N/A * destination rectangle. 0N/A * @param dy2 the <i>y</i> coordinate of the second corner of the 0N/A * destination rectangle. 0N/A * @param sx1 the <i>x</i> coordinate of the first corner of the 0N/A * @param sy1 the <i>y</i> coordinate of the first corner of the 0N/A * @param sx2 the <i>x</i> coordinate of the second corner of the 0N/A * @param sy2 the <i>y</i> coordinate of the second corner of the 0N/A * @param observer object to be notified as more of the image is 0N/A * scaled and converted. 0N/A * @see java.awt.Image 0N/A * @see java.awt.image.ImageObserver 0N/A * @see java.awt.image.ImageObserver#imageUpdate(java.awt.Image, int, int, int, int, int) 0N/A * Draws as much of the specified area of the specified image as is 0N/A * currently available, scaling it on the fly to fit inside the 0N/A * specified area of the destination drawable surface. 0N/A * Transparent pixels are drawn in the specified background color. 0N/A * This operation is equivalent to filling a rectangle of the 0N/A * width and height of the specified image with the given color and then 0N/A * drawing the image on top of it, but possibly more efficient. 0N/A * This method returns immediately in all cases, even if the 0N/A * image area to be drawn has not yet been scaled, dithered, and converted 0N/A * for the current output device. 0N/A * If the current output representation is not yet complete then 0N/A * <code>drawImage</code> returns <code>false</code>. As more of 0N/A * the image becomes available, the process that draws the image notifies 0N/A * the specified image observer. 0N/A * This method always uses the unscaled version of the image 0N/A * to render the scaled rectangle and performs the required 0N/A * scaling on the fly. It does not use a cached, scaled version 0N/A * of the image for this operation. Scaling of the image from source 0N/A * to destination is performed such that the first coordinate 0N/A * of the source rectangle is mapped to the first coordinate of 0N/A * the destination rectangle, and the second source coordinate is 0N/A * mapped to the second destination coordinate. The subimage is 0N/A * scaled and flipped as needed to preserve those mappings. 0N/A * @param img the specified image to be drawn 0N/A * @param dx1 the <i>x</i> coordinate of the first corner of the 0N/A * destination rectangle. 0N/A * @param dy1 the <i>y</i> coordinate of the first corner of the 0N/A * destination rectangle. 0N/A * @param dx2 the <i>x</i> coordinate of the second corner of the 0N/A * destination rectangle. 0N/A * @param dy2 the <i>y</i> coordinate of the second corner of the 0N/A * destination rectangle. 0N/A * @param sx1 the <i>x</i> coordinate of the first corner of the 0N/A * @param sy1 the <i>y</i> coordinate of the first corner of the 0N/A * @param sx2 the <i>x</i> coordinate of the second corner of the 0N/A * @param sy2 the <i>y</i> coordinate of the second corner of the 0N/A * @param bgcolor the background color to paint under the 0N/A * non-opaque portions of the image. 0N/A * @param observer object to be notified as more of the image is 0N/A * scaled and converted. 0N/A * @see java.awt.Image 0N/A * @see java.awt.image.ImageObserver 0N/A * @see java.awt.image.ImageObserver#imageUpdate(java.awt.Image, int, int, int, int, int) 0N/A * Draws an image, applying a transform from image space into user space 0N/A * The transformation from user space into device space is done with 0N/A * the current transform in the Graphics2D. 0N/A * The given transformation is applied to the image before the 0N/A * transform attribute in the Graphics2D state is applied. 0N/A * The rendering attributes applied include the clip, transform, 0N/A * and composite attributes. Note that the result is 0N/A * undefined, if the given transform is noninvertible. 0N/A * @param img The image to be drawn. 0N/A * @param xform The transformation from image space into user space. 0N/A * @see #setTransform 0N/A * @see #setComposite 0N/A * Disposes of this graphics context and releases 0N/A * any system resources that it is using. 0N/A * A <code>Graphics</code> object cannot be used after 0N/A * <code>dispose</code>has been called. 0N/A * When a Java program runs, a large number of <code>Graphics</code> 0N/A * objects can be created within a short time frame. 0N/A * Although the finalization process of the garbage collector 0N/A * also disposes of the same system resources, it is preferable 0N/A * to manually free the associated resources by calling this 0N/A * method rather than to rely on a finalization process which 0N/A * may not run to completion for a long period of time. 0N/A * Graphics objects which are provided as arguments to the 0N/A * <code>paint</code> and <code>update</code> methods 0N/A * of components are automatically released by the system when 0N/A * those methods return. For efficiency, programmers should 0N/A * call <code>dispose</code> when finished using 0N/A * a <code>Graphics</code> object only if it was created 0N/A * directly from a component or another <code>Graphics</code> object. 0N/A * @see java.awt.Graphics#finalize 0N/A * @see java.awt.Component#paint 0N/A * @see java.awt.Component#update 0N/A * @see java.awt.Component#getGraphics 0N/A * @see java.awt.Graphics#create 0N/A * Empty finalizer as no clean up needed here. 0N/A/* The Delegated Graphics2D Methods */ 0N/A * Strokes the outline of a Shape using the settings of the current 0N/A * graphics state. The rendering attributes applied include the 0N/A * clip, transform, paint or color, composite and stroke attributes. 0N/A * @param s The shape to be drawn. 0N/A * @see java.awt.Graphics#setColor 0N/A * @see #setTransform 0N/A * @see #setComposite 0N/A * Draws an image, applying a transform from image space into user space 0N/A * The transformation from user space into device space is done with 0N/A * the current transform in the Graphics2D. 0N/A * The given transformation is applied to the image before the 0N/A * transform attribute in the Graphics2D state is applied. 0N/A * The rendering attributes applied include the clip, transform, 0N/A * and composite attributes. Note that the result is 0N/A * undefined, if the given transform is noninvertible. 0N/A * @param img The image to be drawn. 0N/A * @param xform The transformation from image space into user space. 0N/A * @param obs The image observer to be notified as more of the image 0N/A * @see #setTransform 0N/A * @see #setComposite 0N/A// if (mDrawingArea[0] != null) { 0N/A// Rectangle2D.Double bbox = new Rectangle2D.Double(); 0N/A// Point2D leftTop = new Point2D.Double(0, 0); 0N/A// Point2D rightBottom = new Point2D.Double(getImageWidth(img), 0N/A// getImageHeight(img)); 0N/A// xform.transform(leftTop, leftTop); 0N/A// xform.transform(rightBottom, rightBottom); 0N/A// bbox.setBoundsFromDiagonal(leftTop, rightBottom); 0N/A// addDrawingRect(bbox); 0N/A * Draws a BufferedImage that is filtered with a BufferedImageOp. 0N/A * The rendering attributes applied include the clip, transform 0N/A * and composite attributes. This is equivalent to: 0N/A * img1 = op.filter(img, null); 0N/A * drawImage(img1, new AffineTransform(1f,0f,0f,1f,x,y), null); 0N/A * @param op The filter to be applied to the image before drawing. 0N/A * @param img The BufferedImage to be drawn. 0N/A * @param x,y The location in user space where the image should be drawn. 0N/A * @see #setTransform 0N/A * @see #setComposite 0N/A * Draws a string of text. 0N/A * The rendering attributes applied include the clip, transform, 0N/A * paint or color, font and composite attributes. 0N/A * @param s The string to be drawn. 0N/A * @param x,y The coordinates where the string should be drawn. 0N/A * @see java.awt.Graphics#setColor 0N/A * @see java.awt.Graphics#setFont 0N/A * @see #setTransform 0N/A * @see #setComposite 0N/A /* Logical bounds close enough and is used for GlyphVector */ 0N/A * Draws a GlyphVector. 0N/A * The rendering attributes applied include the clip, transform, 0N/A * paint or color, and composite attributes. The GlyphVector specifies 0N/A * individual glyphs from a Font. 0N/A * @param g The GlyphVector to be drawn. 0N/A * @param x,y The coordinates where the glyphs should be drawn. 0N/A * @see java.awt.Graphics#setColor 0N/A * @see #setTransform 0N/A * @see #setComposite 0N/A * Fills the interior of a Shape using the settings of the current 0N/A * graphics state. The rendering attributes applied include the 0N/A * clip, transform, paint or color, and composite. 0N/A * @see java.awt.Graphics#setColor 0N/A * @see #setTransform 0N/A * @see #setComposite 0N/A * Checks to see if the outline of a Shape intersects the specified 0N/A * Rectangle in device space. 0N/A * The rendering attributes taken into account include the 0N/A * clip, transform, and stroke attributes. 0N/A * @param rect The area in device space to check for a hit. 0N/A * @param s The shape to check for a hit. 0N/A * @param onStroke Flag to choose between testing the stroked or 0N/A * @return True if there is a hit, false otherwise. 0N/A * @see #setTransform 0N/A * Sets the Composite in the current graphics state. Composite is used 0N/A * in all drawing methods such as drawImage, drawString, draw, 0N/A * and fill. It specifies how new pixels are to be combined with 0N/A * the existing pixels on the graphics device in the rendering process. 0N/A * @param comp The Composite object to be used for drawing. 0N/A * @see java.awt.Graphics#setXORMode 0N/A * @see java.awt.Graphics#setPaintMode 0N/A * @see AlphaComposite 0N/A * Sets the Paint in the current graphics state. 0N/A * @param paint The Paint object to be used to generate color in 0N/A * the rendering process. 0N/A * @see java.awt.Graphics#setColor 0N/A * @see GradientPaint 0N/A * Sets the Stroke in the current graphics state. 0N/A * @param s The Stroke object to be used to stroke a Shape in 0N/A * the rendering process. 0N/A * Sets the preferences for the rendering algorithms. 0N/A * Hint categories include controls for rendering quality and 0N/A * @param hintCategory The category of hint to be set. 0N/A * @param hintValue The value indicating preferences for the specified 0N/A * @see RenderingHints 0N/A * Returns the preferences for the rendering algorithms. 0N/A * @param hintCategory The category of hint to be set. 0N/A * @return The preferences for rendering algorithms. 0N/A * @see RenderingHings 0N/A * Sets the preferences for the rendering algorithms. 0N/A * Hint categories include controls for rendering quality and 0N/A * @param hints The rendering hints to be set 0N/A * @see RenderingHints 0N/A * Adds a number of preferences for the rendering algorithms. 0N/A * Hint categories include controls for rendering quality and 0N/A * @param hints The rendering hints to be set 0N/A * @see RenderingHints 0N/A * Gets the preferences for the rendering algorithms. 0N/A * Hint categories include controls for rendering quality and 0N/A * @see RenderingHints 0N/A * Composes a Transform object with the transform in this 0N/A * Graphics2D according to the rule last-specified-first-applied. 0N/A * If the currrent transform is Cx, the result of composition 0N/A * with Tx is a new transform Cx'. Cx' becomes the current 0N/A * transform for this Graphics2D. 0N/A * Transforming a point p by the updated transform Cx' is 0N/A * equivalent to first transforming p by Tx and then transforming 0N/A * the result by the original transform Cx. In other words, 0N/A * Cx'(p) = Cx(Tx(p)). 0N/A * A copy of the Tx is made, if necessary, so further 0N/A * modifications to Tx do not affect rendering. 0N/A * @param Tx The Transform object to be composed with the current 0N/A * @see #setTransform 0N/A * @see TransformChain 0N/A * @see AffineTransform 0N/A * Sets the Transform in the current graphics state. 0N/A * @param Tx The Transform object to be used in the rendering process. 0N/A * @see TransformChain 0N/A * @see AffineTransform 0N/A * Returns the current Transform in the Graphics2D state. 0N/A * @see #setTransform 0N/A * Returns the current Paint in the Graphics2D state. 0N/A * @see java.awt.Graphics#setColor 0N/A * Returns the current Composite in the Graphics2D state. 0N/A * @see #setComposite 0N/A * Sets the background color in this context used for clearing a region. 0N/A * When Graphics2D is constructed for a component, the backgroung color is 0N/A * inherited from the component. Setting the background color in the 0N/A * Graphics2D context only affects the subsequent clearRect() calls and 0N/A * not the background color of the component. To change the background 0N/A * of the component, use appropriate methods of the component. 0N/A * @param color The background color that should be used in 0N/A * subsequent calls to clearRect(). 0N/A * @see getBackground 0N/A * @see Graphics.clearRect() 0N/A * Returns the background color used for clearing a region. 0N/A * @see setBackground 0N/A * Returns the current Stroke in the Graphics2D state. 0N/A * Intersects the current clip with the interior of the specified Shape 0N/A * and sets the current clip to the resulting intersection. 0N/A * The indicated shape is transformed with the current transform in the 0N/A * Graphics2D state before being intersected with the current clip. 0N/A * This method is used to make the current clip smaller. 0N/A * To make the clip larger, use any setClip method. 0N/A * @param s The Shape to be intersected with the current clip. 0N/A * Return true if the Rectangle <code>rect</code> 0N/A * intersects the area into which the application 0N/A * Return the object holding the summary of the 0N/A * drawing done by the printing application. 0N/A /* Support Routines for Calculating the Drawing Area */ 0N/A * Shift the rectangle 'rect' to the position ('x', 'y') 0N/A * and add the resulting rectangle to the area representing 0N/A * the part of the page which is drawn into. 0N/A * Add the rectangle 'rect' to the area representing 0N/A * the part of the page which is drawn into. 0N/A /* For testing purposes the following line can be uncommented. 0N/A When uncommented it causes the entire page to be rasterized 0N/A thus eliminating errors caused by a faulty bounding box 0N/A //mDrawingArea.addInfinite(); 0N/A * Add the stroked shape to the area representing 0N/A * the part of the page which is drawn into. 0N/A /* Image Observer */ 0N/A * Notify this object when the height or width become available 0N/A /* Wait for the width the image to 0N/A /* Wait for the height the image to 0N/A * This private class does not return from its constructor 0N/A * until 'img's width and height are available. 0N/A int x,
int y,
int w,
int h) {