Java Doc for AffineTransformOp.java in  » 6.0-JDK-Core » AWT » java » awt » image » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Home
Java Source Code / Java Documentation
1.6.0 JDK Core
2.6.0 JDK Modules
3.6.0 JDK Modules com.sun
4.6.0 JDK Modules com.sun.java
5.6.0 JDK Modules sun
6.6.0 JDK Platform
7.Ajax
8.Apache Harmony Java SE
9.Aspect oriented
10.Authentication Authorization
11.Blogger System
12.Build
13.Byte Code
14.Cache
15.Chart
16.Chat
17.Code Analyzer
18.Collaboration
19.Content Management System
20.Database Client
21.Database DBMS
22.Database JDBC Connection Pool
23.Database ORM
24.Development
25.EJB Server
26.ERP CRM Financial
27.ESB
28.Forum
29.Game
30.GIS
31.Graphic 3D
32.Graphic Library
33.Groupware
34.HTML Parser
35.IDE
36.IDE Eclipse
37.IDE Netbeans
38.Installer
39.Internationalization Localization
40.Inversion of Control
41.Issue Tracking
42.J2EE
43.J2ME
44.JBoss
45.JMS
46.JMX
47.Library
48.Mail Clients
49.Music
50.Net
51.Parser
52.PDF
53.Portal
54.Profiler
55.Project Management
56.Report
57.RSS RDF
58.Rule Engine
59.Science
60.Scripting
61.Search Engine
62.Security
63.Sevlet Container
64.Source Control
65.Swing Library
66.Template Engine
67.Test Coverage
68.Testing
69.UML
70.Web Crawler
71.Web Framework
72.Web Mail
73.Web Server
74.Web Services
75.Web Services apache cxf 2.2.6
76.Web Services AXIS2
77.Wiki Engine
78.Workflow Engines
79.XML
80.XML UI
Java Source Code / Java Documentation » 6.0 JDK Core » AWT » java.awt.image 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   java.awt.image.AffineTransformOp

AffineTransformOp
public class AffineTransformOp implements BufferedImageOp,RasterOp(Code)
This class uses an affine transform to perform a linear mapping from 2D coordinates in the source image or Raster to 2D coordinates in the destination image or Raster. The type of interpolation that is used is specified through a constructor, either by a RenderingHints object or by one of the integer interpolation types defined in this class.

If a RenderingHints object is specified in the constructor, the interpolation hint and the rendering quality hint are used to set the interpolation type for this operation. The color rendering hint and the dithering hint can be used when color conversion is required.

Note that the following constraints have to be met:

  • The source and destination must be different.
  • For Raster objects, the number of bands in the source must be equal to the number of bands in the destination.

See Also:   AffineTransform
See Also:   BufferedImageFilter
See Also:   java.awt.RenderingHints.KEY_INTERPOLATION
See Also:   java.awt.RenderingHints.KEY_RENDERING
See Also:   java.awt.RenderingHints.KEY_COLOR_RENDERING
See Also:   java.awt.RenderingHints.KEY_DITHERING
version:
   16 Apr 1998


Field Summary
final public static  intTYPE_BICUBIC
     Bicubic interpolation type.
final public static  intTYPE_BILINEAR
     Bilinear interpolation type.
final public static  intTYPE_NEAREST_NEIGHBOR
     Nearest-neighbor interpolation type.
 RenderingHintshints
    
 intinterpolationType
    

Constructor Summary
public  AffineTransformOp(AffineTransform xform, RenderingHints hints)
     Constructs an AffineTransformOp given an affine transform. The interpolation type is determined from the RenderingHints object.
public  AffineTransformOp(AffineTransform xform, int interpolationType)
     Constructs an AffineTransformOp given an affine transform and the interpolation type.
Parameters:
  xform - The AffineTransform to use for the operation.
Parameters:
  interpolationType - One of the integerinterpolation type constants defined by this class: AffineTransformOp.TYPE_NEAREST_NEIGHBOR TYPE_NEAREST_NEIGHBOR,AffineTransformOp.TYPE_BILINEAR TYPE_BILINEAR,AffineTransformOp.TYPE_BICUBIC TYPE_BICUBIC.

