An abstract class defining a device independent two-dimensional vector
graphics API. Concrete subclasses implement this API for output of
vector graphics to:
Third party libraries provide support for output to other formats via this
API, including encapsulated postscript (EPS), portable document format (PDF),
and scalable vector graphics (SVG).
addRenderingHints
public abstract void addRenderingHints(Map ,
?> hints)
Adds/updates the rendering hint.
hints
- the hints to add or update.
clip
public abstract void clip(Shape s)
Sets the clip region to the intersection of the current clipping region
and s
.
s
- the shape to intersect with the current clipping region.
draw
public abstract void draw(Shape shape)
Draws an outline around a shape using the current stroke and paint.
shape
- the shape (null
not permitted).
drawGlyphVector
public abstract void drawGlyphVector(GlyphVector g,
float x,
float y)
Draws a glyph vector at the specified location.
g
- the glyph vector.x
- the x-coordinate.y
- the y-coordinate.
drawString
public abstract void drawString(String text,
float x,
float y)
Draws a string at the specified location, using the current font.
text
- the string to draw.x
- the x-coordinate.y
- the y-coordinate.
drawString
public abstract void drawString(String text,
int x,
int y)
Draws a string at the specified location, using the current font.
- drawString in interface Graphics
text
- the string to draw.x
- the x-coordinate.y
- the y-coordinate.
drawString
public abstract void drawString(AttributedCharacterIterator iterator,
float x,
float y)
Draws an attributed string at the specified location.
iterator
- the source of the attributed text.x
- the x-coordinate.y
- the y-coordinate.
fill
public abstract void fill(Shape shape)
Fills the interior of the specified shape
using the current
paint.
shape
- the shape to fill (null
not permitted).
getComposite
public abstract Composite getComposite()
Returns the current compositing rule.
- The current compositing rule.
getPaint
public abstract Paint getPaint()
Returns the current paint.
rotate
public abstract void rotate(double theta)
rotate
public abstract void rotate(double theta,
double x,
double y)
scale
public abstract void scale(double scaleX,
double scaleY)
setPaint
public abstract void setPaint(Paint paint)
Sets the paint to be used for subsequent drawing operations.
paint
- the paint (null
not permitted).
setRenderingHint
public abstract void setRenderingHint(RenderingHints.Key hintKey,
Object hintValue)
Adds or updates a hint in the current rendering hints table.
hintKey
- the hint key.hintValue
- the hint value.
setRenderingHints
public abstract void setRenderingHints(Map ,
?> hints)
Replaces the current rendering hints with the supplied hints.
setStroke
public abstract void setStroke(Stroke stroke)
Sets the stroke to be used for subsequent drawing operations.
stroke
- the stroke (null
not permitted).
setTransform
public abstract void setTransform(AffineTransform transform)
Sets the current transform. If the caller specifies a null
transform, this method should set the current transform to the
identity transform.
transform
- the transform (null
permitted).
shear
public abstract void shear(double shearX,
double shearY)
transform
public abstract void transform(AffineTransform transform)
Sets the current transform to a concatenation of transform
and the existing transform.
transform
- the transform.
translate
public abstract void translate(double tx,
double ty)
Copyright (C) 2000, 2002, 2004, 2006, Free Software Foundation
This file is part of GNU Classpath.
GNU Classpath is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GNU Classpath 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 for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
conditions of the GNU General Public License cover the whole
combination.
As a special exception, the copyright holders of this library give you
permission to link this library with independent modules to produce an
executable, regardless of the license terms of these independent
modules, and to copy and distribute the resulting executable under
terms of your choice, provided that you also meet, for each linked
independent module, the terms and conditions of the license of that
module. An independent module is a module which is not derived from
or based on this library. If you modify this library, you may extend
this exception to your version of the library, but you are not
obligated to do so. If you do not wish to do so, delete this
exception statement from your version.