/* * Copyright 1995-2006 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Sun designates this * particular file as subject to the "Classpath" exception as provided * by Sun in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, * CA 95054 USA or visit www.sun.com if you need additional information or * have any questions. */ package and.awt; import java.io.*; import java.lang.*; import java.util.*; //import net.pbdavey.awt.Font; //import net.pbdavey.awt.FontMetrics; import and.awt.Color; import and.awt.Polygon; import and.awt.Rectangle; import and.awt.Shape; /** * The <code>Graphics</code> class is the abstract base class for * all graphics contexts that allow an application to draw onto * components that are realized on various devices, as well as * onto off-screen images. * <p> * A <code>Graphics</code> object encapsulates state information needed * for the basic rendering operations that Java supports. This * state information includes the following properties: * <p> * <ul> * <li>The <code>Component</code> object on which to draw. * <li>A translation origin for rendering and clipping coordinates. * <li>The current clip. * <li>The current color. * <li>The current font. * <li>The current logical pixel operation function (XOR or Paint). * <li>The current XOR alternation color * (see {@link Graphics#setXORMode}). * </ul> * <p> * Coordinates are infinitely thin and lie between the pixels of the * output device. * Operations that draw the outline of a figure operate by traversing * an infinitely thin path between pixels with a pixel-sized pen that hangs * down and to the right of the anchor point on the path. * Operations that fill a figure operate by filling the interior * of that infinitely thin path. * Operations that render horizontal text render the ascending * portion of character glyphs entirely above the baseline coordinate. * <p> * The graphics pen hangs down and to the right from the path it traverses. * This has the following implications: * <p><ul> * <li>If you draw a figure that covers a given rectangle, that * figure occupies one extra row of pixels on the right and bottom edges * as compared to filling a figure that is bounded by that same rectangle. * <li>If you draw a horizontal line along the same <i>y</i> coordinate as * the baseline of a line of text, that line is drawn entirely below * the text, except for any descenders. * </ul><p> * All coordinates that appear as arguments to the methods of this * <code>Graphics</code> object are considered relative to the * translation origin of this <code>Graphics</code> object prior to * the invocation of the method. * <p> * All rendering operations modify only pixels which lie within the * area bounded by the current clip, which is specified by a {@link Shape} * in user space and is controlled by the program using the * <code>Graphics</code> object. This <i>user clip</i> * is transformed into device space and combined with the * <i>device clip</i>, which is defined by the visibility of windows and * device extents. The combination of the user clip and device clip * defines the <i>composite clip</i>, which determines the final clipping * region. The user clip cannot be modified by the rendering * system to reflect the resulting composite clip. The user clip can only * be changed through the <code>setClip</code> or <code>clipRect</code> * methods. * All drawing or writing is done in the current color, * using the current paint mode, and in the current font. * * @author Sami Shaio * @author Arthur van Hoff * @see java.awt.Component * @see java.awt.Graphics#clipRect(int, int, int, int) * @see java.awt.Graphics#setColor(java.awt.Color) * @see java.awt.Graphics#setPaintMode() * @see java.awt.Graphics#setXORMode(java.awt.Color) * @see java.awt.Graphics#setFont(java.awt.Font) * @since JDK1.0 */ public abstract class Graphics { }