Method Summary
public  BufferedImagecreateCompatibleDestImage(BufferedImage src, ColorModel destCM)
     Creates a zeroed destination image with the correct size and number of bands.
public  WritableRastercreateCompatibleDestRaster(Raster src)
     Creates a zeroed destination Raster with the correct size and number of bands.
final public  BufferedImagefilter(BufferedImage src, BufferedImage dst)
     Transforms the source BufferedImage and stores the results in the destination BufferedImage.
final public  WritableRasterfilter(Raster src, WritableRaster dst)
     Transforms the source Raster and stores the results in the destination Raster.
final public  Rectangle2DgetBounds2D(BufferedImage src)
     Returns the bounding box of the transformed destination.
final public  Rectangle2DgetBounds2D(Raster src)
     Returns the bounding box of the transformed destination.
final public  intgetInterpolationType()
     Returns the interpolation type used by this op.
final public  Point2DgetPoint2D(Point2D srcPt, Point2D dstPt)
     Returns the location of the corresponding destination point given a point in the source.
final public  RenderingHintsgetRenderingHints()
     Returns the rendering hints used by this transform operation. The RenderingHints object associated with this op.
final public  AffineTransformgetTransform()
     Returns the affine transform used by this transform operation. The AffineTransform associated with this op.
 voidvalidateTransform(AffineTransform xform)
    

Field Detail
TYPE_BICUBIC
final public static int TYPE_BICUBIC(Code)
Bicubic interpolation type.



TYPE_BILINEAR
final public static int TYPE_BILINEAR(Code)
Bilinear interpolation type.



TYPE_NEAREST_NEIGHBOR
final public static int TYPE_NEAREST_NEIGHBOR(Code)
Nearest-neighbor interpolation type.



hints
RenderingHints hints(Code)



interpolationType
int interpolationType(Code)




Constructor Detail
AffineTransformOp
public AffineTransformOp(AffineTransform xform, RenderingHints hints)(Code)
Constructs an AffineTransformOp given an affine transform. The interpolation type is determined from the RenderingHints object. If the interpolation hint is defined, it will be used. Otherwise, if the rendering quality hint is defined, the interpolation type is determined from its value. If no hints are specified (hints is null), the interpolation type is AffineTransformOp.TYPE_NEAREST_NEIGHBOR TYPE_NEAREST_NEIGHBOR .
Parameters:
  xform - The AffineTransform to use for theoperation.
Parameters:
  hints - The RenderingHints object used to specifythe interpolation type for the operation.
throws:
  ImagingOpException - if the transform is non-invertible.
See Also:   java.awt.RenderingHints.KEY_INTERPOLATION
See Also:   java.awt.RenderingHints.KEY_RENDERING



AffineTransformOp
public AffineTransformOp(AffineTransform xform, int interpolationType)(Code)
Constructs an AffineTransformOp given an affine transform and the interpolation type.
Parameters:
  xform - The AffineTransform to use for the operation.
Parameters:
  interpolationType - One of the integerinterpolation type constants defined by this class: AffineTransformOp.TYPE_NEAREST_NEIGHBOR TYPE_NEAREST_NEIGHBOR,AffineTransformOp.TYPE_BILINEAR TYPE_BILINEAR,AffineTransformOp.TYPE_BICUBIC TYPE_BICUBIC.
throws:
  ImagingOpException - if the transform is non-invertible.




Method Detail
createCompatibleDestImage
public BufferedImage createCompatibleDestImage(BufferedImage src, ColorModel destCM)(Code)
Creates a zeroed destination image with the correct size and number of bands. A RasterFormatException may be thrown if the transformed width or height is equal to 0.

If destCM is null, an appropriate ColorModel is used; this ColorModel may have an alpha channel even if the source ColorModel is opaque.
Parameters:
  src - The BufferedImage to be transformed.
Parameters:
  destCM - ColorModel of the destination. If null,an appropriate ColorModel is used. The zeroed destination image.




