Package net.paulhertz.pixelaudio
Class ImageTransform
java.lang.Object
net.paulhertz.pixelaudio.ImageTransform
Deprecated.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionDeprecated.initializes a PGraphics with width = height = 1024.ImageTransform
(int w, int h) Deprecated.initializes a PGraphics with width = w and height = h. -
Method Summary
Modifier and TypeMethodDescriptionvoid
adjustToImage
(PImage img) Deprecated.Deprecated.Reflects an image on the y-axis, flipping the x-coordinates, returns a transformed copyDeprecated.Reflects an image on the y-axis, flipping the x-coordinates, returns a transformed copyDeprecated.Reflects an image on the y-axis, flipping the x-coordinates, rotates it 90 degrees CW and returns a transformed copy: equivalent to reflecting the image on the secondary diagonal, upper right to lower left.Deprecated.Reflects an image on the y-axis, flipping the x-coordinates, rotates it 90 degrees CW and returns a transformed copy: equivalent to reflecting the image on the secondary diagonal, upper right to lower left.flipX90CCW
(PImage img) Deprecated.Reflects an image on the y-axis, flipping the x-coordinates, rotates it 90 degrees CCW and returns a transformed copy: equivalent to reflecting the image on the primary diagonal, from upper left to lower right.flipX90CCW
(PImage img, int c) Deprecated.Reflects an image on the y-axis, flipping the x-coordinates, rotates it 90 degrees CCW and returns a transformed copy: equivalent to reflecting the image on the primary diagonal, from upper left to lower right.Deprecated.Reflects an image on the x-axis, flipping the y-coordinates, returns a transformed copy.Deprecated.Reflects an image on the x-axis, flipping the y-coordinates, returns a transformed copyDeprecated.int
Deprecated.int
getWidth()
Deprecated.Deprecated.Leaves image geometry untransformed but possibly with a different background color (for images with an alpha channel)void
resizeGraphics
(int w, int h) Deprecated.rotAndScale
(PImage img, float rads, float sx, float sy) Deprecated.Rotates and scales a PImage around its center.rotAndScale
(PImage img, float rads, float sx, float sy, int c) Deprecated.Rotates and scales a PImage around its center.Deprecated.Rotates an image 180 degrees, returns a transformed copyDeprecated.Rotates an image 180 degrees, returns a transformed copyDeprecated.Rotates an image 90 degrees clockwise, returns a transformed copyDeprecated.Rotates an image 90 degrees clockwise, returns a transformed copyrotate90CCW
(PImage img) Deprecated.Rotates an image 90 degrees counter-clockwise, returns a transformed copyrotate90CCW
(PImage img, int c) Deprecated.Rotates an image 90 degrees counter-clockwise, returns a transformed copytransform
(PImage img, AffineTransformType type) Deprecated.transform
(PImage img, AffineTransformType type, int c) Deprecated.Rotates or reflects a PImage, as specified by the type argument.
-
Constructor Details
-
ImageTransform
public ImageTransform(int w, int h) Deprecated.initializes a PGraphics with width = w and height = h. -
ImageTransform
public ImageTransform()Deprecated.initializes a PGraphics with width = height = 1024.
-
-
Method Details
-
getGraphics
Deprecated.- Returns:
- itGraf, the PGraphics instance used for transforms
-
getWidth
public int getWidth()Deprecated.- Returns:
- the width of the PGraphics instance used for transforms
-
getHeight
public int getHeight()Deprecated.- Returns:
- the height of the PGraphics instance used for transforms
-
adjustToImage
Deprecated.- Parameters:
img
- a PImage whose width and height will be used to set the width and height of the PGraphics instance used for transforms
-
resizeGraphics
public void resizeGraphics(int w, int h) Deprecated.- Parameters:
w
- the new width of the PGraphics instance used for transformsh
- the new height of the PGraphics instance used for transforms
-
transform
Deprecated.- Parameters:
img
- a PImage to transformtype
- the ImageTransformType (ROT90CW, ROT90CCW, ROT180, FLIPX, FLIPY)- Returns:
- a transformed PImage from the PGraphics instance used for transforms
-
transform
Deprecated.Rotates or reflects a PImage, as specified by the type argument.- Parameters:
img
- a PImage to transformtype
- the ImageTransformType (ROT90CW, ROT90CCW, ROT180, FLIPX, FLIPY)c
- the background color for the image (affects the alpha channel of the output)- Returns:
- a transformed PImage from the PGraphics instance used for transforms
-
rotAndScale
Deprecated.Rotates and scales a PImage around its center. You may need to set width and height with resizeGraphics before calling this method, e.g., when rotating by and angle other than a multiple of pi/2 radians.- Parameters:
img
- PImage to rotate and scalerads
- angle of rotation in radianssx
- x-axis scalingsy
- y-axis scaling- Returns:
- a PImage obtained from the PGraphics instance used for transforms
-
rotAndScale
Deprecated.Rotates and scales a PImage around its center. You may need to set width and height with resizeGraphics before calling this method, e.g., when rotating by and angle other than a multiple of pi/2 radians.- Parameters:
img
- PImage to rotate and scalerads
- angle of rotation in radianssx
- x-axis scalingsy
- y-axis scalingc
- background color (may affect alpha channel of output)- Returns:
- a PImage obtained from the PGraphics instance used for transforms
-
rotate90
Deprecated.Rotates an image 90 degrees clockwise, returns a transformed copy- Parameters:
img
- PImage to transform- Returns:
- a PImage obtained from the PGraphics instance used for transforms
-
rotate90
Deprecated.Rotates an image 90 degrees clockwise, returns a transformed copy- Parameters:
img
- PImage to transformc
- background color (may affect alpha channel of output)- Returns:
- a PImage obtained from the PGraphics instance used for transforms
-
rotate90CCW
Deprecated.Rotates an image 90 degrees counter-clockwise, returns a transformed copy- Parameters:
img
- PImage to transform- Returns:
- a PImage obtained from the PGraphics instance used for transforms
-
rotate90CCW
Deprecated.Rotates an image 90 degrees counter-clockwise, returns a transformed copy- Parameters:
img
- PImage to transformc
- background color (may affect alpha channel of output)- Returns:
- a PImage obtained from the PGraphics instance used for transforms
-
rotate180
Deprecated.Rotates an image 180 degrees, returns a transformed copy- Parameters:
img
- PImage to transform- Returns:
- a PImage obtained from the PGraphics instance used for transforms
-
rotate180
Deprecated.Rotates an image 180 degrees, returns a transformed copy- Parameters:
img
- PImage to transformc
- background color (may affect alpha channel of output)- Returns:
- a PImage obtained from the PGraphics instance used for transforms
-
flipX
Deprecated.Reflects an image on the y-axis, flipping the x-coordinates, returns a transformed copy- Parameters:
img
- PImage to transform- Returns:
- a PImage obtained from the PGraphics instance used for transforms
-
flipX
Deprecated.Reflects an image on the y-axis, flipping the x-coordinates, returns a transformed copy- Parameters:
img
- PImage to transformc
- background color (may affect alpha channel of output)- Returns:
- a PImage obtained from the PGraphics instance used for transforms
-
flipX90
Deprecated.Reflects an image on the y-axis, flipping the x-coordinates, rotates it 90 degrees CW and returns a transformed copy: equivalent to reflecting the image on the secondary diagonal, upper right to lower left.- Parameters:
img
- PImage to transform- Returns:
- a PImage obtained from the PGraphics instance used for transforms
-
flipX90
Deprecated.Reflects an image on the y-axis, flipping the x-coordinates, rotates it 90 degrees CW and returns a transformed copy: equivalent to reflecting the image on the secondary diagonal, upper right to lower left.- Parameters:
img
- PImage to transformc
- background color (may affect alpha channel of output)- Returns:
- a PImage obtained from the PGraphics instance used for transforms
-
flipX90CCW
Deprecated.Reflects an image on the y-axis, flipping the x-coordinates, rotates it 90 degrees CCW and returns a transformed copy: equivalent to reflecting the image on the primary diagonal, from upper left to lower right.- Parameters:
img
- PImage to transform- Returns:
- a PImage obtained from the PGraphics instance used for transforms
-
flipX90CCW
Deprecated.Reflects an image on the y-axis, flipping the x-coordinates, rotates it 90 degrees CCW and returns a transformed copy: equivalent to reflecting the image on the primary diagonal, from upper left to lower right.- Parameters:
img
- PImage to transformc
- background color (may affect alpha channel of output)- Returns:
- a PImage obtained from the PGraphics instance used for transforms
-
flipY
Deprecated.Reflects an image on the x-axis, flipping the y-coordinates, returns a transformed copy. Same as flipX() followed by rotate180().- Parameters:
img
- PImage to transform- Returns:
- a PImage obtained from the PGraphics instance used for transforms
-
flipY
Deprecated.Reflects an image on the x-axis, flipping the y-coordinates, returns a transformed copy- Parameters:
img
- PImage to transformc
- background color (may affect alpha channel of output)- Returns:
- a PImage obtained from the PGraphics instance used for transforms
-
nada
Deprecated.Leaves image geometry untransformed but possibly with a different background color (for images with an alpha channel)- Parameters:
img
- PImage to transformc
- background color (may affect alpha channel of output)- Returns:
- a PImage obtained from the PGraphics instance used for transforms
-
Provides static methods for rotating and reflecting Processing images of type
PImage
using aPGraphics
instance. ThePGraphics
width and height affect scaling of thePImage
. No-args constructor defaults to a 1024 x 1024 image size.Most or all of the functionality required for the PixelAudo library is now in BitmapTransform. BitmapTransform's methods are faster and more generalized than those in ImageTransform, but they do not provide scaling or rotation by angles other than 90 degrees, nor do they tap into Processing's off-screen graphics environment.