|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.vistech.imageviewer.GeomManip
Rotates and flips images.
Field Summary | |
protected java.awt.geom.AffineTransform |
atx
|
protected int |
flipMode
|
protected ImageManipulator |
imageCanvas
|
protected boolean |
rotateOn
|
protected double |
rotationAngle
|
protected int |
rotationCenterX
|
protected int |
rotationCenterY
|
protected double |
shearFactor
|
protected boolean |
shearOn
|
protected double |
shearX
|
protected double |
shearY
|
Constructor Summary | |
GeomManip()
|
|
GeomManip(ImageManipulator imageCanvas)
|
Method Summary | |
static java.awt.geom.AffineTransform |
createFlipTransform(int mode,
int imageWid,
int imageHt)
Creates a flip transform. |
void |
flip(int mode)
Flips the image. |
int |
getFlipMode()
Returns the flip mode. |
double |
getRotationAngle()
Returns the rotation angle. |
double |
getShearFactor()
Returns the shear factor. |
double |
getShearFactorX()
|
double |
getShearFactorY()
|
void |
resetAndFlip(int mode)
|
void |
resetAndRotate(double theta)
|
void |
resetAndShear(double shx,
double shy)
|
void |
resetManipulation()
Resets manipulation |
void |
rotate(double theta)
Rotates the currently displayed image. |
void |
rotate(double theta,
int rotCenterX,
int rotCenterY)
Rotates the currently displayed image at a specified pivot point. |
void |
setFlipMode(int mode)
Sets the flip mode. |
void |
setImageManipulator(ImageManipulator imageCanvas)
|
void |
setRotationAngle(double rotationAngle)
Sets the rotation angle. |
void |
setShearFactor(double shearFactor)
Sets the shear factor. |
void |
shear(double shx,
double shy)
Shears the currently displayed image. |
void |
shearIncr(double shxIncr,
double shyIncr)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected java.awt.geom.AffineTransform atx
protected double rotationAngle
protected boolean rotateOn
protected int rotationCenterX
protected int rotationCenterY
protected boolean shearOn
protected double shearFactor
protected double shearX
protected double shearY
protected ImageManipulator imageCanvas
protected int flipMode
Constructor Detail |
public GeomManip()
public GeomManip(ImageManipulator imageCanvas)
imagecanvas
- the component on which the image is drawn.Method Detail |
public void setImageManipulator(ImageManipulator imageCanvas)
imagecanvas
- the component on which the image is drawn.public void setFlipMode(int mode)
GeomManipController
setFlipMode
in interface GeomManipController
com.vistech.imageviewer.GeomManipController
flipMode
- the flip modepublic int getFlipMode()
GeomManipController
getFlipMode
in interface GeomManipController
com.vistech.imageviewer.GeomManipController
public void setShearFactor(double shearFactor)
GeomManipController
setShearFactor
in interface GeomManipController
com.vistech.imageviewer.GeomManipController
the
- shear factor.public double getShearFactor()
GeomManipController
getShearFactor
in interface GeomManipController
com.vistech.imageviewer.GeomManipController
public double getShearFactorX()
public double getShearFactorY()
public void setRotationAngle(double rotationAngle)
GeomManipController
setRotationAngle
in interface GeomManipController
com.vistech.imageviewer.GeomManipController
the
- rotation angle.public double getRotationAngle()
GeomManipController
getRotationAngle
in interface GeomManipController
com.vistech.imageviewer.GeomManipController
public void rotate(double theta)
GeomManipController
rotate
in interface GeomManipController
com.vistech.imageviewer.GeomManipController
theta
- the rotation angle in radians.public void rotate(double theta, int rotCenterX, int rotCenterY)
GeomManipController
rotate
in interface GeomManipController
com.vistech.imageviewer.GeomManipController
theta
- the rotation angle in radians.rotCenterX
- the X rotation center.rotCenterY
- the Y rotation center.public void resetAndRotate(double theta)
public void shear(double shx, double shy)
GeomManipController
shear
in interface GeomManipController
com.vistech.imageviewer.GeomManipController
shx
- the shear in the x direction.shy
- the shear in the y direction.public void shearIncr(double shxIncr, double shyIncr)
public void resetAndShear(double shx, double shy)
public static java.awt.geom.AffineTransform createFlipTransform(int mode, int imageWid, int imageHt)
imageWid
- the width of the BufferedImage.imageHt
- the height of the BufferedImage.public void flip(int mode)
GeomManipController
flip
in interface GeomManipController
com.vistech.imageviewer.GeomManipController
flipMode
- the flip mode.
Four flip modes are: NORMAL, LEFT_RIGHT, TOP_BOTTOM,
LEFT_RIGHT_TOP_BOTTOMpublic void resetAndFlip(int mode)
public void resetManipulation()
GeomManipController
resetManipulation
in interface GeomManipController
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |