Uses of Class
java.awt.geom.AffineTransform
Package
Description
Contains all of the classes for creating user interfaces and for painting
graphics and images.
Provides classes and interface relating to fonts.
Provides the Java 2D classes for defining and performing operations on
objects related to two-dimensional geometry.
Provides classes for creating and modifying images.
Provides classes and interfaces for producing rendering-independent images.
-
Uses of AffineTransform in java.awt
Modifier and TypeMethodDescriptionabstract AffineTransform
GraphicsConfiguration.getDefaultTransform()
Returns the defaultAffineTransform
for thisGraphicsConfiguration
.abstract AffineTransform
GraphicsConfiguration.getNormalizingTransform()
Returns anAffineTransform
that can be concatenated with the defaultAffineTransform
of aGraphicsConfiguration
so that 72 units in user space equals 1 inch in device space.Font.getTransform()
Returns a copy of the transform associated with thisFont
.abstract AffineTransform
Graphics2D.getTransform()
Returns a copy of the currentTransform
in theGraphics2D
context.MultipleGradientPaint.getTransform()
Returns a copy of the transform applied to the gradient.Modifier and TypeMethodDescriptionColor.createContext(ColorModel cm, Rectangle r, Rectangle2D r2d, AffineTransform xform, RenderingHints hints)
Creates and returns aPaintContext
used to generate a solid color field pattern.GradientPaint.createContext(ColorModel cm, Rectangle deviceBounds, Rectangle2D userBounds, AffineTransform xform, RenderingHints hints)
Creates and returns aPaintContext
used to generate a linear color gradient pattern.LinearGradientPaint.createContext(ColorModel cm, Rectangle deviceBounds, Rectangle2D userBounds, AffineTransform transform, RenderingHints hints)
Creates and returns aPaintContext
used to generate a linear color gradient pattern.Paint.createContext(ColorModel cm, Rectangle deviceBounds, Rectangle2D userBounds, AffineTransform xform, RenderingHints hints)
Creates and returns aPaintContext
used to generate the color pattern.RadialGradientPaint.createContext(ColorModel cm, Rectangle deviceBounds, Rectangle2D userBounds, AffineTransform transform, RenderingHints hints)
Creates and returns aPaintContext
used to generate a circular radial color gradient pattern.TexturePaint.createContext(ColorModel cm, Rectangle deviceBounds, Rectangle2D userBounds, AffineTransform xform, RenderingHints hints)
Creates and returns aPaintContext
used to generate a tiled image pattern.Font.deriveFont(int style, AffineTransform trans)
Creates a newFont
object by replicating thisFont
object and applying a new style and transform.Font.deriveFont(AffineTransform trans)
Creates a newFont
object by replicating the currentFont
object and applying a new transform to it.abstract boolean
Graphics2D.drawImage(Image img, AffineTransform xform, ImageObserver obs)
Renders an image, applying a transform from image space into user space before drawing.abstract void
Graphics2D.drawRenderableImage(RenderableImage img, AffineTransform xform)
Renders aRenderableImage
, applying a transform from image space into user space before drawing.abstract void
Graphics2D.drawRenderedImage(RenderedImage img, AffineTransform xform)
Renders aRenderedImage
, applying a transform from image space into user space before drawing.Polygon.getPathIterator(AffineTransform at)
Returns an iterator object that iterates along the boundary of thisPolygon
and provides access to the geometry of the outline of thisPolygon
.Polygon.getPathIterator(AffineTransform at, double flatness)
Returns an iterator object that iterates along the boundary of theShape
and provides access to the geometry of the outline of theShape
.Shape.getPathIterator(AffineTransform at)
Returns an iterator object that iterates along theShape
boundary and provides access to the geometry of theShape
outline.Shape.getPathIterator(AffineTransform at, double flatness)
Returns an iterator object that iterates along theShape
boundary and provides access to a flattened view of theShape
outline geometry.abstract void
Graphics2D.setTransform(AffineTransform Tx)
Overwrites the Transform in theGraphics2D
context.abstract void
Graphics2D.transform(AffineTransform Tx)
Composes anAffineTransform
object with theTransform
in thisGraphics2D
according to the rule last-specified-first-applied.ModifierConstructorDescriptionLinearGradientPaint(Point2D start, Point2D end, float[] fractions, Color[] colors, MultipleGradientPaint.CycleMethod cycleMethod, MultipleGradientPaint.ColorSpaceType colorSpace, AffineTransform gradientTransform)
Constructs aLinearGradientPaint
.RadialGradientPaint(Point2D center, float radius, Point2D focus, float[] fractions, Color[] colors, MultipleGradientPaint.CycleMethod cycleMethod, MultipleGradientPaint.ColorSpaceType colorSpace, AffineTransform gradientTransform)
Constructs aRadialGradientPaint
. -
Uses of AffineTransform in java.awt.font
Modifier and TypeMethodDescriptionabstract AffineTransform
GlyphVector.getGlyphTransform(int glyphIndex)
Returns the transform of the specified glyph within thisGlyphVector
.FontRenderContext.getTransform()
Gets the transform that is used to scale typographical points to pixels in thisFontRenderContext
.TransformAttribute.getTransform()
Returns a copy of the wrapped transform.Modifier and TypeMethodDescriptionGraphicAttribute.getOutline(AffineTransform tx)
Return aShape
that represents the region that thisGraphicAttribute
renders.ShapeGraphicAttribute.getOutline(AffineTransform tx)
Return aShape
that represents the region that thisShapeGraphicAttribute
renders.TextLayout.getOutline(AffineTransform tx)
Returns aShape
representing the outline of thisTextLayout
.abstract void
GlyphVector.setGlyphTransform(int glyphIndex, AffineTransform newTX)
Sets the transform of the specified glyph within thisGlyphVector
.ModifierConstructorDescriptionFontRenderContext(AffineTransform tx, boolean isAntiAliased, boolean usesFractionalMetrics)
Constructs aFontRenderContext
object from an optionalAffineTransform
and twoboolean
values that determine if the newly constructed object has anti-aliasing or fractional metrics.FontRenderContext(AffineTransform tx, Object aaHint, Object fmHint)
Constructs aFontRenderContext
object from an optionalAffineTransform
and twoObject
values that determine if the newly constructed object has anti-aliasing or fractional metrics.TransformAttribute(AffineTransform transform)
Wraps the specified transform. -
Uses of AffineTransform in java.awt.geom
Modifier and TypeMethodDescriptionAffineTransform.createInverse()
Returns anAffineTransform
object representing the inverse transformation.static AffineTransform
AffineTransform.getQuadrantRotateInstance(int numquadrants)
Returns a transform that rotates coordinates by the specified number of quadrants.static AffineTransform
AffineTransform.getQuadrantRotateInstance(int numquadrants, double anchorx, double anchory)
Returns a transform that rotates coordinates by the specified number of quadrants around the specified anchor point.static AffineTransform
AffineTransform.getRotateInstance(double theta)
Returns a transform representing a rotation transformation.static AffineTransform
AffineTransform.getRotateInstance(double vecx, double vecy)
Returns a transform that rotates coordinates according to a rotation vector.static AffineTransform
AffineTransform.getRotateInstance(double theta, double anchorx, double anchory)
Returns a transform that rotates coordinates around an anchor point.static AffineTransform
AffineTransform.getRotateInstance(double vecx, double vecy, double anchorx, double anchory)
Returns a transform that rotates coordinates around an anchor point according to a rotation vector.static AffineTransform
AffineTransform.getScaleInstance(double sx, double sy)
Returns a transform representing a scaling transformation.static AffineTransform
AffineTransform.getShearInstance(double shx, double shy)
Returns a transform representing a shearing transformation.static AffineTransform
AffineTransform.getTranslateInstance(double tx, double ty)
Returns a transform representing a translation transformation.Modifier and TypeMethodDescriptionvoid
AffineTransform.concatenate(AffineTransform Tx)
Concatenates anAffineTransform Tx
to thisAffineTransform
Cx in the most commonly useful way to provide a new user space that is mapped to the former user space byTx
.Area.createTransformedArea(AffineTransform t)
Creates a newArea
object that contains the same geometry as thisArea
transformed by the specifiedAffineTransform
.Path2D.createTransformedShape(AffineTransform at)
Returns a newShape
representing a transformed version of thisPath2D
.Arc2D.getPathIterator(AffineTransform at)
Returns an iteration object that defines the boundary of the arc.Area.getPathIterator(AffineTransform at)
Creates aPathIterator
for the outline of thisArea
object.Area.getPathIterator(AffineTransform at, double flatness)
Creates aPathIterator
for the flattened outline of thisArea
object.CubicCurve2D.getPathIterator(AffineTransform at)
Returns an iteration object that defines the boundary of the shape.CubicCurve2D.getPathIterator(AffineTransform at, double flatness)
Return an iteration object that defines the boundary of the flattened shape.Ellipse2D.getPathIterator(AffineTransform at)
Returns an iteration object that defines the boundary of thisEllipse2D
.Line2D.getPathIterator(AffineTransform at)
Returns an iteration object that defines the boundary of thisLine2D
.Line2D.getPathIterator(AffineTransform at, double flatness)
Returns an iteration object that defines the boundary of this flattenedLine2D
.Path2D.Double.getPathIterator(AffineTransform at)
Returns an iterator object that iterates along theShape
boundary and provides access to the geometry of theShape
outline.Path2D.Float.getPathIterator(AffineTransform at)
Returns an iterator object that iterates along theShape
boundary and provides access to the geometry of theShape
outline.Path2D.getPathIterator(AffineTransform at, double flatness)
Returns an iterator object that iterates along theShape
boundary and provides access to a flattened view of theShape
outline geometry.QuadCurve2D.getPathIterator(AffineTransform at)
Returns an iteration object that defines the boundary of the shape of thisQuadCurve2D
.QuadCurve2D.getPathIterator(AffineTransform at, double flatness)
Returns an iteration object that defines the boundary of the flattened shape of thisQuadCurve2D
.Rectangle2D.getPathIterator(AffineTransform at)
Returns an iteration object that defines the boundary of thisRectangle2D
.Rectangle2D.getPathIterator(AffineTransform at, double flatness)
Returns an iteration object that defines the boundary of the flattenedRectangle2D
.RectangularShape.getPathIterator(AffineTransform at, double flatness)
Returns an iterator object that iterates along theShape
object's boundary and provides access to a flattened view of the outline of theShape
object's geometry.RoundRectangle2D.getPathIterator(AffineTransform at)
Returns an iteration object that defines the boundary of thisRoundRectangle2D
.void
AffineTransform.preConcatenate(AffineTransform Tx)
Concatenates anAffineTransform Tx
to thisAffineTransform
Cx in a less commonly used way such thatTx
modifies the coordinate transformation relative to the absolute pixel space rather than relative to the existing user space.void
AffineTransform.setTransform(AffineTransform Tx)
Sets this transform to a copy of the transform in the specifiedAffineTransform
object.void
Area.transform(AffineTransform t)
Transforms the geometry of thisArea
using the specifiedAffineTransform
.void
Path2D.Double.transform(AffineTransform at)
Transforms the geometry of this path using the specifiedAffineTransform
.void
Path2D.Float.transform(AffineTransform at)
Transforms the geometry of this path using the specifiedAffineTransform
.abstract void
Path2D.transform(AffineTransform at)
Transforms the geometry of this path using the specifiedAffineTransform
.ModifierConstructorDescriptionConstructs a newAffineTransform
that is a copy of the specifiedAffineTransform
object.Double(Shape s, AffineTransform at)
Constructs a new double precisionPath2D
object from an arbitraryShape
object, transformed by anAffineTransform
object.Float(Shape s, AffineTransform at)
Constructs a new single precisionPath2D
object from an arbitraryShape
object, transformed by anAffineTransform
object. -
Uses of AffineTransform in java.awt.image
Modifier and TypeMethodDescriptionAffineTransformOp.getTransform()
Returns the affine transform used by this transform operation.ModifierConstructorDescriptionAffineTransformOp(AffineTransform xform, int interpolationType)
Constructs anAffineTransformOp
given an affine transform and the interpolation type.AffineTransformOp(AffineTransform xform, RenderingHints hints)
Constructs anAffineTransformOp
given an affine transform. -
Uses of AffineTransform in java.awt.image.renderable
Modifier and TypeMethodDescriptionRenderContext.getTransform()
Gets the current user-to-device AffineTransform.Modifier and TypeMethodDescriptionvoid
RenderContext.concatenateTransform(AffineTransform modTransform)
Modifies the current user-to-device transform by appending another transform.void
RenderContext.concetenateTransform(AffineTransform modTransform)
Deprecated.void
RenderContext.preConcatenateTransform(AffineTransform modTransform)
Modifies the current user-to-device transform by prepending another transform.void
RenderContext.preConcetenateTransform(AffineTransform modTransform)
Deprecated.replaced bypreConcatenateTransform(AffineTransform)
.void
RenderContext.setTransform(AffineTransform newTransform)
Sets the current user-to-device AffineTransform contained in the RenderContext to a given transform.ModifierConstructorDescriptionRenderContext(AffineTransform usr2dev)
Constructs a RenderContext with a given transform.RenderContext(AffineTransform usr2dev, RenderingHints hints)
Constructs a RenderContext with a given transform and rendering hints.RenderContext(AffineTransform usr2dev, Shape aoi)
Constructs a RenderContext with a given transform and area of interest.RenderContext(AffineTransform usr2dev, Shape aoi, RenderingHints hints)
Constructs a RenderContext with a given transform.
concatenateTransform(AffineTransform)
.