createCompatibleDestRaster
public WritableRaster createCompatibleDestRaster(Raster src)(Code)
Creates a zeroed destination Raster with the correct size and number of bands. A RasterFormatException may be thrown if the transformed width or height is equal to 0.
Parameters:
  src - The Raster to be transformed. The zeroed destination Raster.



filter
final public BufferedImage filter(BufferedImage src, BufferedImage dst)(Code)
Transforms the source BufferedImage and stores the results in the destination BufferedImage. If the color models for the two images do not match, a color conversion into the destination color model is performed. If the destination image is null, a BufferedImage is created with the source ColorModel.

The coordinates of the rectangle returned by getBounds2D(BufferedImage) are not necessarily the same as the coordinates of the BufferedImage returned by this method. If the upper-left corner coordinates of the rectangle are negative then this part of the rectangle is not drawn. If the upper-left corner coordinates of the rectangle are positive then the filtered image is drawn at that position in the destination BufferedImage.

An IllegalArgumentException is thrown if the source is the same as the destination.
Parameters:
  src - The BufferedImage to transform.
Parameters:
  dst - The BufferedImage in which to store the results of the transformation. The filtered BufferedImage.
throws:
  IllegalArgumentException - if src and dst are the same
throws:
  ImagingOpException - if the image cannot be transformedbecause of a data-processing error that might be caused by an invalid image format, tile format, orimage-processing operation, or any other unsupported operation.




filter
final public WritableRaster filter(Raster src, WritableRaster dst)(Code)
Transforms the source Raster and stores the results in the destination Raster. This operation performs the transform band by band.

If the destination Raster is null, a new Raster is created. An IllegalArgumentException may be thrown if the source is the same as the destination or if the number of bands in the source is not equal to the number of bands in the destination.

The coordinates of the rectangle returned by getBounds2D(Raster) are not necessarily the same as the coordinates of the WritableRaster returned by this method. If the upper-left corner coordinates of rectangle are negative then this part of the rectangle is not drawn. If the coordinates of the rectangle are positive then the filtered image is drawn at that position in the destination Raster.


Parameters:
  src - The Raster to transform.
Parameters:
  dst - The Raster in which to store the results of the transformation. The transformed Raster.
throws:
  ImagingOpException - if the raster cannot be transformedbecause of a data-processing error that might becaused by an invalid image format, tile format, orimage-processing operation, or any other unsupportedoperation.




getBounds2D
final public Rectangle2D getBounds2D(BufferedImage src)(Code)
Returns the bounding box of the transformed destination. The rectangle returned is the actual bounding box of the transformed points. The coordinates of the upper-left corner of the returned rectangle might not be (0, 0).
Parameters:
  src - The BufferedImage to be transformed. The Rectangle2D representing the destination'sbounding box.



getBounds2D
final public Rectangle2D getBounds2D(Raster src)(Code)
Returns the bounding box of the transformed destination. The rectangle returned will be the actual bounding box of the transformed points. The coordinates of the upper-left corner of the returned rectangle might not be (0, 0).
Parameters:
  src - The Raster to be transformed. The Rectangle2D representing the destination'sbounding box.



getInterpolationType
final public int getInterpolationType()(Code)
Returns the interpolation type used by this op. the interpolation type.
See Also:   AffineTransformOp.TYPE_NEAREST_NEIGHBOR
See Also:   AffineTransformOp.TYPE_BILINEAR
See Also:   AffineTransformOp.TYPE_BICUBIC



getPoint2D
final public Point2D getPoint2D(Point2D srcPt, Point2D dstPt)(Code)
Returns the location of the corresponding destination point given a point in the source. If dstPt is specified, it is used to hold the return value.
Parameters:
  srcPt - The Point2D that represents the sourcepoint.
Parameters:
  dstPt - The Point2D in which to store the result. The Point2D in the destination that corresponds to the specified point in the source.



getRenderingHints
final public RenderingHints getRenderingHints()(Code)
Returns the rendering hints used by this transform operation. The RenderingHints object associated with this op.



getTransform
final public AffineTransform getTransform()(Code)
Returns the affine transform used by this transform operation. The AffineTransform associated with this op.



validateTransform
void validateTransform(AffineTransform xform)(Code)



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.