diff --git a/Changelog.md b/Changelog.md index cb9ffb6..db0582d 100644 --- a/Changelog.md +++ b/Changelog.md @@ -13,3 +13,33 @@ What was added: * Design changes. * Critical errors fixed. # + +# Texture 1.1.4 +Release date: 3.1.2020 (Morning) + +What was added: +* Class Texture was renamed to Animation! +* Class Texture is also still there but now it is doing something different. +* Some methods was renamed! +* New part of library called GraphicsManipulator. Main library cant work without GraphicsManipulator. +# + +# Texture 1.1.5 +Release date: 6.25.2020 (Noon) + +What was added: +* "Retardation" was renamed to "frameTime" because its better fits to represent what it is actualy doing. And also "retardation" sounds strange :) +* Some new functions in Animation as well as in Texture class. +* New functions in GraphicsManipulator and some bugs fixeds. +# + +# Texture 1.1.6 +Release date: 9.7.2020 (Night) + +What was added: +* Ability to set speed multiplier of Animation! +* Ability to edit each frame of animation using new interface FxImageEditor from GraphicsManipulator! +* New method "Contains" in GraphicsManipulator utility! +* Texture now implements Iterable interface and shares Iterator with "layers" array! +* Some small bugs fixed like Texture will not visually clear after layers.clear() was called! +# diff --git a/GraphicsManipulator 1.0.6.jar b/GraphicsManipulator 1.0.6.jar new file mode 100644 index 0000000..0103549 Binary files /dev/null and b/GraphicsManipulator 1.0.6.jar differ diff --git a/README.md b/README.md index 2eb460b..07042b5 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,7 @@ ## About -Texture is class that is able to animate images. +Texture library can animate 2D images! +Since 1.1.4 it requires GraphicsManipulator. +GraphicsManipulator is a utility library with tons of useful to work with JavaFx image as well as with java AWT BufferedImage. ## Info * If you want to add or see issues just click on [Issues section](https://github.com/PetoPetko/Texture-Animation/issues) in up. * If you want to comment use [Issues section](https://github.com/PetoPetko/Texture-Animation/issues) too or contact me on my mail. @@ -7,4 +9,4 @@ Texture is class that is able to animate images. * If you want to download library, dont use commits section, use [Releases section](https://github.com/PetoPetko/Texture-Animation/releases) or click that big green button "Clone or download" to download latest version. * And if you want to see changelog open [changelog file](Changelog.md) or use [Releases section](https://github.com/PetoPetko/Texture-Animation/releases) too. -Ps. Please visit this page sometimes again, because the new version may be release soon. +Ps. Please visit this page sometimes again, because the new version might be release soon. diff --git a/Texture 1.0.5 Runnable trail.jar b/Texture 1.0.5 Runnable trail.jar deleted file mode 100644 index 6b6f186..0000000 Binary files a/Texture 1.0.5 Runnable trail.jar and /dev/null differ diff --git a/Texture 1.0.5.jar b/Texture 1.0.5.jar deleted file mode 100644 index 173c77b..0000000 Binary files a/Texture 1.0.5.jar and /dev/null differ diff --git a/Texture 1.1.6.jar b/Texture 1.1.6.jar new file mode 100644 index 0000000..057b99c Binary files /dev/null and b/Texture 1.1.6.jar differ diff --git a/doc 1.1.4/GraphicsManipulator 1.0 (beta)/allclasses-frame.html b/doc 1.1.4/GraphicsManipulator 1.0 (beta)/allclasses-frame.html new file mode 100644 index 0000000..251263a --- /dev/null +++ b/doc 1.1.4/GraphicsManipulator 1.0 (beta)/allclasses-frame.html @@ -0,0 +1,21 @@ + + + +
+ +Each package has a page that contains a list of its classes and interfaces, with a summary for each. This page can contain six categories:
+Each class, interface, nested class and nested interface has its own separate page. Each of these pages has three sections consisting of a class/interface description, summary tables, and detailed member descriptions:
+Each summary entry contains the first sentence from the detailed description for that item. The summary entries are alphabetical, while the detailed descriptions are in the order they appear in the source code. This preserves the logical groupings established by the programmer.
+Each annotation type has its own separate page with the following sections:
+Each enum has its own separate page with the following sections:
+Each documented package, class and interface has its own Use page. This page describes what packages, classes, methods, constructors and fields use any part of the given class or package. Given a class or interface A, its Use page includes subclasses of A, fields declared as A, methods that return A, and methods and constructors with parameters of type A. You can access this page by first going to the package, class or interface, then clicking on the "Use" link in the navigation bar.
+There is a Class Hierarchy page for all packages, plus a hierarchy for each package. Each hierarchy page contains a list of classes and a list of interfaces. The classes are organized by inheritance structure starting with java.lang.Object
. The interfaces do not inherit from java.lang.Object
.
The Deprecated API page lists all of the API that have been deprecated. A deprecated API is not recommended for use, generally due to improvements, and a replacement API is usually given. Deprecated APIs may be removed in future implementations.
+The Index contains an alphabetic list of all classes, interfaces, constructors, methods, and fields.
+These links take you to the next or previous class, interface, package, or related page.
+These links show and hide the HTML frames. All pages are available with or without frames.
+The All Classes link shows all classes and interfaces except non-static nested types.
+Each serializable or externalizable class has a description of its serialization fields and methods. This information is of interest to re-implementors, not to developers using the API. While there is no link in the navigation bar, you can get to this information by going to any serialized class and clicking "Serialized Form" in the "See also" section of the class description.
+The Constant Field Values page lists the static final fields and their values.
+BufferedImageUtil
, it also calls functions from BufferedImageUtil
but this is converting images to BufferedImages and back.public class AwtFxUtils
+extends java.lang.Object
+Constructor and Description | +
---|
AwtFxUtils() |
+
Modifier and Type | +Method and Description | +
---|---|
static java.util.List<javafx.scene.image.Image> |
+AllAwtToFxImages(java.awt.Image... imgs)
+Convert between list of awt and fx images.
+ |
+
static java.util.List<java.awt.Image> |
+AllFxToAwtImages(javafx.scene.image.Image... imgs)
+Convert between list of awt and fx images.
+ |
+
static javafx.scene.image.Image[] |
+AllImagesFromFile(java.io.File file)
+This will load images from folder.
+ |
+
static javafx.scene.paint.Color |
+AwtToFxColor(java.awt.Color awtColor)
+Convert between awt and fx color.
+ |
+
static javafx.scene.image.Image |
+AwtToFxImage(java.awt.Image img)
+Convert between awt and fx image.
+ |
+
static java.awt.Color |
+FxToAwtColor(javafx.scene.paint.Color fxColor)
+Convert between awt and fx color.
+ |
+
static java.awt.Image |
+FxToAwtImage(javafx.scene.image.Image img)
+Convert between awt and fx image.
+ |
+
static int |
+GetAlphaFromRGB(int rgb) |
+
static int |
+GetBlueFromRGB(int rgb) |
+
static int |
+GetGreenFromRGB(int rgb) |
+
static int |
+GetRedFromRGB(int rgb) |
+
static javafx.scene.image.Image |
+ImageFromFile(java.io.File file)
+This will load image from file.
+ |
+
static boolean |
+IsColorsAproximatlyEquals(int color1RGBA,
+ int color2RGBA,
+ int acceptableDeviation)
+This method comparable identity of colors.
+ |
+
static int |
+RedGreenBlueToRGB(int r,
+ int g,
+ int b) |
+
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public static javafx.scene.image.Image[] AllImagesFromFile(java.io.File file)+
file
- | Folder to read images from.public static javafx.scene.image.Image ImageFromFile(java.io.File file)+
file
- | File to read image from.public static javafx.scene.paint.Color AwtToFxColor(java.awt.Color awtColor)+
awtColor
- | Awt color to convert.public static java.awt.Color FxToAwtColor(javafx.scene.paint.Color fxColor)+
fxColor
- | Fx color to convert.public static boolean IsColorsAproximatlyEquals(int color1RGBA, + int color2RGBA, + int acceptableDeviation)+
color1RGBA
- | RGBA of first color.color2RGBA
- | RGBA of second color.acceptableDeviation
- | This is max acceptable deviation in RGBA of colors.public static int RedGreenBlueToRGB(int r, + int g, + int b)+
public static int GetAlphaFromRGB(int rgb)+
rgb
- | RGB to get alpha factor from.public static int GetRedFromRGB(int rgb)+
rgb
- | RGB to get red factor from.public static int GetGreenFromRGB(int rgb)+
rgb
- | RGB to get green factor from.public static int GetBlueFromRGB(int rgb)+
rgb
- | RGB to get blue factor from.public static javafx.scene.image.Image AwtToFxImage(java.awt.Image img)+
img
- | Awt image to convert.SwingFXUtils
public static java.awt.Image FxToAwtImage(javafx.scene.image.Image img)+
img
- | Fx image to convert.SwingFXUtils
public static java.util.List<java.awt.Image> AllFxToAwtImages(javafx.scene.image.Image... imgs)+
imgs
- | Fx images to convert.SwingFXUtils
public static java.util.List<javafx.scene.image.Image> AllAwtToFxImages(java.awt.Image... imgs)+
imgs
- | Awt images to convert.SwingFXUtils
public class BufferedImageUtil
+extends java.lang.Object
+Constructor and Description | +
---|
BufferedImageUtil() |
+
Modifier and Type | +Method and Description | +
---|---|
static java.awt.image.BufferedImage |
+ArrayScale(java.awt.image.BufferedImage img,
+ int width,
+ int height) |
+
static java.awt.image.BufferedImage |
+ArrayScale(java.awt.image.BufferedImage img,
+ int width,
+ int height,
+ int densityX,
+ int densityY) |
+
static java.awt.image.BufferedImage |
+BiggestImageFrom(java.awt.image.BufferedImage... imgs) |
+
static java.awt.image.BufferedImage |
+ColorFilter(java.awt.image.BufferedImage img,
+ java.awt.Color[] originalColors,
+ java.awt.Color[] refillColors,
+ int acceptableDeviation)
+This will replace colors of pixels by new one!
+ |
+
static java.awt.image.BufferedImage |
+ColorFilter(java.awt.image.BufferedImage img,
+ java.util.Map<java.awt.Color,java.awt.Color> colorMappings,
+ int acceptableDeviation)
+This will replace colors of pixels by new one!
+ |
+
static boolean |
+CompareIdentity(java.awt.image.BufferedImage img1,
+ java.awt.image.BufferedImage img2,
+ int acceptableDeviation)
+This will compare identity of images.
+ |
+
static float |
+CompareIdentityInPercent(java.awt.image.BufferedImage img1,
+ java.awt.image.BufferedImage img2,
+ int acceptableDeviation)
+This will compare identity of images in percentage.
+ |
+
static java.awt.image.BufferedImage |
+DifferenceOf(java.awt.image.BufferedImage img1,
+ java.awt.image.BufferedImage img2) |
+
static java.awt.image.BufferedImage |
+FillBackground(java.awt.image.BufferedImage img,
+ java.awt.Color color)
+This will fill background of image with color.
+ |
+
static java.awt.image.BufferedImage |
+FillPixel(java.awt.image.BufferedImage img,
+ int x,
+ int y,
+ java.awt.Color color) |
+
static java.awt.image.BufferedImage |
+Filter(java.awt.image.BufferedImage img,
+ java.awt.Color color,
+ float density)
+This will paint a colored layer over image.
+ |
+
static java.awt.image.BufferedImage |
+Filter(java.awt.image.BufferedImage img,
+ java.awt.Color color,
+ int rule,
+ float density)
+This will paint a colored layer over image based on rule.
+ |
+
static java.awt.image.BufferedImage |
+FlipHorizontally(java.awt.image.BufferedImage img)
+This will horizontally flip an image.
+ |
+
static java.awt.image.BufferedImage |
+FlipVertically(java.awt.image.BufferedImage img)
+This will vertically flip an image.
+ |
+
static java.awt.image.BufferedImage |
+GetRectImgFrom(java.awt.image.BufferedImage image,
+ java.awt.Rectangle bounds) |
+
static java.awt.image.BufferedImage |
+Interpolate(java.awt.image.BufferedImage original,
+ java.awt.image.BufferedImage overlayer,
+ int interpolationPercentage) |
+
static java.awt.image.BufferedImage |
+Merge(java.awt.image.BufferedImage... imgsToMerge)
+This will merge images.
+ |
+
static java.awt.image.BufferedImage |
+Resize(java.awt.image.BufferedImage img,
+ double width,
+ double height)
+This will resize an image.
+ |
+
static java.awt.image.BufferedImage |
+Rotate(java.awt.image.BufferedImage img,
+ int angle)
+This will rotate image by angle (WORK IN PROGRESS)!
+ |
+
static java.awt.image.BufferedImage |
+SameOf(java.awt.image.BufferedImage img1,
+ java.awt.image.BufferedImage img2) |
+
static java.awt.image.BufferedImage |
+SetAlpha(java.awt.image.BufferedImage img,
+ float alpha)
+This will set alpha (opacity) of image.
+ |
+
static java.awt.image.BufferedImage |
+SmallestImageFrom(java.awt.image.BufferedImage... imgs) |
+
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public static boolean CompareIdentity(java.awt.image.BufferedImage img1, + java.awt.image.BufferedImage img2, + int acceptableDeviation)+
img1
- | Source image.img2
- | Image to compare.acceptableDeviation
- | This is max acceptable deviation in RGB of pixels on image.public static float CompareIdentityInPercent(java.awt.image.BufferedImage img1, + java.awt.image.BufferedImage img2, + int acceptableDeviation)+
img1
- | Source image.img2
- | Image to compare.acceptableDeviation
- | This is max acceptable deviation in RGB of pixels on image.public static java.awt.image.BufferedImage SameOf(java.awt.image.BufferedImage img1, + java.awt.image.BufferedImage img2)+
img1
- | Image 1.img2
- | Image 2.public static java.awt.image.BufferedImage DifferenceOf(java.awt.image.BufferedImage img1, + java.awt.image.BufferedImage img2)+
img1
- | Image 1.img2
- | Image 2.public static java.awt.image.BufferedImage GetRectImgFrom(java.awt.image.BufferedImage image, + java.awt.Rectangle bounds)+
image
- | Source image.bounds
- | Rectangle consisting position and bounds.public static java.awt.image.BufferedImage Resize(java.awt.image.BufferedImage img, + double width, + double height)+
img
- | Source image.width
- | New width.height
- | New height.public static java.awt.image.BufferedImage BiggestImageFrom(java.awt.image.BufferedImage... imgs)+
imgs
- | Array of images.public static java.awt.image.BufferedImage SmallestImageFrom(java.awt.image.BufferedImage... imgs)+
imgs
- | Array of images.public static java.awt.image.BufferedImage Merge(java.awt.image.BufferedImage... imgsToMerge)+
imgsToMerge
- | Images to merge.public static java.awt.image.BufferedImage SetAlpha(java.awt.image.BufferedImage img, + float alpha)+
img
- | Source image.alpha
- | Opacity.public static java.awt.image.BufferedImage FillPixel(java.awt.image.BufferedImage img, + int x, + int y, + java.awt.Color color)+
img
- | Source image.x
- | X position of pixel.y
- | Y position of pixel.color
- | New pixels color.public static java.awt.image.BufferedImage Filter(java.awt.image.BufferedImage img, + java.awt.Color color, + float density)+
img
- | Source image.color
- | Filters color.rule
- | The compositing rule. Example: AlphaComposite.SRC_OVER
density
- | Density of filter (0-1).public static java.awt.image.BufferedImage Filter(java.awt.image.BufferedImage img, + java.awt.Color color, + int rule, + float density)+
img
- | Source image.color
- | Filters color.rule
- | The compositing rule. Example: AlphaComposite.SRC_OVER
density
- | Density of filter (0-1).public static java.awt.image.BufferedImage ColorFilter(java.awt.image.BufferedImage img, + java.awt.Color[] originalColors, + java.awt.Color[] refillColors, + int acceptableDeviation)+
img
- | Source image.originalColors
- | Old colors.refillColors
- | Color replacements.acceptableDeviation
- | This is max acceptable deviation in RGB of colors.public static java.awt.image.BufferedImage ColorFilter(java.awt.image.BufferedImage img, + java.util.Map<java.awt.Color,java.awt.Color> colorMappings, + int acceptableDeviation)+
img
- | Source image.colorMappings
- | This is map that should contains keys as colors that you want to replace and values as new variants.acceptableDeviation
- | This is max acceptable deviation in RGB of colors.public static java.awt.image.BufferedImage FillBackground(java.awt.image.BufferedImage img, + java.awt.Color color)+
img
- | Image to fill background.color
- | Color to fill with.public static java.awt.image.BufferedImage FlipHorizontally(java.awt.image.BufferedImage img)+
img
- | Image to flip.public static java.awt.image.BufferedImage FlipVertically(java.awt.image.BufferedImage img)+
img
- | Image to flip.public static java.awt.image.BufferedImage Interpolate(java.awt.image.BufferedImage original, + java.awt.image.BufferedImage overlayer, + int interpolationPercentage)+
original
- | Main image.overlayer
- | Image that you want to interpolate/overlay the main one with.interpolationPercentage
- | Percentage/strength of interpolation (0-100).
+ 0 = only original will be visible, 100 = only overlayer will be visible, 1-99 = combination of both.
+
+ This is not a rule but both images should same dimensions.public static java.awt.image.BufferedImage Rotate(java.awt.image.BufferedImage img, + int angle)+
img
- | Image to rotate.angle
- | Angle to rotate by.public static java.awt.image.BufferedImage ArrayScale(java.awt.image.BufferedImage img, + int width, + int height)+
public static java.awt.image.BufferedImage ArrayScale(java.awt.image.BufferedImage img, + int width, + int height, + int densityX, + int densityY)+
public class FxImageUtil
+extends java.lang.Object
+BufferedImageUtil
, it also calls functions from BufferedImageUtil
but this is converting images to BufferedImages and back.Constructor and Description | +
---|
FxImageUtil() |
+
Modifier and Type | +Method and Description | +
---|---|
static javafx.scene.image.Image |
+ArrayScale(javafx.scene.image.Image img,
+ int width,
+ int height) |
+
static javafx.scene.image.Image |
+ArrayScale(javafx.scene.image.Image img,
+ int width,
+ int height,
+ int densityX,
+ int densityY) |
+
static javafx.scene.image.Image |
+BiggestImageFrom(javafx.scene.image.Image... imgs) |
+
static javafx.scene.image.Image |
+ColorFilter(javafx.scene.image.Image img,
+ javafx.scene.paint.Color[] originalColors,
+ javafx.scene.paint.Color[] refillColors,
+ int acceptableDeviation) |
+
static javafx.scene.image.Image |
+ColorFilter(javafx.scene.image.Image img,
+ java.util.Map<javafx.scene.paint.Color,javafx.scene.paint.Color> colorMappings,
+ int acceptableDeviation) |
+
static boolean |
+CompareIdentity(javafx.scene.image.Image img1,
+ javafx.scene.image.Image img2,
+ int acceptableDeviation) |
+
static float |
+CompareIdentityInPercent(javafx.scene.image.Image img1,
+ javafx.scene.image.Image img2,
+ int acceptableDeviation) |
+
static javafx.scene.image.Image |
+DifferenceOf(javafx.scene.image.Image img1,
+ javafx.scene.image.Image img2) |
+
static javafx.scene.image.Image |
+FillBackground(javafx.scene.image.Image img,
+ javafx.scene.paint.Color color) |
+
static javafx.scene.image.Image |
+FillPixel(javafx.scene.image.Image img,
+ int x,
+ int y,
+ javafx.scene.paint.Color color) |
+
static javafx.scene.image.Image |
+Filter(javafx.scene.image.Image img,
+ javafx.scene.paint.Color color,
+ float density) |
+
static javafx.scene.image.Image |
+Filter(javafx.scene.image.Image img,
+ javafx.scene.paint.Color color,
+ int rule,
+ float density) |
+
static javafx.scene.image.Image |
+FlipHorizontally(javafx.scene.image.Image img) |
+
static javafx.scene.image.Image |
+FlipVertically(javafx.scene.image.Image img) |
+
static javafx.scene.image.Image |
+GetRectImgFrom(javafx.scene.image.Image image,
+ java.awt.Rectangle bounds) |
+
static javafx.scene.image.Image |
+Interpolate(javafx.scene.image.Image original,
+ javafx.scene.image.Image overlayer,
+ int interpolationPercentage) |
+
static javafx.scene.image.Image |
+Merge(javafx.scene.image.Image... imgsToMerge) |
+
static javafx.scene.image.Image |
+Resize(javafx.scene.image.Image img,
+ double width,
+ double height) |
+
static javafx.scene.image.Image |
+Rotate(javafx.scene.image.Image img,
+ int angle) |
+
static javafx.scene.image.Image |
+SameOf(javafx.scene.image.Image img1,
+ javafx.scene.image.Image img2) |
+
static javafx.scene.image.Image |
+SetAlpha(javafx.scene.image.Image img,
+ float alpha) |
+
static javafx.scene.image.Image |
+SmallestImageFrom(javafx.scene.image.Image... imgs) |
+
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public static boolean CompareIdentity(javafx.scene.image.Image img1, + javafx.scene.image.Image img2, + int acceptableDeviation)+
public static float CompareIdentityInPercent(javafx.scene.image.Image img1, + javafx.scene.image.Image img2, + int acceptableDeviation)+
public static javafx.scene.image.Image SameOf(javafx.scene.image.Image img1, + javafx.scene.image.Image img2)+
public static javafx.scene.image.Image DifferenceOf(javafx.scene.image.Image img1, + javafx.scene.image.Image img2)+
public static javafx.scene.image.Image GetRectImgFrom(javafx.scene.image.Image image, + java.awt.Rectangle bounds)+
public static javafx.scene.image.Image Resize(javafx.scene.image.Image img, + double width, + double height)+
public static javafx.scene.image.Image SetAlpha(javafx.scene.image.Image img, + float alpha)+
public static javafx.scene.image.Image BiggestImageFrom(javafx.scene.image.Image... imgs)+
public static javafx.scene.image.Image SmallestImageFrom(javafx.scene.image.Image... imgs)+
public static javafx.scene.image.Image Merge(javafx.scene.image.Image... imgsToMerge)+
public static javafx.scene.image.Image FillPixel(javafx.scene.image.Image img, + int x, + int y, + javafx.scene.paint.Color color)+
public static javafx.scene.image.Image Filter(javafx.scene.image.Image img, + javafx.scene.paint.Color color, + float density)+
public static javafx.scene.image.Image Filter(javafx.scene.image.Image img, + javafx.scene.paint.Color color, + int rule, + float density)+
public static javafx.scene.image.Image ColorFilter(javafx.scene.image.Image img, + javafx.scene.paint.Color[] originalColors, + javafx.scene.paint.Color[] refillColors, + int acceptableDeviation)+
public static javafx.scene.image.Image ColorFilter(javafx.scene.image.Image img, + java.util.Map<javafx.scene.paint.Color,javafx.scene.paint.Color> colorMappings, + int acceptableDeviation)+
public static javafx.scene.image.Image FillBackground(javafx.scene.image.Image img, + javafx.scene.paint.Color color)+
public static javafx.scene.image.Image FlipHorizontally(javafx.scene.image.Image img)+
public static javafx.scene.image.Image FlipVertically(javafx.scene.image.Image img)+
public static javafx.scene.image.Image Interpolate(javafx.scene.image.Image original, + javafx.scene.image.Image overlayer, + int interpolationPercentage)+
public static javafx.scene.image.Image Rotate(javafx.scene.image.Image img, + int angle)+
public static javafx.scene.image.Image ArrayScale(javafx.scene.image.Image img, + int width, + int height)+
public static javafx.scene.image.Image ArrayScale(javafx.scene.image.Image img, + int width, + int height, + int densityX, + int densityY)+
Class | +Description | +
---|---|
AwtFxUtils | +
+ This class contains mainly converting methods.
+ |
+
BufferedImageUtil | +
+ This utility class contains powerful tools to work with BufferedImage!
+ |
+
FxImageUtil | +
+ This class contains exactly same functions as
+BufferedImageUtil , it also calls functions from BufferedImageUtil but this is converting images to BufferedImages and back. |
+
Each package has a page that contains a list of its classes and interfaces, with a summary for each. This page can contain six categories:
+Each class, interface, nested class and nested interface has its own separate page. Each of these pages has three sections consisting of a class/interface description, summary tables, and detailed member descriptions:
+Each summary entry contains the first sentence from the detailed description for that item. The summary entries are alphabetical, while the detailed descriptions are in the order they appear in the source code. This preserves the logical groupings established by the programmer.
+Each annotation type has its own separate page with the following sections:
+Each enum has its own separate page with the following sections:
+Each documented package, class and interface has its own Use page. This page describes what packages, classes, methods, constructors and fields use any part of the given class or package. Given a class or interface A, its Use page includes subclasses of A, fields declared as A, methods that return A, and methods and constructors with parameters of type A. You can access this page by first going to the package, class or interface, then clicking on the "Use" link in the navigation bar.
+There is a Class Hierarchy page for all packages, plus a hierarchy for each package. Each hierarchy page contains a list of classes and a list of interfaces. The classes are organized by inheritance structure starting with java.lang.Object
. The interfaces do not inherit from java.lang.Object
.
The Deprecated API page lists all of the API that have been deprecated. A deprecated API is not recommended for use, generally due to improvements, and a replacement API is usually given. Deprecated APIs may be removed in future implementations.
+The Index contains an alphabetic list of all classes, interfaces, constructors, methods, and fields.
+These links take you to the next or previous class, interface, package, or related page.
+These links show and hide the HTML frames. All pages are available with or without frames.
+The All Classes link shows all classes and interfaces except non-static nested types.
+Each serializable or externalizable class has a description of its serialization fields and methods. This information is of interest to re-implementors, not to developers using the API. While there is no link in the navigation bar, you can get to this information by going to any serialized class and clicking "Serialized Form" in the "See also" section of the class description.
+The Constant Field Values page lists the static final fields and their values.
+public class Animation
+extends java.lang.Object
+implements java.lang.Cloneable
++ Primary goal of Texture is ability to animate image, automatically finds out length and type of animation (horizontal or vertical). + The goal has been accomplished very well! Only problem is that all frames must have the same width and height. For example 32*160 image = 5 frames long animation. + If Texture can't finds out length or type of animation (for example 11*59 image) it is unable to animate it. In this case it creates one frame long animation which consist of image from constructor (see ImageToFrames method). + The same thing will happen if you insert for example 40*40 image, what mean one frame long animation. +
++ Btw. this is able to animate textures from a lot of different games. +
Type | +Property and Description | +
---|---|
javafx.beans.property.SimpleIntegerProperty |
+CurrentFrame |
+
Modifier and Type | +Field and Description | +
---|---|
protected boolean |
+autoRepeat |
+
protected javafx.beans.property.SimpleIntegerProperty |
+currentFrame |
+
protected javafx.scene.image.Image[] |
+frames |
+
protected int[] |
+framesOrder |
+
protected int |
+reachableLentgh |
+
protected int |
+retardation |
+
protected int |
+ticks |
+
Constructor and Description | +
---|
Animation(javafx.scene.image.Image[] frames,
+ int... framesOrder)
+Create new instance of Texture.
+ |
+
Animation(javafx.scene.image.Image[] frames,
+ int retardation,
+ boolean autoRepeat,
+ int... framesOrder)
+Create new instance of Texture.
+ |
+
Animation(javafx.scene.image.Image[] frames,
+ int reachableLentgh,
+ int retardation,
+ boolean autoRepeat,
+ int... framesOrder)
+Create new instance of Texture.
+ |
+
Animation(javafx.scene.image.Image img,
+ int... framesOrder)
+Create new instance of Texture.
+ |
+
Animation(javafx.scene.image.Image img,
+ int retardation,
+ boolean autoRepeat,
+ int... framesOrder)
+Create new instance of Texture.
+ |
+
Animation(javafx.scene.image.Image img,
+ int reachableLentgh,
+ int retardation,
+ boolean autoRepeat,
+ int... framesOrder)
+Create new instance of Texture.
+ |
+
Modifier and Type | +Method and Description | +
---|---|
int |
+AnimationLength() |
+
javafx.scene.image.Image[] |
+AvalableFrames() |
+
Animation |
+clone() |
+
boolean |
+ContainsFrame(javafx.scene.image.Image frame) |
+
Animation |
+CreateComprimatedVersion() |
+
int |
+CurrentFrame() |
+
javafx.beans.property.SimpleIntegerProperty |
+CurrentFrameProperty() |
+
int |
+CurrentTicks() |
+
boolean |
+equals(java.lang.Object obj) |
+
int[] |
+FramesOrder() |
+
static javafx.scene.image.Image |
+FramesToImage(javafx.scene.image.Image... frames) |
+
javafx.scene.image.Image |
+GetRawTexture() |
+
javafx.scene.image.Image |
+Grab() |
+
javafx.scene.image.Image |
+GrabAnimationFrame(int frameIndex) |
+
javafx.scene.image.Image |
+GrabFrame(int frameIndex) |
+
javafx.scene.image.Image |
+GrabRectFromRaw(java.awt.Rectangle bounds) |
+
static javafx.scene.image.Image[] |
+ImageToFrames(javafx.scene.image.Image inputImage) |
+
boolean |
+IsAutoRepeating() |
+
int |
+Length() |
+
void |
+NextFrame()
+Animation jumps on next frame if current frame is not last one.
+ |
+
void |
+PreviousFrame()
+Animation returns on previous frame if current frame is not first one.
+ |
+
int |
+ReachableLentgh() |
+
void |
+Repeat()
+The animation will cut on current frame and starts from the beginning.
+ |
+
int |
+Retardation() |
+
void |
+Reverse()
+This make animation runs conversely.
+ |
+
void |
+SetAutoRepeat(boolean newAutoRepeat) |
+
void |
+SetCurrentFrame(int frame) |
+
void |
+SetFramesOrder(int... framesOrder) |
+
void |
+SetReachableLentgh(int reachableLentgh)
+Set the reachableLentgh value, that is max reachable frame that animation can reach (0 is also number).
+ |
+
void |
+SetRetardation(int retardation)
+Set the retardation value, that is how fast will animation runs (greater number = slower)
+ |
+
java.lang.String |
+toString() |
+
boolean |
+Update()
+Update this animation.
+ |
+
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
public javafx.beans.property.SimpleIntegerProperty CurrentFrameProperty+
protected javafx.scene.image.Image[] frames+
protected boolean autoRepeat+
protected int[] framesOrder+
protected javafx.beans.property.SimpleIntegerProperty currentFrame+
protected int reachableLentgh+
protected int retardation+
protected int ticks+
public Animation(javafx.scene.image.Image img, + int... framesOrder)+
img
- | Texture source or in other words image you want to animate (All frames in image must have same dimensions).framesOrder
- | Order of frames or in other words array of ints that every int represents index of frame. Each frame can be also used more times, it means final animation can be longer or shorter than the original one!
+ For example, I have 11 frames long ani and I set this on new int[] {0, 0, 1, 2, 0} and I get the animation in order, first frame, second frame, third frame and first frame (0 = first frame because in arrays 0 means first pattern).public Animation(javafx.scene.image.Image img, + int retardation, + boolean autoRepeat, + int... framesOrder)+
img
- | Texture source or in other words image you want to animate (All frames in image must have same dimensions).
+ or set on false and animation will stuck on last frame after one cycle.retardation
- | This is how fast will animation runs (greater number = slower).autoRepeat
- | Set on true and animation will automatically repeat (starts from beginning) after reaching the last frame.framesOrder
- | Order of frames or in other words array of ints that every int represents index of frame. Each frame can be also used more times, it means final animation can be longer or shorter than the original one!
+ For example, I have 11 frames long ani and I set this on new int[] {0, 0, 1, 2, 0} and I get the animation in order, first frame, second frame, third frame and first frame (0 = first frame because in arrays 0 means first pattern).public Animation(javafx.scene.image.Image img, + int reachableLentgh, + int retardation, + boolean autoRepeat, + int... framesOrder)+
img
- | Texture source or in other words image you want to animate (All frames in image must have same dimensions).
+ or set on false and animation will stuck on last frame after one cycle.reachableLentgh
- | Max reachable frame that animation can reach (0 is also number). For example, I have 20 frames long ani and I set this on 9, after reaching 9th frame animation will repeats or stops.retardation
- | This is how fast will animation runs (greater number = slower).autoRepeat
- | Set on true and animation will automatically repeat (starts from beginning) after reaching the last frame.framesOrder
- | Order of frames or in other words array of ints that every int represents index of frame. Each frame can be also used more times, it means final animation can be longer or shorter than the original one!
+ For example, I have 11 frames long ani and I set this on new int[] {0, 0, 1, 2, 0} and I get the animation in order, first frame, second frame, third frame and first frame (0 = first frame because in arrays 0 means first pattern).public Animation(javafx.scene.image.Image[] frames, + int... framesOrder)+
frames
- | Array of animation's frames (In this case frames don't have to have same dimensions).framesOrder
- | Order of frames or in other words array of ints that every int represents index of frame. Each frame can be also used more times, it means final animation can be longer or shorter than the original one!
+ For example, I have 11 frames long ani and I set this on new int[] {0, 0, 1, 2, 0} and I get the animation in order, first frame, second frame, third frame and first frame (0 = first frame because in arrays 0 means first pattern).public Animation(javafx.scene.image.Image[] frames, + int retardation, + boolean autoRepeat, + int... framesOrder)+
frames
- | Array of animation's frames (In this case frames don't have to have same dimensions).
+ or set on false and animation will stuck on last frame after one cycle.retardation
- | This is how fast will animation runs (greater number = slower).autoRepeat
- | Set on true and animation will automatically repeat (starts from beginning) after reaching the last frame.framesOrder
- | Order of frames or in other words array of ints that every int represents index of frame. Each frame can be also used more times, it means final animation can be longer or shorter than the original one!
+ For example, I have 11 frames long ani and I set this on new int[] {0, 0, 1, 2, 0} and I get the animation in order, first frame, second frame, third frame and first frame (0 = first frame because in arrays 0 means first pattern).public Animation(javafx.scene.image.Image[] frames, + int reachableLentgh, + int retardation, + boolean autoRepeat, + int... framesOrder)+
frames
- | Array of animation's frames (In this case frames don't have to have same dimensions).
+ or set on false and animation will stuck on last frame after one cycle.reachableLentgh
- | Max reachable frame that animation can reach (0 is also number). For example, I have 20 frames long ani and I set this on 9, after reaching 9th frame animation will repeats or stops.retardation
- | This is how fast will animation runs (greater number = slower).autoRepeat
- | Set on true and animation will automatically repeat (starts from beginning) after reaching the last frame.framesOrder
- | Order of frames or in other words array of ints that every int represents index of frame. Each frame can be also used more times, it means final animation can be longer or shorter than the original one!
+ For example, I have 11 frames long ani and I set this on new int[] {0, 0, 1, 2, 0} and I get the animation in order, first frame, second frame, third frame and first frame (0 = first frame because in arrays 0 means first pattern).public Animation clone()+
clone
in class java.lang.Object
public boolean equals(java.lang.Object obj)+
equals
in class java.lang.Object
Animation
- object to compare.public java.lang.String toString()+
toString
in class java.lang.Object
public boolean Update()+
public Animation CreateComprimatedVersion()+
public javafx.scene.image.Image Grab()+
public javafx.scene.image.Image GrabAnimationFrame(int frameIndex)+
frame
- | Index of required frame (0 is also number).public javafx.scene.image.Image GrabFrame(int frameIndex)+
frame
- | Index of required frame (0 is also number).public javafx.scene.image.Image[] AvalableFrames()+
public javafx.scene.image.Image GetRawTexture()+
public void Reverse()+
public void NextFrame()+
public void PreviousFrame()+
public void SetCurrentFrame(int frame)+
frame
- | Sets animation on required frame (0 is also number).public void Repeat()+
public void SetFramesOrder(int... framesOrder)+
framesOrder
- | Order of frames or in other words array of ints that every int represents index of frame (minimal possible index = 0 and maximal possible index = Length()-1).
+ Each frame can be also used more times, it means final animation can be longer or shorter than the original one!
+ For example, I have 11 frames long ani and I set this on new int[] {0, 0, 1, 2, 0} and I get the animation in order, first frame, second frame, third frame and first frame (0 = first frame because in arrays 0 means first pattern).public int[] FramesOrder()+
public void SetReachableLentgh(int reachableLentgh)+
reachableLentgh
- | Value to set.public boolean ContainsFrame(javafx.scene.image.Image frame)+
frame
- | The frame.public void SetRetardation(int retardation)+
retardation
- | Value to set.public int ReachableLentgh()+
public int Retardation()+
public int CurrentTicks()+
public javafx.beans.property.SimpleIntegerProperty CurrentFrameProperty()+
public boolean IsAutoRepeating()+
public void SetAutoRepeat(boolean newAutoRepeat)+
newAutoRepeat
- | New auto repeat value.
+ Set on true and animation will automatically repeat (starts from beginning) after reaching the last frame.public int CurrentFrame()+
public int Length()+
public int AnimationLength()+
public javafx.scene.image.Image GrabRectFromRaw(java.awt.Rectangle bounds)+
bounds
- | Rectangle with X, Y, Width and Height parameters.public static javafx.scene.image.Image[] ImageToFrames(javafx.scene.image.Image inputImage)+
inputImage
- | Image to turn in to frames.public static javafx.scene.image.Image FramesToImage(javafx.scene.image.Image... frames)+
frames
- | Frames to turn in to image.public class Texture
+extends javafx.scene.image.ImageView
+implements java.lang.Cloneable
++ This class is using to easily visualize one our multiple Animation objects. +
fitHeightProperty, fitWidthProperty, imageProperty, preserveRatioProperty, smoothProperty, viewportProperty, xProperty, yProperty
accessibleHelpProperty, accessibleRoleDescriptionProperty, accessibleRoleProperty, accessibleTextProperty, blendModeProperty, boundsInLocalProperty, boundsInParentProperty, cacheHintProperty, cacheProperty, clipProperty, cursorProperty, depthTestProperty, disabledProperty, disableProperty, effectiveNodeOrientationProperty, effectProperty, eventDispatcherProperty, focusedProperty, focusTraversableProperty, hoverProperty, idProperty, impl_showMnemonicsProperty, impl_treeVisibleProperty, inputMethodRequestsProperty, layoutBoundsProperty, layoutXProperty, layoutYProperty, localToParentTransformProperty, localToSceneTransformProperty, managedProperty, mouseTransparentProperty, nodeOrientationProperty, onContextMenuRequestedProperty, onDragDetectedProperty, onDragDoneProperty, onDragDroppedProperty, onDragEnteredProperty, onDragExitedProperty, onDragOverProperty, onInputMethodTextChangedProperty, onKeyPressedProperty, onKeyReleasedProperty, onKeyTypedProperty, onMouseClickedProperty, onMouseDragEnteredProperty, onMouseDragExitedProperty, onMouseDraggedProperty, onMouseDragOverProperty, onMouseDragReleasedProperty, onMouseEnteredProperty, onMouseExitedProperty, onMouseMovedProperty, onMousePressedProperty, onMouseReleasedProperty, onRotateProperty, onRotationFinishedProperty, onRotationStartedProperty, onScrollFinishedProperty, onScrollProperty, onScrollStartedProperty, onSwipeDownProperty, onSwipeLeftProperty, onSwipeRightProperty, onSwipeUpProperty, onTouchMovedProperty, onTouchPressedProperty, onTouchReleasedProperty, onTouchStationaryProperty, onZoomFinishedProperty, onZoomProperty, onZoomStartedProperty, opacityProperty, parentProperty, pickOnBoundsProperty, pressedProperty, rotateProperty, rotationAxisProperty, scaleXProperty, scaleYProperty, scaleZProperty, sceneProperty, styleProperty, translateXProperty, translateYProperty, translateZProperty, visibleProperty
Modifier and Type | +Field and Description | +
---|---|
protected javafx.geometry.Point2D |
+biggestOrigSize |
+
protected boolean |
+dynamicScaling |
+
com.sun.javafx.collections.ObservableListWrapper<Animation> |
+layers |
+
protected java.util.List<javafx.geometry.Point2D> |
+origSizes |
+
SMOOTH_DEFAULT
BASELINE_OFFSET_SAME_AS_HEIGHT
Constructor and Description | +
---|
Texture(java.util.List<Animation> layers)
+Create new instance.
+ |
+
Texture(java.util.List<Animation> layers,
+ int upscalingF)
+Create new instance.
+ |
+
Texture(java.util.List<Animation> layers,
+ int upscalingF,
+ boolean dynamicScaling)
+Create new instance.
+ |
+
Texture(java.lang.Object... layers)
+Create new instance.
+ |
+
Modifier and Type | +Method and Description | +
---|---|
java.util.List<java.lang.Object> |
+AddAllFrom(java.lang.Object... layers) |
+
java.lang.Object |
+AddFrom(java.lang.Object layer)
+Add Animation from object.
+ |
+
Texture |
+clone() |
+
void |
+DoScale()
+This function is scaling individual layers via upscalingFactor.
+ |
+
boolean |
+equals(java.lang.Object o) |
+
void |
+fitSize(double w,
+ double h) |
+
javafx.geometry.Point2D |
+getBiggestOriginalSizes() |
+
Animation |
+GetLongestAnimation() |
+
java.util.List<javafx.geometry.Point2D> |
+getOriginalSizes() |
+
int |
+getUpscalingFactor()
+Upscaling is highly increasing textures resolution when you increase its fitWidth or fitHeight property.
+ |
+
boolean |
+isDynamicScaling() |
+
protected void |
+RemoveUnnecessary()
+This will remove all unnecessary layers most likely two visually same.
+ |
+
protected void |
+Repaint()
+This will insert merged image from all Animations to ImageView.
+ |
+
void |
+RepeatAll()
+This will repeat all animations.
+ |
+
void |
+ReverseAll()
+This will reverse all animations.
+ |
+
void |
+setDynamicScaling(boolean dynamicScaling) |
+
void |
+SetRetardationForAll(int retardation)
+This will set retardation for all animations.
+ |
+
void |
+setUpscalingFactor(int upscalingF)
+Upscaling is highly increasing textures resolution when you increase its fitWidth or fitHeight property.
+ |
+
java.lang.String |
+toString() |
+
boolean |
+Update()
+This will update and all Animations.
+ |
+
fitHeightProperty, fitWidthProperty, getClassCssMetaData, getCssMetaData, getFitHeight, getFitWidth, getImage, getViewport, getX, getY, imageProperty, impl_computeContains, impl_computeGeomBounds, impl_createPeer, impl_processMXNode, impl_updatePeer, isPreserveRatio, isSmooth, preserveRatioProperty, setFitHeight, setFitWidth, setImage, setPreserveRatio, setSmooth, setViewport, setX, setY, smoothProperty, viewportProperty, xProperty, yProperty
accessibleHelpProperty, accessibleRoleDescriptionProperty, accessibleRoleProperty, accessibleTextProperty, addEventFilter, addEventHandler, applyCss, autosize, blendModeProperty, boundsInLocalProperty, boundsInParentProperty, buildEventDispatchChain, cacheHintProperty, cacheProperty, clipProperty, computeAreaInScreen, contains, contains, containsBounds, cursorProperty, depthTestProperty, disabledProperty, disableProperty, effectiveNodeOrientationProperty, effectProperty, eventDispatcherProperty, executeAccessibleAction, fireEvent, focusedProperty, focusTraversableProperty, getAccessibleHelp, getAccessibleRole, getAccessibleRoleDescription, getAccessibleText, getBaselineOffset, getBlendMode, getBoundsInLocal, getBoundsInParent, getCacheHint, getClip, getContentBias, getCursor, getDepthTest, getEffect, getEffectiveNodeOrientation, getEventDispatcher, getId, getInputMethodRequests, getLayoutBounds, getLayoutX, getLayoutY, getLocalToParentTransform, getLocalToSceneTransform, getNodeOrientation, getOnContextMenuRequested, getOnDragDetected, getOnDragDone, getOnDragDropped, getOnDragEntered, getOnDragExited, getOnDragOver, getOnInputMethodTextChanged, getOnKeyPressed, getOnKeyReleased, getOnKeyTyped, getOnMouseClicked, getOnMouseDragEntered, getOnMouseDragExited, getOnMouseDragged, getOnMouseDragOver, getOnMouseDragReleased, getOnMouseEntered, getOnMouseExited, getOnMouseMoved, getOnMousePressed, getOnMouseReleased, getOnRotate, getOnRotationFinished, getOnRotationStarted, getOnScroll, getOnScrollFinished, getOnScrollStarted, getOnSwipeDown, getOnSwipeLeft, getOnSwipeRight, getOnSwipeUp, getOnTouchMoved, getOnTouchPressed, getOnTouchReleased, getOnTouchStationary, getOnZoom, getOnZoomFinished, getOnZoomStarted, getOpacity, getParent, getProperties, getPseudoClassStates, getRotate, getRotationAxis, getScaleX, getScaleY, getScaleZ, getScene, getStyle, getStyleableParent, getStyleClass, getTransforms, getTranslateX, getTranslateY, getTranslateZ, getTypeSelector, getUserData, hasProperties, hoverProperty, idProperty, impl_clearDirty, impl_computeIntersects, impl_computeLayoutBounds, impl_cssGetCursorInitialValue, impl_cssGetFocusTraversableInitialValue, impl_findStyles, impl_geomChanged, impl_getLeafTransform, impl_getMatchingStyles, impl_getPeer, impl_getPivotX, impl_getPivotY, impl_getPivotZ, impl_getStyleMap, impl_hasTransforms, impl_intersects, impl_intersectsBounds, impl_isDirty, impl_isDirtyEmpty, impl_isShowMnemonics, impl_isTreeVisible, impl_layoutBoundsChanged, impl_markDirty, impl_notifyLayoutBoundsChanged, impl_pickNode, impl_pickNodeLocal, impl_processCSS, impl_processCSS, impl_reapplyCSS, impl_setShowMnemonics, impl_setStyleMap, impl_showMnemonicsProperty, impl_syncPeer, impl_transformsChanged, impl_traverse, impl_treeVisibleProperty, inputMethodRequestsProperty, intersects, intersects, isCache, isDisable, isDisabled, isFocused, isFocusTraversable, isHover, isManaged, isMouseTransparent, isPickOnBounds, isPressed, isResizable, isVisible, layoutBoundsProperty, layoutXProperty, layoutYProperty, localToParent, localToParent, localToParent, localToParent, localToParent, localToParentTransformProperty, localToScene, localToScene, localToScene, localToScene, localToScene, localToScene, localToScene, localToScene, localToScene, localToScene, localToSceneTransformProperty, localToScreen, localToScreen, localToScreen, localToScreen, localToScreen, lookup, lookupAll, managedProperty, maxHeight, maxWidth, minHeight, minWidth, mouseTransparentProperty, nodeOrientationProperty, notifyAccessibleAttributeChanged, onContextMenuRequestedProperty, onDragDetectedProperty, onDragDoneProperty, onDragDroppedProperty, onDragEnteredProperty, onDragExitedProperty, onDragOverProperty, onInputMethodTextChangedProperty, onKeyPressedProperty, onKeyReleasedProperty, onKeyTypedProperty, onMouseClickedProperty, onMouseDragEnteredProperty, onMouseDragExitedProperty, onMouseDraggedProperty, onMouseDragOverProperty, onMouseDragReleasedProperty, onMouseEnteredProperty, onMouseExitedProperty, onMouseMovedProperty, onMousePressedProperty, onMouseReleasedProperty, onRotateProperty, onRotationFinishedProperty, onRotationStartedProperty, onScrollFinishedProperty, onScrollProperty, onScrollStartedProperty, onSwipeDownProperty, onSwipeLeftProperty, onSwipeRightProperty, onSwipeUpProperty, onTouchMovedProperty, onTouchPressedProperty, onTouchReleasedProperty, onTouchStationaryProperty, onZoomFinishedProperty, onZoomProperty, onZoomStartedProperty, opacityProperty, parentProperty, parentToLocal, parentToLocal, parentToLocal, parentToLocal, parentToLocal, pickOnBoundsProperty, prefHeight, prefWidth, pressedProperty, pseudoClassStateChanged, queryAccessibleAttribute, relocate, removeEventFilter, removeEventHandler, requestFocus, resize, resizeRelocate, rotateProperty, rotationAxisProperty, scaleXProperty, scaleYProperty, scaleZProperty, sceneProperty, sceneToLocal, sceneToLocal, sceneToLocal, sceneToLocal, sceneToLocal, sceneToLocal, sceneToLocal, sceneToLocal, screenToLocal, screenToLocal, screenToLocal, setAccessibleHelp, setAccessibleRole, setAccessibleRoleDescription, setAccessibleText, setBlendMode, setCache, setCacheHint, setClip, setCursor, setDepthTest, setDisable, setDisabled, setEffect, setEventDispatcher, setEventHandler, setFocused, setFocusTraversable, setHover, setId, setInputMethodRequests, setLayoutX, setLayoutY, setManaged, setMouseTransparent, setNodeOrientation, setOnContextMenuRequested, setOnDragDetected, setOnDragDone, setOnDragDropped, setOnDragEntered, setOnDragExited, setOnDragOver, setOnInputMethodTextChanged, setOnKeyPressed, setOnKeyReleased, setOnKeyTyped, setOnMouseClicked, setOnMouseDragEntered, setOnMouseDragExited, setOnMouseDragged, setOnMouseDragOver, setOnMouseDragReleased, setOnMouseEntered, setOnMouseExited, setOnMouseMoved, setOnMousePressed, setOnMouseReleased, setOnRotate, setOnRotationFinished, setOnRotationStarted, setOnScroll, setOnScrollFinished, setOnScrollStarted, setOnSwipeDown, setOnSwipeLeft, setOnSwipeRight, setOnSwipeUp, setOnTouchMoved, setOnTouchPressed, setOnTouchReleased, setOnTouchStationary, setOnZoom, setOnZoomFinished, setOnZoomStarted, setOpacity, setPickOnBounds, setPressed, setRotate, setRotationAxis, setScaleX, setScaleY, setScaleZ, setStyle, setTranslateX, setTranslateY, setTranslateZ, setUserData, setVisible, snapshot, snapshot, startDragAndDrop, startFullDrag, styleProperty, toBack, toFront, translateXProperty, translateYProperty, translateZProperty, usesMirroring, visibleProperty
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
public final com.sun.javafx.collections.ObservableListWrapper<Animation> layers+
protected boolean dynamicScaling+
protected java.util.List<javafx.geometry.Point2D> origSizes+
protected javafx.geometry.Point2D biggestOrigSize+
public Texture(java.lang.Object... layers)+
layers
- | Array of objects to create Texture from. Supported objects are: Animation
, Image
, String
, InputStream
!public Texture(java.util.List<Animation> layers)+
layers
- | Layers
object to create Texture from.public Texture(java.util.List<Animation> layers, + int upscalingF)+
layers
- | Layers
object to create Texture from.upScalingF
- | New value of "Upscaling factor".
+ Upscaling is highly increasing textures resolution when you increase its fitWidth or fitHeight property.
+ "Upscaling factor" is the value by which is the fitWidth and fitHeight multiplied by.
+ Recommended: Do not set this on more than 2!public Texture(java.util.List<Animation> layers, + int upscalingF, + boolean dynamicScaling)+
layers
- | Layers
object to create Texture from.upScalingF
- | New value of "Upscaling factor".
+ Upscaling is highly increasing textures resolution when you increase its fitWidth or fitHeight property.
+ "Upscaling factor" is the value by which is the fitWidth and fitHeight multiplied by.
+ Recommended: Do not set this on more than 2!dynamicScaling
- | Set this on true and all layers will be resized always when fitWidth or fitHeight changed.
+ Set this on false if this Texture object will be resized frequently to save CPU time.
+ Note: All newly added layers will be resized even if this is false.public Texture clone()+
clone
in class java.lang.Object
public boolean equals(java.lang.Object o)+
equals
in class java.lang.Object
public java.lang.String toString()+
toString
in class javafx.scene.Node
protected void Repaint()+
protected void RemoveUnnecessary()+
public void DoScale()+
public void fitSize(double w, + double h)+
w
- | Fit width to set.h
- | Fit height to set.public void ReverseAll()+
public void RepeatAll()+
public void SetRetardationForAll(int retardation)+
retardation
- | Retardation to set.public Animation GetLongestAnimation()+
public boolean Update()+
public java.lang.Object AddFrom(java.lang.Object layer)+
layer
- | Array of objects to create Texture from. Supported objects are: Animation
, Image
, String
, InputStream
!
+ Image means image to create animation from.
+ String is path to image to create animation from.
+ InputStream is InputStream object to create image for animation from.public java.util.List<java.lang.Object> AddAllFrom(java.lang.Object... layers)+
public int getUpscalingFactor()+
public void setUpscalingFactor(int upscalingF)+
upScalingF
- | New value of "Upscaling factor".public boolean isDynamicScaling()+
public void setDynamicScaling(boolean dynamicScaling)+
dynamicScaling
- | Set this on true and all layers will be resized always when fitWidth or fitHeight changed.
+ Set this on false if this Texture object will be resized frequently to save CPU time.
+
+ Note: All newly added layers will be resized even if this is false.public java.util.List<javafx.geometry.Point2D> getOriginalSizes()+
public javafx.geometry.Point2D getBiggestOriginalSizes()+
Modifier and Type | +Field and Description | +
---|---|
com.sun.javafx.collections.ObservableListWrapper<Animation> |
+Texture.layers |
+
Modifier and Type | +Method and Description | +
---|---|
Animation |
+Animation.clone() |
+
Animation |
+Animation.CreateComprimatedVersion() |
+
Animation |
+Texture.GetLongestAnimation() |
+
Constructor and Description | +
---|
Texture(java.util.List<Animation> layers)
+Create new instance.
+ |
+
Texture(java.util.List<Animation> layers,
+ int upscalingF)
+Create new instance.
+ |
+
Texture(java.util.List<Animation> layers,
+ int upscalingF,
+ boolean dynamicScaling)
+Create new instance.
+ |
+
Modifier and Type | +Method and Description | +
---|---|
Texture |
+Texture.clone() |
+
Class | +Description | +
---|---|
Animation | +
+
+ Primary goal of Texture is ability to animate image, automatically finds out length and type of animation (horizontal or vertical).
+ |
+
Texture | +
+
+ This class is using to easily visualize one our multiple Animation objects.
+ |
+
Class and Description | +
---|
Animation
+
+ Primary goal of Texture is ability to animate image, automatically finds out length and type of animation (horizontal or vertical).
+ |
+
Texture
+
+ This class is using to easily visualize one our multiple Animation objects.
+ |
+
Each package has a page that contains a list of its classes and interfaces, with a summary for each. This page can contain six categories:
+Each class, interface, nested class and nested interface has its own separate page. Each of these pages has three sections consisting of a class/interface description, summary tables, and detailed member descriptions:
+Each summary entry contains the first sentence from the detailed description for that item. The summary entries are alphabetical, while the detailed descriptions are in the order they appear in the source code. This preserves the logical groupings established by the programmer.
+Each annotation type has its own separate page with the following sections:
+Each enum has its own separate page with the following sections:
+Each documented package, class and interface has its own Use page. This page describes what packages, classes, methods, constructors and fields use any part of the given class or package. Given a class or interface A, its Use page includes subclasses of A, fields declared as A, methods that return A, and methods and constructors with parameters of type A. You can access this page by first going to the package, class or interface, then clicking on the "Use" link in the navigation bar.
+There is a Class Hierarchy page for all packages, plus a hierarchy for each package. Each hierarchy page contains a list of classes and a list of interfaces. The classes are organized by inheritance structure starting with java.lang.Object
. The interfaces do not inherit from java.lang.Object
.
The Deprecated API page lists all of the API that have been deprecated. A deprecated API is not recommended for use, generally due to improvements, and a replacement API is usually given. Deprecated APIs may be removed in future implementations.
+The Index contains an alphabetic list of all classes, interfaces, constructors, methods, and fields.
+These links take you to the next or previous class, interface, package, or related page.
+These links show and hide the HTML frames. All pages are available with or without frames.
+The All Classes link shows all classes and interfaces except non-static nested types.
+Each serializable or externalizable class has a description of its serialization fields and methods. This information is of interest to re-implementors, not to developers using the API. While there is no link in the navigation bar, you can get to this information by going to any serialized class and clicking "Serialized Form" in the "See also" section of the class description.
+The Constant Field Values page lists the static final fields and their values.
+AwtFxUtils#EditFxAsAwtImage(Image, AwtImageEditor)
+ Write your editing code to edit method!
+ For example:BufferedImage
!
+ Many of methods in this class needs relatively long time to run and supposed to not be called in loop because they may cause performance problems.BufferedImageUtil
, it also calls functions from BufferedImageUtil
but this is converting images to BufferedImages and back.public static interface AwtFxUtils.BufferedImageEditor
+AwtFxUtils#EditFxAsAwtImage(Image, AwtImageEditor)
+ Write your editing code to edit method!
+ For example:
+ + Graphics2D g2d = buffImg.createGraphics(); + g2d.setColor(Color.RED); + g2d.fillRect(0, 0, 25, 25); + g2d.dispose(); +
Modifier and Type | +Method and Description | +
---|---|
void |
+edit(java.awt.image.BufferedImage buffImg) |
+
public class AwtFxUtils
+extends java.lang.Object
+Modifier and Type | +Class and Description | +
---|---|
static interface |
+AwtFxUtils.BufferedImageEditor
+This is used in
+AwtFxUtils#EditFxAsAwtImage(Image, AwtImageEditor)
+ Write your editing code to edit method!
+ For example: |
+
Constructor and Description | +
---|
AwtFxUtils() |
+
Modifier and Type | +Method and Description | +
---|---|
static java.util.List<javafx.scene.image.Image> |
+AllAwtToFxImages(java.awt.Image... imgs)
+Convert between list of awt and fx images.
+ |
+
static java.util.List<java.awt.Image> |
+AllFxToAwtImages(javafx.scene.image.Image... imgs)
+Convert between list of awt and fx images.
+ |
+
static javafx.scene.image.Image[] |
+AllImagesFromFile(java.io.File file)
+This will load images from folder.
+ |
+
static boolean |
+AreColorsAproximatlyEquals(int color1RGBA,
+ int color2RGBA,
+ int acceptableDeviation)
+This method comparable identity of colors.
+ |
+
static java.awt.Color |
+AwtRCG() |
+
static java.awt.Color |
+AwtRCG(java.util.Random rand) |
+
static java.awt.Color |
+AwtRCG(java.util.Random rand,
+ int maxR,
+ int maxG,
+ int maxB,
+ int maxA) |
+
static javafx.scene.paint.Color |
+AwtToFxColor(java.awt.Color awtColor)
+Convert between awt and fx color.
+ |
+
static javafx.scene.image.Image |
+AwtToFxImage(java.awt.Image img)
+Convert between awt and fx image.
+ |
+
static java.awt.Color |
+ColorizeAwt(java.awt.Color awtColor,
+ java.awt.Color colorizer) |
+
static javafx.scene.paint.Color |
+ColorizeFx(javafx.scene.paint.Color fxColor,
+ javafx.scene.paint.Color colorizer) |
+
static java.awt.Color |
+DeriveAwt(java.awt.Color awtColor,
+ double hueShift,
+ double saturationFactor,
+ double brightnessFactor,
+ double opacityFactor) |
+
static javafx.scene.image.Image |
+EditFxAsAwtImage(javafx.scene.image.Image img,
+ AwtFxUtils.BufferedImageEditor editor) |
+
static javafx.scene.paint.Color |
+FxRCG() |
+
static javafx.scene.paint.Color |
+FxRCG(java.util.Random rand) |
+
static javafx.scene.paint.Color |
+FxRCG(java.util.Random rand,
+ int maxR,
+ int maxG,
+ int maxB,
+ int maxA) |
+
static java.awt.Color |
+FxToAwtColor(javafx.scene.paint.Color fxColor)
+Convert between awt and fx color.
+ |
+
static java.awt.Image |
+FxToAwtImage(javafx.scene.image.Image img)
+Convert between awt and fx image.
+ |
+
static int |
+GetAlphaFromRGB(int rgb) |
+
static int |
+GetBlueFromRGB(int rgb) |
+
static int |
+GetGreenFromRGB(int rgb) |
+
static int |
+GetRedFromRGB(int rgb) |
+
static java.awt.Color |
+GrayscaleAwt(java.awt.Color awtColor) |
+
static javafx.scene.image.Image |
+ImageFromFile(java.io.File file)
+This will load image from file.
+ |
+
static java.awt.Color |
+InterpolateAwts(java.awt.Color awtColor,
+ java.awt.Color endColor,
+ double interpolationFactor) |
+
static java.awt.Color |
+InvertAwt(java.awt.Color awtColor) |
+
static boolean |
+IsAwtColorGrayscaled(java.awt.Color awtColor) |
+
static boolean |
+IsAwtColorOpaque(java.awt.Color awtColor) |
+
static boolean |
+IsFxColorGrayscaled(javafx.scene.paint.Color fxColor) |
+
static int |
+RedGreenBlueToRGB(int r,
+ int g,
+ int b) |
+
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public static javafx.scene.image.Image[] AllImagesFromFile(java.io.File file)+
file
- | Folder to read images from.public static javafx.scene.image.Image ImageFromFile(java.io.File file)+
file
- | File to read image from.public static javafx.scene.paint.Color AwtToFxColor(java.awt.Color awtColor)+
awtColor
- | Awt color to convert.public static java.awt.Color FxToAwtColor(javafx.scene.paint.Color fxColor)+
fxColor
- | Fx color to convert.public static java.awt.Color AwtRCG()+
public static java.awt.Color AwtRCG(java.util.Random rand)+
rand
- | Random object to use.public static java.awt.Color AwtRCG(java.util.Random rand, + int maxR, + int maxG, + int maxB, + int maxA)+
rand
- | Random object to use.maxR
- | Upper limit of red value that can be generated (max 255+1).maxG
- | Upper limit of green value that can be generated (max 255+1).maxB
- | Upper limit of blue value that can be generated (max 255+1).maxA
- | Upper limit of alpha/transparency value that can be generated (max 255+1) or -1 if you want opaque color.public static javafx.scene.paint.Color FxRCG()+
public static javafx.scene.paint.Color FxRCG(java.util.Random rand)+
rand
- | Random object to use.public static javafx.scene.paint.Color FxRCG(java.util.Random rand, + int maxR, + int maxG, + int maxB, + int maxA)+
rand
- | Random object to use.maxR
- | Upper limit of red value that can be generated (max 255+1).maxG
- | Upper limit of green value that can be generated (max 255+1).maxB
- | Upper limit of blue value that can be generated (max 255+1).maxA
- | Upper limit of alpha/transparency value that can be generated (max 255+1) or -1 if you want opaque color.public static java.awt.Color GrayscaleAwt(java.awt.Color awtColor)+
public static java.awt.Color InvertAwt(java.awt.Color awtColor)+
public static java.awt.Color DeriveAwt(java.awt.Color awtColor, + double hueShift, + double saturationFactor, + double brightnessFactor, + double opacityFactor)+
Color.deriveColor(double, double, double, double)
public static java.awt.Color InterpolateAwts(java.awt.Color awtColor, + java.awt.Color endColor, + double interpolationFactor)+
Color.interpolate(javafx.scene.paint.Color, double)
public static java.awt.Color ColorizeAwt(java.awt.Color awtColor, + java.awt.Color colorizer)+
InterpolateAwts(Color, Color, double)
but this is not strictly showing start or end color based on factor, this will, we can say, merge both of them.
+ The more awtColor is same as the colorizer then less this effect will be visible.public static javafx.scene.paint.Color ColorizeFx(javafx.scene.paint.Color fxColor, + javafx.scene.paint.Color colorizer)+
InterpolateAwts(Color, Color, double)
but this is not strictly showing start or end color based on factor, this will, we can say, merge both of them.
+ The more fxColor is same as the colorizer then less this effect will be visible.public static boolean IsAwtColorGrayscaled(java.awt.Color awtColor)+
public static boolean IsFxColorGrayscaled(javafx.scene.paint.Color fxColor)+
public static boolean IsAwtColorOpaque(java.awt.Color awtColor)+
public static javafx.scene.image.Image EditFxAsAwtImage(javafx.scene.image.Image img, + AwtFxUtils.BufferedImageEditor editor)+
img
- | Fx image to edit.editor
- | AwtFxUtils.BufferedImageEditor
to use.public static boolean AreColorsAproximatlyEquals(int color1RGBA, + int color2RGBA, + int acceptableDeviation)+
color1RGBA
- | RGBA of first color.color2RGBA
- | RGBA of second color.acceptableDeviation
- | This is max acceptable deviation in RGBA of colors.public static int RedGreenBlueToRGB(int r, + int g, + int b)+
public static int GetAlphaFromRGB(int rgb)+
rgb
- | RGB to get alpha factor from.public static int GetRedFromRGB(int rgb)+
rgb
- | RGB to get red factor from.public static int GetGreenFromRGB(int rgb)+
rgb
- | RGB to get green factor from.public static int GetBlueFromRGB(int rgb)+
rgb
- | RGB to get blue factor from.public static javafx.scene.image.Image AwtToFxImage(java.awt.Image img)+
img
- | Awt image to convert.SwingFXUtils
public static java.awt.Image FxToAwtImage(javafx.scene.image.Image img)+
img
- | Fx image to convert.SwingFXUtils
public static java.util.List<java.awt.Image> AllFxToAwtImages(javafx.scene.image.Image... imgs)+
imgs
- | Fx images to convert.SwingFXUtils
public static java.util.List<javafx.scene.image.Image> AllAwtToFxImages(java.awt.Image... imgs)+
imgs
- | Awt images to convert.SwingFXUtils
public class BufferedImageUtil
+extends java.lang.Object
+BufferedImage
!
+ Many of methods in this class needs relatively long time to run and supposed to not be called in loop because they may cause performance problems.
+
+ Note: Many methods will change BufferedImages type to globalImageType
!Modifier and Type | +Field and Description | +
---|---|
static int |
+globalImageType
+BufferedImage type for all result images.
+ |
+
Constructor and Description | +
---|
BufferedImageUtil() |
+
Modifier and Type | +Method and Description | +
---|---|
static java.awt.image.BufferedImage |
+ArrayScale(java.awt.image.BufferedImage img,
+ int width,
+ int height)
+This will draw multiple source images in row.
+ |
+
static java.awt.image.BufferedImage |
+ArrayScale(java.awt.image.BufferedImage img,
+ int width,
+ int height,
+ int densityX,
+ int densityY)
+This will draw multiple source images in row.
+ |
+
static java.awt.image.BufferedImage |
+BiggestImageFrom(java.awt.image.BufferedImage... imgs) |
+
static java.awt.image.BufferedImage |
+ColorFilter(java.awt.image.BufferedImage img,
+ java.awt.Color[] originalColors,
+ java.awt.Color[] refillColors,
+ int acceptableDeviation)
+This will replace colors of pixels by new one!
+ |
+
static java.awt.image.BufferedImage |
+ColorFilter(java.awt.image.BufferedImage img,
+ java.util.Map<java.awt.Color,java.awt.Color> colorMappings,
+ int acceptableDeviation)
+This will replace colors of pixels by new one!
+ |
+
static java.awt.image.BufferedImage |
+ColorizeGrayscaleWithColor(java.awt.image.BufferedImage img,
+ java.awt.Color colorizer) |
+
static java.awt.image.BufferedImage |
+ColorizeWithColor(java.awt.image.BufferedImage img,
+ java.awt.Color colorizer) |
+
static boolean |
+CompareIdentity(java.awt.image.BufferedImage img1,
+ java.awt.image.BufferedImage img2,
+ int acceptableDeviation)
+This will compare identity of images.
+ |
+
static float |
+CompareIdentityInPercent(java.awt.image.BufferedImage img1,
+ java.awt.image.BufferedImage img2,
+ int acceptableDeviation)
+This will compare identity of images in percentage.
+ |
+
static java.awt.image.BufferedImage |
+Derive(java.awt.image.BufferedImage img,
+ double hueShift,
+ double saturationFactor,
+ double brightnessFactor,
+ double opacityFactor) |
+
static java.awt.image.BufferedImage |
+DifferenceOf(java.awt.image.BufferedImage img1,
+ java.awt.image.BufferedImage img2) |
+
static java.awt.image.BufferedImage |
+FillBackground(java.awt.image.BufferedImage img,
+ java.awt.Color color)
+This will fill background of image with color.
+ |
+
static java.awt.image.BufferedImage |
+FillPixel(java.awt.image.BufferedImage img,
+ int x,
+ int y,
+ java.awt.Color color) |
+
static java.awt.image.BufferedImage |
+Filter(java.awt.image.BufferedImage img,
+ java.awt.Color color,
+ float density)
+This will paint a colored layer over image.
+ |
+
static java.awt.image.BufferedImage |
+Filter(java.awt.image.BufferedImage img,
+ java.awt.Color color,
+ int rule,
+ float density)
+This will paint a color in to image based on rule.
+ |
+
static java.awt.image.BufferedImage |
+FlipHorizontally(java.awt.image.BufferedImage img)
+This will horizontally flip an image.
+ |
+
static java.awt.image.BufferedImage |
+FlipVertically(java.awt.image.BufferedImage img)
+This will vertically flip an image.
+ |
+
static java.awt.image.BufferedImage |
+GetRectImgFrom(java.awt.image.BufferedImage image,
+ java.awt.Rectangle bounds) |
+
static java.awt.image.BufferedImage |
+Grayscale(java.awt.image.BufferedImage img) |
+
static java.awt.image.BufferedImage |
+Interpolate(java.awt.image.BufferedImage original,
+ java.awt.image.BufferedImage overlayer,
+ int interpolationFactor) |
+
static java.awt.image.BufferedImage |
+Invert(java.awt.image.BufferedImage img) |
+
static boolean |
+IsCompletelyOpaque(java.awt.image.BufferedImage img) |
+
static boolean |
+IsImageGrayscaled(java.awt.image.BufferedImage img) |
+
static java.awt.image.BufferedImage |
+Merge(java.awt.image.BufferedImage... imgsToMerge)
+This will merge images in other words draw images from imgsToMerge one over another in order of imgsToMerge array.
+ |
+
static java.awt.image.BufferedImage |
+Merge(java.awt.Composite comp,
+ java.awt.image.BufferedImage... imgsToMerge)
+This will merge images in other words draw images from imgsToMerge one over another in order of imgsToMerge array.
+ |
+
static java.awt.image.BufferedImage |
+Merge(int imageIndex,
+ java.awt.Composite comp,
+ java.awt.image.BufferedImage... imgsToMerge)
+This will merge images in other words draw images from imgsToMerge one over another in order of imgsToMerge array.
+ |
+
static java.awt.image.BufferedImage |
+Resize(java.awt.image.BufferedImage img,
+ double width,
+ double height)
+This will resize an image.
+ |
+
static java.awt.image.BufferedImage |
+Resize(java.awt.image.BufferedImage img,
+ int hints,
+ double width,
+ double height)
+This will resize an image.
+ |
+
static java.awt.image.BufferedImage |
+Rotate(java.awt.image.BufferedImage img,
+ double angle)
+This will rotate image by angle (WORK IN PROGRESS)!
+ |
+
static java.awt.image.BufferedImage |
+SameOf(java.awt.image.BufferedImage img1,
+ java.awt.image.BufferedImage img2) |
+
static java.awt.image.BufferedImage |
+SetAlpha(java.awt.image.BufferedImage img,
+ float alpha)
+This will set alpha (opacity) of image.
+ |
+
static java.awt.image.BufferedImage |
+SmallestImageFrom(java.awt.image.BufferedImage... imgs) |
+
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public static int globalImageType+
BufferedImage.TYPE_4BYTE_ABGR
!public static boolean CompareIdentity(java.awt.image.BufferedImage img1, + java.awt.image.BufferedImage img2, + int acceptableDeviation)+
img1
- | Source image.img2
- | Image to compare.acceptableDeviation
- | This is max acceptable deviation in RGB of pixels on image.public static float CompareIdentityInPercent(java.awt.image.BufferedImage img1, + java.awt.image.BufferedImage img2, + int acceptableDeviation)+
img1
- | Source image.img2
- | Image to compare.acceptableDeviation
- | This is max acceptable deviation in RGB of pixels on image.public static java.awt.image.BufferedImage SameOf(java.awt.image.BufferedImage img1, + java.awt.image.BufferedImage img2)+
img1
- | Image 1.img2
- | Image 2.public static java.awt.image.BufferedImage DifferenceOf(java.awt.image.BufferedImage img1, + java.awt.image.BufferedImage img2)+
img1
- | Image 1.img2
- | Image 2.public static java.awt.image.BufferedImage GetRectImgFrom(java.awt.image.BufferedImage image, + java.awt.Rectangle bounds)+
image
- | Source image.bounds
- | Rectangle consisting position and bounds.public static java.awt.image.BufferedImage Resize(java.awt.image.BufferedImage img, + double width, + double height)+
img
- | Source image.width
- | New width.height
- | New height.BufferedImageUtil#Resize(BufferedImage, java.awt.Image.SCALE_FAST, double, double)
public static java.awt.image.BufferedImage Resize(java.awt.image.BufferedImage img, + int hints, + double width, + double height)+
img
- | Source image.hints
- | Flags to indicate the type of algorithm to use for image resize.width
- | New width.height
- | New height.public static java.awt.image.BufferedImage BiggestImageFrom(java.awt.image.BufferedImage... imgs)+
imgs
- | Array of images.public static java.awt.image.BufferedImage SmallestImageFrom(java.awt.image.BufferedImage... imgs)+
imgs
- | Array of images.public static java.awt.image.BufferedImage Merge(java.awt.image.BufferedImage... imgsToMerge)+
imgsToMerge
- | Images to merge.public static java.awt.image.BufferedImage Merge(java.awt.Composite comp, + java.awt.image.BufferedImage... imgsToMerge)+
comp
- | The Composite
to apply before certain image is drawn. This composite will be most likely instance of AlphaComposite
.imgsToMerge
- | Images to merge.public static java.awt.image.BufferedImage Merge(int imageIndex, + java.awt.Composite comp, + java.awt.image.BufferedImage... imgsToMerge)+
imageIndex
- | This is index of image from imgsToMerge array to apply composite before drawing that image and images that are next after it (if there is 0 some composites will not work). Also this index must match bounds of imgsToMerge array.comp
- | The Composite
to apply before certain image is drawn. This composite will be most likely instance of AlphaComposite
.imgsToMerge
- | Images to merge.public static java.awt.image.BufferedImage SetAlpha(java.awt.image.BufferedImage img, + float alpha)+
img
- | Source image.alpha
- | Opacity.public static java.awt.image.BufferedImage FillPixel(java.awt.image.BufferedImage img, + int x, + int y, + java.awt.Color color)+
img
- | Source image.x
- | X position of pixel.y
- | Y position of pixel.color
- | New pixels color.public static java.awt.image.BufferedImage Filter(java.awt.image.BufferedImage img, + java.awt.Color color, + float density)+
img
- | Source image.color
- | Filters color.rule
- | The compositing rule. Example: AlphaComposite.SRC_OVER
density
- | Density of filter (0-1).public static java.awt.image.BufferedImage Filter(java.awt.image.BufferedImage img, + java.awt.Color color, + int rule, + float density)+
img
- | Source image.color
- | Filters color.rule
- | The compositing rule. Example: AlphaComposite.SRC_IN
density
- | Density of filter (0-1).public static java.awt.image.BufferedImage ColorFilter(java.awt.image.BufferedImage img, + java.awt.Color[] originalColors, + java.awt.Color[] refillColors, + int acceptableDeviation)+
img
- | Source image.originalColors
- | Old colors.refillColors
- | Color replacements.acceptableDeviation
- | This is max acceptable deviation in RGB of colors.public static java.awt.image.BufferedImage ColorFilter(java.awt.image.BufferedImage img, + java.util.Map<java.awt.Color,java.awt.Color> colorMappings, + int acceptableDeviation)+
img
- | Source image.colorMappings
- | This is map that should contains keys as colors that you want to replace and values as new variants.acceptableDeviation
- | This is max acceptable deviation in RGB of colors.public static java.awt.image.BufferedImage FillBackground(java.awt.image.BufferedImage img, + java.awt.Color color)+
img
- | Image to fill background.color
- | Color to fill with.public static java.awt.image.BufferedImage FlipHorizontally(java.awt.image.BufferedImage img)+
img
- | Image to flip.public static java.awt.image.BufferedImage FlipVertically(java.awt.image.BufferedImage img)+
img
- | Image to flip.public static java.awt.image.BufferedImage Interpolate(java.awt.image.BufferedImage original, + java.awt.image.BufferedImage overlayer, + int interpolationFactor)+
original
- | Main image.overlayer
- | Image that you want to interpolate/overlay the main one with.interpolationPercentage
- | Percentage/strength of interpolation (0-100).
+ 0 = only original will be visible, 1 = only overlayer will be visible, 0.1-0.9 = combination of both.
+
+ This is not a rule but both images should same dimensions.public static java.awt.image.BufferedImage Rotate(java.awt.image.BufferedImage img, + double angle)+
img
- | Image to rotate.angle
- | Angle to rotate by.public static java.awt.image.BufferedImage ArrayScale(java.awt.image.BufferedImage img, + int width, + int height)+
img
- | Source image.width
- | Width of final image.height
- | Height of final image.public static java.awt.image.BufferedImage ArrayScale(java.awt.image.BufferedImage img, + int width, + int height, + int densityX, + int densityY)+
img
- | Source image.width
- | Width of final image.height
- | Height of final image.densityX
- | How many source images will be drew on x axis (minimal value is 1).densityY
- | How many source images will be drew on h axis (minimal value is 1).public static java.awt.image.BufferedImage Grayscale(java.awt.image.BufferedImage img)+
img
- | Source image.AwtFxUtils.GrayscaleAwt(Color)
public static java.awt.image.BufferedImage Invert(java.awt.image.BufferedImage img)+
img
- | Source image.AwtFxUtils.InvertAwt(Color)
public static java.awt.image.BufferedImage Derive(java.awt.image.BufferedImage img, + double hueShift, + double saturationFactor, + double brightnessFactor, + double opacityFactor)+
img
- | Source image.AwtFxUtils.DeriveAwt(Color, double, double, double, double)
public static java.awt.image.BufferedImage ColorizeWithColor(java.awt.image.BufferedImage img, + java.awt.Color colorizer)+
img
- | Source image.AwtFxUtils.ColorizeAwt(Color, Color)
public static java.awt.image.BufferedImage ColorizeGrayscaleWithColor(java.awt.image.BufferedImage img, + java.awt.Color colorizer)+
img
- | Source image.AwtFxUtils.ColorizeAwt(Color, Color)
public static boolean IsImageGrayscaled(java.awt.image.BufferedImage img)+
AwtFxUtils.IsAwtColorGrayscaled(Color)
public static boolean IsCompletelyOpaque(java.awt.image.BufferedImage img)+
AwtFxUtils.IsAwtColorOpaque(Color)
public class FxImageUtil
+extends java.lang.Object
+BufferedImageUtil
, it also calls functions from BufferedImageUtil
but this is converting images to BufferedImages and back.
+ Many of methods in this class needs relatively long time to run and supposed to not be called in loop because they may cause performance problems.Constructor and Description | +
---|
FxImageUtil() |
+
Modifier and Type | +Method and Description | +
---|---|
static javafx.scene.image.Image |
+ArrayScale(javafx.scene.image.Image img,
+ int width,
+ int height)
+
+ |
+
static javafx.scene.image.Image |
+ArrayScale(javafx.scene.image.Image img,
+ int width,
+ int height,
+ int densityX,
+ int densityY)
+
+ |
+
static javafx.scene.image.Image |
+BiggestImageFrom(javafx.scene.image.Image... imgs)
+
+ |
+
static javafx.scene.image.Image |
+ColorFilter(javafx.scene.image.Image img,
+ javafx.scene.paint.Color[] originalColors,
+ javafx.scene.paint.Color[] refillColors,
+ int acceptableDeviation)
+
+ |
+
static javafx.scene.image.Image |
+ColorFilter(javafx.scene.image.Image img,
+ java.util.Map<javafx.scene.paint.Color,javafx.scene.paint.Color> colorMappings,
+ int acceptableDeviation)
+
+ |
+
static javafx.scene.image.Image |
+ColorizeGrayscaleWithColor(javafx.scene.image.Image img,
+ javafx.scene.paint.Color colorizer)
+
+ |
+
static javafx.scene.image.Image |
+ColorizeWithColor(javafx.scene.image.Image img,
+ javafx.scene.paint.Color colorizer)
+
+ |
+
static boolean |
+CompareIdentity(javafx.scene.image.Image img1,
+ javafx.scene.image.Image img2,
+ int acceptableDeviation) |
+
static float |
+CompareIdentityInPercent(javafx.scene.image.Image img1,
+ javafx.scene.image.Image img2,
+ int acceptableDeviation) |
+
static javafx.scene.image.Image |
+Derive(javafx.scene.image.Image img,
+ double hueShift,
+ double saturationFactor,
+ double brightnessFactor,
+ double opacityFactor) |
+
static javafx.scene.image.Image |
+DifferenceOf(javafx.scene.image.Image img1,
+ javafx.scene.image.Image img2) |
+
static javafx.scene.image.Image |
+FillBackground(javafx.scene.image.Image img,
+ javafx.scene.paint.Color color)
+
+ |
+
static javafx.scene.image.Image |
+FillPixel(javafx.scene.image.Image img,
+ int x,
+ int y,
+ javafx.scene.paint.Color color)
+
+ |
+
static javafx.scene.image.Image |
+Filter(javafx.scene.image.Image img,
+ javafx.scene.paint.Color color,
+ float density)
+
+ |
+
static javafx.scene.image.Image |
+Filter(javafx.scene.image.Image img,
+ javafx.scene.paint.Color color,
+ int rule,
+ float density)
+
+ |
+
static javafx.scene.image.Image |
+FlipHorizontally(javafx.scene.image.Image img)
+
+ |
+
static javafx.scene.image.Image |
+FlipVertically(javafx.scene.image.Image img)
+
+ |
+
static javafx.scene.image.Image |
+GetRectImgFrom(javafx.scene.image.Image image,
+ java.awt.Rectangle bounds)
+
+ |
+
static javafx.scene.image.Image |
+Grayscale(javafx.scene.image.Image img)
+
+ |
+
static javafx.scene.image.Image |
+Interpolate(javafx.scene.image.Image original,
+ javafx.scene.image.Image overlayer,
+ int interpolationFactor)
+
+ |
+
static javafx.scene.image.Image |
+Invert(javafx.scene.image.Image img)
+
+ |
+
static boolean |
+IsCompletelyOpaque(javafx.scene.image.Image img)
+
+ |
+
static boolean |
+IsImageGrayscaled(javafx.scene.image.Image img)
+
+ |
+
static javafx.scene.image.Image |
+Merge(java.awt.Composite comp,
+ javafx.scene.image.Image... imgsToMerge)
+
+ |
+
static javafx.scene.image.Image |
+Merge(javafx.scene.image.Image... imgsToMerge)
+
+ |
+
static javafx.scene.image.Image |
+Merge(int imageIndex,
+ java.awt.Composite comp,
+ javafx.scene.image.Image... imgsToMerge)
+
+ |
+
static javafx.scene.image.Image |
+Resize(javafx.scene.image.Image img,
+ double width,
+ double height)
+
+ |
+
static javafx.scene.image.Image |
+Resize(javafx.scene.image.Image img,
+ int hints,
+ double width,
+ double height)
+
+ |
+
static javafx.scene.image.Image |
+Rotate(javafx.scene.image.Image img,
+ double angle)
+
+ |
+
static javafx.scene.image.Image |
+SameOf(javafx.scene.image.Image img1,
+ javafx.scene.image.Image img2) |
+
static javafx.scene.image.Image |
+SetAlpha(javafx.scene.image.Image img,
+ float alpha)
+
+ |
+
static javafx.scene.image.Image |
+SmallestImageFrom(javafx.scene.image.Image... imgs)
+
+ |
+
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public static boolean CompareIdentity(javafx.scene.image.Image img1, + javafx.scene.image.Image img2, + int acceptableDeviation)+
BufferedImageUtil#CompareIdentity(BufferedImage, BufferedImage, int)}
public static float CompareIdentityInPercent(javafx.scene.image.Image img1, + javafx.scene.image.Image img2, + int acceptableDeviation)+
BufferedImageUtil#CompareIdentityInPercent(BufferedImage, BufferedImage, int)}
public static javafx.scene.image.Image SameOf(javafx.scene.image.Image img1, + javafx.scene.image.Image img2)+
BufferedImageUtil#SameOf(BufferedImage, BufferedImage)}
public static javafx.scene.image.Image DifferenceOf(javafx.scene.image.Image img1, + javafx.scene.image.Image img2)+
BufferedImageUtil#DifferenceOf(BufferedImage, BufferedImage)}
public static javafx.scene.image.Image GetRectImgFrom(javafx.scene.image.Image image, + java.awt.Rectangle bounds)+ +
public static javafx.scene.image.Image Resize(javafx.scene.image.Image img, + double width, + double height)+ +
public static javafx.scene.image.Image Resize(javafx.scene.image.Image img, + int hints, + double width, + double height)+ +
public static javafx.scene.image.Image SetAlpha(javafx.scene.image.Image img, + float alpha)+ +
public static javafx.scene.image.Image BiggestImageFrom(javafx.scene.image.Image... imgs)+ +
public static javafx.scene.image.Image SmallestImageFrom(javafx.scene.image.Image... imgs)+ +
public static javafx.scene.image.Image Merge(javafx.scene.image.Image... imgsToMerge)+ +
public static javafx.scene.image.Image Merge(java.awt.Composite comp, + javafx.scene.image.Image... imgsToMerge)+ +
public static javafx.scene.image.Image Merge(int imageIndex, + java.awt.Composite comp, + javafx.scene.image.Image... imgsToMerge)+ +
public static javafx.scene.image.Image FillPixel(javafx.scene.image.Image img, + int x, + int y, + javafx.scene.paint.Color color)+ +
public static javafx.scene.image.Image Filter(javafx.scene.image.Image img, + javafx.scene.paint.Color color, + float density)+ +
public static javafx.scene.image.Image Filter(javafx.scene.image.Image img, + javafx.scene.paint.Color color, + int rule, + float density)+ +
public static javafx.scene.image.Image ColorFilter(javafx.scene.image.Image img, + javafx.scene.paint.Color[] originalColors, + javafx.scene.paint.Color[] refillColors, + int acceptableDeviation)+ +
public static javafx.scene.image.Image ColorFilter(javafx.scene.image.Image img, + java.util.Map<javafx.scene.paint.Color,javafx.scene.paint.Color> colorMappings, + int acceptableDeviation)+ +
public static javafx.scene.image.Image FillBackground(javafx.scene.image.Image img, + javafx.scene.paint.Color color)+ +
public static javafx.scene.image.Image FlipHorizontally(javafx.scene.image.Image img)+ +
public static javafx.scene.image.Image FlipVertically(javafx.scene.image.Image img)+ +
public static javafx.scene.image.Image Interpolate(javafx.scene.image.Image original, + javafx.scene.image.Image overlayer, + int interpolationFactor)+ +
public static javafx.scene.image.Image Rotate(javafx.scene.image.Image img, + double angle)+ +
public static javafx.scene.image.Image ArrayScale(javafx.scene.image.Image img, + int width, + int height)+ +
public static javafx.scene.image.Image ArrayScale(javafx.scene.image.Image img, + int width, + int height, + int densityX, + int densityY)+ +
public static javafx.scene.image.Image Grayscale(javafx.scene.image.Image img)+ +
public static javafx.scene.image.Image Invert(javafx.scene.image.Image img)+ +
public static javafx.scene.image.Image Derive(javafx.scene.image.Image img, + double hueShift, + double saturationFactor, + double brightnessFactor, + double opacityFactor)+
public static javafx.scene.image.Image ColorizeWithColor(javafx.scene.image.Image img, + javafx.scene.paint.Color colorizer)+ +
public static javafx.scene.image.Image ColorizeGrayscaleWithColor(javafx.scene.image.Image img, + javafx.scene.paint.Color colorizer)+ +
public static boolean IsImageGrayscaled(javafx.scene.image.Image img)+ +
public static boolean IsCompletelyOpaque(javafx.scene.image.Image img)+ +
Modifier and Type | +Method and Description | +
---|---|
static javafx.scene.image.Image |
+AwtFxUtils.EditFxAsAwtImage(javafx.scene.image.Image img,
+ AwtFxUtils.BufferedImageEditor editor) |
+
Interface | +Description | +
---|---|
AwtFxUtils.BufferedImageEditor | +
+ This is used in
+AwtFxUtils#EditFxAsAwtImage(Image, AwtImageEditor)
+ Write your editing code to edit method!
+ For example: |
+
Class | +Description | +
---|---|
AwtFxUtils | +
+ This class contains mainly converting methods.
+ |
+
BufferedImageUtil | +
+ This utility class contains powerful tools to work with
+BufferedImage !
+ Many of methods in this class needs relatively long time to run and supposed to not be called in loop because they may cause performance problems. |
+
FxImageUtil | +
+ This class contains exactly same functions as
+BufferedImageUtil , it also calls functions from BufferedImageUtil but this is converting images to BufferedImages and back. |
+
Class and Description | +
---|
AwtFxUtils.BufferedImageEditor
+ This is used in
+AwtFxUtils#EditFxAsAwtImage(Image, AwtImageEditor)
+ Write your editing code to edit method!
+ For example: |
+
Each package has a page that contains a list of its classes and interfaces, with a summary for each. This page can contain six categories:
+Each class, interface, nested class and nested interface has its own separate page. Each of these pages has three sections consisting of a class/interface description, summary tables, and detailed member descriptions:
+Each summary entry contains the first sentence from the detailed description for that item. The summary entries are alphabetical, while the detailed descriptions are in the order they appear in the source code. This preserves the logical groupings established by the programmer.
+Each annotation type has its own separate page with the following sections:
+Each enum has its own separate page with the following sections:
+Each documented package, class and interface has its own Use page. This page describes what packages, classes, methods, constructors and fields use any part of the given class or package. Given a class or interface A, its Use page includes subclasses of A, fields declared as A, methods that return A, and methods and constructors with parameters of type A. You can access this page by first going to the package, class or interface, then clicking on the "Use" link in the navigation bar.
+There is a Class Hierarchy page for all packages, plus a hierarchy for each package. Each hierarchy page contains a list of classes and a list of interfaces. The classes are organized by inheritance structure starting with java.lang.Object
. The interfaces do not inherit from java.lang.Object
.
The Deprecated API page lists all of the API that have been deprecated. A deprecated API is not recommended for use, generally due to improvements, and a replacement API is usually given. Deprecated APIs may be removed in future implementations.
+The Index contains an alphabetic list of all classes, interfaces, constructors, methods, and fields.
+These links take you to the next or previous class, interface, package, or related page.
+These links show and hide the HTML frames. All pages are available with or without frames.
+The All Classes link shows all classes and interfaces except non-static nested types.
+Each serializable or externalizable class has a description of its serialization fields and methods. This information is of interest to re-implementors, not to developers using the API. While there is no link in the navigation bar, you can get to this information by going to any serialized class and clicking "Serialized Form" in the "See also" section of the class description.
+The Constant Field Values page lists the static final fields and their values.
+public class Animation
+extends java.lang.Object
+implements java.lang.Cloneable
++ Primary goal of Texture is ability to animate image, automatically finds out length and type of animation (horizontal or vertical). + The goal has been accomplished very well! Only problem is that all frames must have the same width and height. For example 32*160 image = 5 frames long animation. + If Texture can't finds out length or type of animation (for example 11*59 image) it is unable to animate it. In this case it creates one frame long animation which consist of image from constructor (see ImageToFrames method). + The same thing will happen if you insert for example 40*40 image, what mean one frame long animation. +
++ This is also able to animate textures from a lot of different games such as Minecraft. +
Type | +Property and Description | +
---|---|
javafx.beans.property.SimpleIntegerProperty |
+CurrentFrame |
+
Constructor and Description | +
---|
Animation(javafx.scene.image.Image[] frames,
+ int... framesOrder)
+Create new instance of Texture.
+ |
+
Animation(javafx.scene.image.Image[] frames,
+ int frameTime,
+ boolean autoRepeat,
+ int... framesOrder)
+Create new instance of Texture.
+ |
+
Animation(javafx.scene.image.Image[] frames,
+ int reachableLentgh,
+ int frameTime,
+ boolean autoRepeat,
+ int... framesOrder)
+Create new instance of Texture.
+ |
+
Animation(javafx.scene.image.Image img,
+ int... framesOrder)
+Create new instance of Texture.
+ |
+
Animation(javafx.scene.image.Image img,
+ int frameTime,
+ boolean autoRepeat,
+ int... framesOrder)
+Create new instance of Texture.
+ |
+
Animation(javafx.scene.image.Image img,
+ int reachableLentgh,
+ int frameTime,
+ boolean autoRepeat,
+ int... framesOrder)
+Create new instance of Texture.
+ |
+
Modifier and Type | +Method and Description | +
---|---|
int |
+AnimationLength() |
+
javafx.scene.image.Image[] |
+AvalableFrames() |
+
Animation |
+clone() |
+
boolean |
+ContainsFrame(javafx.scene.image.Image frame) |
+
Animation |
+CreateComprimatedVersion() |
+
int |
+CurrentFrame() |
+
javafx.beans.property.SimpleIntegerProperty |
+CurrentFrameProperty() |
+
int |
+CurrentTicks() |
+
boolean |
+equals(java.lang.Object obj) |
+
javafx.scene.image.Image |
+FirstFrame() |
+
int[] |
+FramesOrder() |
+
static javafx.scene.image.Image |
+FramesToImage(javafx.scene.image.Image... frames) |
+
int |
+FrameTime() |
+
java.util.List<java.lang.Runnable> |
+GetOnFinished() |
+
javafx.scene.image.Image |
+GetRawTexture() |
+
javafx.scene.image.Image |
+Grab() |
+
javafx.scene.image.Image |
+GrabAnimationFrame(int frameIndex) |
+
javafx.scene.image.Image |
+GrabFrame(int frameIndex) |
+
javafx.scene.image.Image |
+GrabRectFromRaw(java.awt.Rectangle bounds) |
+
static javafx.scene.image.Image[] |
+ImageToFrames(javafx.scene.image.Image inputImage) |
+
boolean |
+IsAutoRepeating() |
+
boolean |
+IsFinished() |
+
boolean |
+IsOnStart() |
+
javafx.scene.image.Image |
+LastFrame() |
+
int |
+Length() |
+
void |
+NextFrame()
+Animation jumps on next frame if current frame is not last one.
+ |
+
void |
+PreviousFrame()
+Animation returns on previous frame if current frame is not first one.
+ |
+
int |
+ReachableLentgh() |
+
void |
+Repeat()
+The animation will cut on current frame and starts from the beginning.
+ |
+
void |
+Reverse()
+This make animation runs conversely.
+ |
+
void |
+SetAutoRepeat(boolean newAutoRepeat) |
+
void |
+SetCurrentFrame(int frame) |
+
void |
+SetFramesOrder(int... framesOrder) |
+
void |
+SetFrameTime(int frameTime)
+Set the frameTime value, that is how many ticks will be each frame showed before animation jumps on next one (greater number = slower animation)
+ |
+
void |
+SetReachableLentgh(int reachableLentgh)
+Set the reachableLentgh value, that is max reachable frame index that animation can reach (0 is also number).
+ |
+
java.lang.String |
+toString() |
+
boolean |
+Update()
+Update this animation.
+ |
+
getClass, hashCode, notify, notifyAll, wait, wait, wait
public javafx.beans.property.SimpleIntegerProperty CurrentFrameProperty+
public Animation(javafx.scene.image.Image img, + int... framesOrder)+
img
- | Texture source or in other words image you want to animate (All frames in image must have same dimensions).framesOrder
- | Order of frames or in other words array of ints that every int represents index of frame. Each frame can be also used more times, it means final animation can be longer or shorter than the original one!
+ For example, I have 11 frames long ani and I set this on new int[] {0, 0, 1, 2, 0} and I get the animation in order, first frame, second frame, third frame and first frame (0 = first frame because in arrays 0 means first pattern).public Animation(javafx.scene.image.Image img, + int frameTime, + boolean autoRepeat, + int... framesOrder)+
img
- | Texture source or in other words image you want to animate (All frames in image must have same dimensions).
+ or set on false and animation will stuck on last frame after one cycle.frameTime
- | This is how many ticks will be each frame showed before animation jumps on next one (greater number = slower animation)autoRepeat
- | Set on true and animation will automatically repeat (starts from beginning) after reaching the last frame.framesOrder
- | Order of frames or in other words array of ints that every int represents index of frame. Each frame can be also used more times, it means final animation can be longer or shorter than the original one!
+ For example, I have 11 frames long ani and I set this on new int[] {0, 0, 1, 2, 0} and I get the animation in order, first frame, second frame, third frame and first frame (0 = first frame because in arrays 0 means first pattern).public Animation(javafx.scene.image.Image img, + int reachableLentgh, + int frameTime, + boolean autoRepeat, + int... framesOrder)+
img
- | Texture source or in other words image you want to animate (All frames in image must have same dimensions).
+ or set on false and animation will stuck on last frame after one cycle.reachableLentgh
- | Max reachable frame that animation can reach (0 is also number). For example, I have 20 frames long ani and I set this on 9, after reaching 9th frame animation will repeats or stops.frameTime
- | That is how many ticks will be each frame showed before animation jumps on next one (greater number = slower animation)autoRepeat
- | Set on true and animation will automatically repeat (starts from beginning) after reaching the last frame.framesOrder
- | Order of frames or in other words array of ints that every int represents index of frame. Each frame can be also used more times, it means final animation can be longer or shorter than the original one!
+ For example, I have 11 frames long ani and I set this on new int[] {0, 0, 1, 2, 0} and I get the animation in order, first frame, second frame, third frame and first frame (0 = first frame because in arrays 0 means first pattern).public Animation(javafx.scene.image.Image[] frames, + int... framesOrder)+
frames
- | Array of animation's frames (In this case frames don't have to have same dimensions).framesOrder
- | Order of frames or in other words array of ints that every int represents index of frame. Each frame can be also used more times, it means final animation can be longer or shorter than the original one!
+ For example, I have 11 frames long ani and I set this on new int[] {0, 0, 1, 2, 0} and I get the animation in order, first frame, second frame, third frame and first frame (0 = first frame because in arrays 0 means first pattern).public Animation(javafx.scene.image.Image[] frames, + int frameTime, + boolean autoRepeat, + int... framesOrder)+
frames
- | Array of animation's frames (In this case frames don't have to have same dimensions).
+ or set on false and animation will stuck on last frame after one cycle.frameTime
- | This is how many ticks will be each frame showed before animation jumps on next one (greater number = slower animation)autoRepeat
- | Set on true and animation will automatically repeat (starts from beginning) after reaching the last frame.framesOrder
- | Order of frames or in other words array of ints that every int represents index of frame. Each frame can be also used more times, it means final animation can be longer or shorter than the original one!
+ For example, I have 11 frames long ani and I set this on new int[] {0, 0, 1, 2, 0} and I get the animation in order, first frame, second frame, third frame and first frame (0 = first frame because in arrays 0 means first pattern).public Animation(javafx.scene.image.Image[] frames, + int reachableLentgh, + int frameTime, + boolean autoRepeat, + int... framesOrder)+
frames
- | Array of animation's frames (In this case frames don't have to have same dimensions).
+ or set on false and animation will stuck on last frame after one cycle.reachableLentgh
- | Max reachable frame that animation can reach (0 is also number). For example, I have 20 frames long ani and I set this on 9, after reaching 9th frame animation will repeats or stops.frameTime
- | This is how many ticks will be each frame showed before animation jumps on next one (greater number = slower animation)autoRepeat
- | Set on true and animation will automatically repeat (starts from beginning) after reaching the last frame.framesOrder
- | Order of frames or in other words array of ints that every int represents index of frame. Each frame can be also used more times, it means final animation can be longer or shorter than the original one!
+ For example, I have 11 frames long ani and I set this on new int[] {0, 0, 1, 2, 0} and I get the animation in order, first frame, second frame, third frame and first frame (0 = first frame because in arrays 0 means first pattern).public Animation clone()+
clone
in class java.lang.Object
public boolean equals(java.lang.Object obj)+
equals
in class java.lang.Object
Animation
- object to compare.public java.lang.String toString()+
toString
in class java.lang.Object
public boolean Update()+
AnimationLength()
is greater than 1.public Animation CreateComprimatedVersion()+
public javafx.scene.image.Image LastFrame()+
public javafx.scene.image.Image FirstFrame()+
public javafx.scene.image.Image Grab()+
Update()
method).public javafx.scene.image.Image GrabAnimationFrame(int frameIndex)+
frame
- | Index of required frame (0 is also number).public javafx.scene.image.Image GrabFrame(int frameIndex)+
frame
- | Index of required frame (0 is also number).public javafx.scene.image.Image[] AvalableFrames()+
public javafx.scene.image.Image GetRawTexture()+
public void Reverse()+
public void NextFrame()+
public void PreviousFrame()+
public void SetCurrentFrame(int frame)+
frame
- | Sets animation on required frame (0 is also number).public void Repeat()+
public void SetFramesOrder(int... framesOrder)+
framesOrder
- | Order of frames or in other words array of ints that every int represents index of frame (minimal possible index = 0 and maximal possible index = Length()-1
).
+ Each frame can be also used more times, it means final animation can be longer or shorter than the original one!
+ For example, I have 11 frames long ani and I set this on new int[] {0, 0, 1, 2, 0} and I get the animation in order, first frame, second frame, third frame and first frame (0 = first frame because in arrays 0 means first pattern).public int[] FramesOrder()+
public void SetReachableLentgh(int reachableLentgh)+
AnimationLength()
-1) is!reachableLentgh
- | Value to set.public boolean ContainsFrame(javafx.scene.image.Image frame)+
frame
- | The frame.public void SetFrameTime(int frameTime)+
frameTime
- | Value to set.public int ReachableLentgh()+
public int FrameTime()+
public int CurrentTicks()+
FrameTime()
animation will move on next frame while setting this value on 0 and whole process will repeat.public javafx.beans.property.SimpleIntegerProperty CurrentFrameProperty()+
public void SetAutoRepeat(boolean newAutoRepeat)+
newAutoRepeat
- | New auto repeat value.
+ Set on true and animation will automatically repeat (starts from beginning) after reaching the last frame.public boolean IsAutoRepeating()+
Repeat()
is called or current frame is set.public boolean IsFinished()+
public boolean IsOnStart()+
public java.util.List<java.lang.Runnable> GetOnFinished()+
Update()
or IsFinished()
must be called to run this.public int CurrentFrame()+
public int Length()+
AvalableFrames()
.length).
+ If you do not change reachable length and frames order of animation than we can say that AnimationLength()
-1 equals Length()
-1 equals ReachableLentgh()
.public int AnimationLength()+
AnimationLength()
-1 equals Length()
-1 equals ReachableLentgh()
.public javafx.scene.image.Image GrabRectFromRaw(java.awt.Rectangle bounds)+
bounds
- | Rectangle with X, Y, Width and Height parameters.public static javafx.scene.image.Image[] ImageToFrames(javafx.scene.image.Image inputImage)+
inputImage
- | Image to turn in to frames.public static javafx.scene.image.Image FramesToImage(javafx.scene.image.Image... frames)+
frames
- | Frames to turn in to image.public class Texture
+extends javafx.scene.image.ImageView
+implements java.lang.Cloneable
++ This class is for easily visualizing one our multiple Animation objects. +
fitHeightProperty, fitWidthProperty, imageProperty, preserveRatioProperty, smoothProperty, viewportProperty, xProperty, yProperty
accessibleHelpProperty, accessibleRoleDescriptionProperty, accessibleRoleProperty, accessibleTextProperty, blendModeProperty, boundsInLocalProperty, boundsInParentProperty, cacheHintProperty, cacheProperty, clipProperty, cursorProperty, depthTestProperty, disabledProperty, disableProperty, effectiveNodeOrientationProperty, effectProperty, eventDispatcherProperty, focusedProperty, focusTraversableProperty, hoverProperty, idProperty, impl_showMnemonicsProperty, inputMethodRequestsProperty, layoutBoundsProperty, layoutXProperty, layoutYProperty, localToParentTransformProperty, localToSceneTransformProperty, managedProperty, mouseTransparentProperty, nodeOrientationProperty, onContextMenuRequestedProperty, onDragDetectedProperty, onDragDoneProperty, onDragDroppedProperty, onDragEnteredProperty, onDragExitedProperty, onDragOverProperty, onInputMethodTextChangedProperty, onKeyPressedProperty, onKeyReleasedProperty, onKeyTypedProperty, onMouseClickedProperty, onMouseDragEnteredProperty, onMouseDragExitedProperty, onMouseDraggedProperty, onMouseDragOverProperty, onMouseDragReleasedProperty, onMouseEnteredProperty, onMouseExitedProperty, onMouseMovedProperty, onMousePressedProperty, onMouseReleasedProperty, onRotateProperty, onRotationFinishedProperty, onRotationStartedProperty, onScrollFinishedProperty, onScrollProperty, onScrollStartedProperty, onSwipeDownProperty, onSwipeLeftProperty, onSwipeRightProperty, onSwipeUpProperty, onTouchMovedProperty, onTouchPressedProperty, onTouchReleasedProperty, onTouchStationaryProperty, onZoomFinishedProperty, onZoomProperty, onZoomStartedProperty, opacityProperty, parentProperty, pickOnBoundsProperty, pressedProperty, rotateProperty, rotationAxisProperty, scaleXProperty, scaleYProperty, scaleZProperty, sceneProperty, styleProperty, translateXProperty, translateYProperty, translateZProperty, visibleProperty
Modifier and Type | +Field and Description | +
---|---|
com.sun.javafx.collections.ObservableListWrapper<Animation> |
+layers |
+
SMOOTH_DEFAULT
BASELINE_OFFSET_SAME_AS_HEIGHT
Constructor and Description | +
---|
Texture(java.util.List<Animation> layers)
+Create new instance.
+ |
+
Texture(java.util.List<Animation> layers,
+ int upscalingF)
+Create new instance.
+ |
+
Texture(java.util.List<Animation> layers,
+ int upscalingF,
+ boolean dynamicScaling)
+Create new instance.
+ |
+
Texture(java.lang.Object... layers)
+Create new instance.
+ |
+
Modifier and Type | +Method and Description | +
---|---|
java.util.List<java.lang.Object> |
+AddAllFrom(java.lang.Object... layers) |
+
java.lang.Object |
+AddFrom(java.lang.Object layer)
+Add Animation from object.
+ |
+
void |
+AddOnFinishedForAll(java.lang.Runnable onFinished) |
+
Texture |
+clone() |
+
void |
+DoScale()
+This function is scaling individual layers via upscalingFactor.
+ |
+
boolean |
+equals(java.lang.Object o) |
+
void |
+fitSize(double w,
+ double h) |
+
javafx.geometry.Point2D |
+getBiggestOriginalSizes() |
+
Animation |
+GetLongestAnimation() |
+
java.util.List<javafx.geometry.Point2D> |
+getOriginalSizes() |
+
int |
+getUpscalingFactor()
+Upscaling is highly increasing textures resolution when you increase its fitWidth or fitHeight property.
+ |
+
boolean |
+IsAllFinished() |
+
boolean |
+IsAllOnStart() |
+
boolean |
+isDynamicScaling() |
+
void |
+RemoveOnFinishedForAll(java.lang.Runnable onFinished) |
+
void |
+RepeatAll()
+This will repeat all animations.
+ |
+
void |
+ReverseAll()
+This will reverse all animations.
+ |
+
void |
+SetAutoRepeatForAll(boolean autoRepeat) |
+
void |
+setDynamicScaling(boolean dynamicScaling) |
+
void |
+SetFrameTimeForAll(int frameTime)
+This will set frameTime for all animations.
+ |
+
void |
+setUpscalingFactor(int upscalingF)
+Upscaling is highly increasing textures resolution when you increase its fitWidth or fitHeight property.
+ |
+
java.lang.String |
+toString() |
+
boolean |
+Update()
+This will update and all Animations.
+ |
+
fitHeightProperty, fitWidthProperty, getClassCssMetaData, getCssMetaData, getFitHeight, getFitWidth, getImage, getViewport, getX, getY, imageProperty, impl_computeGeomBounds, impl_processMXNode, impl_updatePeer, isPreserveRatio, isSmooth, preserveRatioProperty, setFitHeight, setFitWidth, setImage, setPreserveRatio, setSmooth, setViewport, setX, setY, smoothProperty, viewportProperty, xProperty, yProperty
accessibleHelpProperty, accessibleRoleDescriptionProperty, accessibleRoleProperty, accessibleTextProperty, addEventFilter, addEventHandler, applyCss, autosize, blendModeProperty, boundsInLocalProperty, boundsInParentProperty, buildEventDispatchChain, cacheHintProperty, cacheProperty, clipProperty, computeAreaInScreen, contains, contains, cursorProperty, depthTestProperty, disabledProperty, disableProperty, effectiveNodeOrientationProperty, effectProperty, eventDispatcherProperty, executeAccessibleAction, fireEvent, focusedProperty, focusTraversableProperty, getAccessibleHelp, getAccessibleRole, getAccessibleRoleDescription, getAccessibleText, getBaselineOffset, getBlendMode, getBoundsInLocal, getBoundsInParent, getCacheHint, getClip, getContentBias, getCursor, getDepthTest, getEffect, getEffectiveNodeOrientation, getEventDispatcher, getId, getInputMethodRequests, getLayoutBounds, getLayoutX, getLayoutY, getLocalToParentTransform, getLocalToSceneTransform, getNodeOrientation, getOnContextMenuRequested, getOnDragDetected, getOnDragDone, getOnDragDropped, getOnDragEntered, getOnDragExited, getOnDragOver, getOnInputMethodTextChanged, getOnKeyPressed, getOnKeyReleased, getOnKeyTyped, getOnMouseClicked, getOnMouseDragEntered, getOnMouseDragExited, getOnMouseDragged, getOnMouseDragOver, getOnMouseDragReleased, getOnMouseEntered, getOnMouseExited, getOnMouseMoved, getOnMousePressed, getOnMouseReleased, getOnRotate, getOnRotationFinished, getOnRotationStarted, getOnScroll, getOnScrollFinished, getOnScrollStarted, getOnSwipeDown, getOnSwipeLeft, getOnSwipeRight, getOnSwipeUp, getOnTouchMoved, getOnTouchPressed, getOnTouchReleased, getOnTouchStationary, getOnZoom, getOnZoomFinished, getOnZoomStarted, getOpacity, getParent, getProperties, getPseudoClassStates, getRotate, getRotationAxis, getScaleX, getScaleY, getScaleZ, getScene, getStyle, getStyleableParent, getStyleClass, getTransforms, getTranslateX, getTranslateY, getTranslateZ, getTypeSelector, getUserData, hasProperties, hoverProperty, idProperty, impl_findStyles, impl_getLeafTransform, impl_getMatchingStyles, impl_getPeer, impl_getPivotX, impl_getPivotY, impl_getPivotZ, impl_getStyleMap, impl_hasTransforms, impl_isShowMnemonics, impl_isTreeVisible, impl_pickNode, impl_processCSS, impl_reapplyCSS, impl_setShowMnemonics, impl_setStyleMap, impl_showMnemonicsProperty, impl_syncPeer, impl_transformsChanged, impl_traverse, inputMethodRequestsProperty, intersects, intersects, isCache, isDisable, isDisabled, isFocused, isFocusTraversable, isHover, isManaged, isMouseTransparent, isPickOnBounds, isPressed, isResizable, isVisible, layoutBoundsProperty, layoutXProperty, layoutYProperty, localToParent, localToParent, localToParent, localToParent, localToParent, localToParentTransformProperty, localToScene, localToScene, localToScene, localToScene, localToScene, localToScene, localToScene, localToScene, localToScene, localToScene, localToSceneTransformProperty, localToScreen, localToScreen, localToScreen, localToScreen, localToScreen, lookup, lookupAll, managedProperty, maxHeight, maxWidth, minHeight, minWidth, mouseTransparentProperty, nodeOrientationProperty, notifyAccessibleAttributeChanged, onContextMenuRequestedProperty, onDragDetectedProperty, onDragDoneProperty, onDragDroppedProperty, onDragEnteredProperty, onDragExitedProperty, onDragOverProperty, onInputMethodTextChangedProperty, onKeyPressedProperty, onKeyReleasedProperty, onKeyTypedProperty, onMouseClickedProperty, onMouseDragEnteredProperty, onMouseDragExitedProperty, onMouseDraggedProperty, onMouseDragOverProperty, onMouseDragReleasedProperty, onMouseEnteredProperty, onMouseExitedProperty, onMouseMovedProperty, onMousePressedProperty, onMouseReleasedProperty, onRotateProperty, onRotationFinishedProperty, onRotationStartedProperty, onScrollFinishedProperty, onScrollProperty, onScrollStartedProperty, onSwipeDownProperty, onSwipeLeftProperty, onSwipeRightProperty, onSwipeUpProperty, onTouchMovedProperty, onTouchPressedProperty, onTouchReleasedProperty, onTouchStationaryProperty, onZoomFinishedProperty, onZoomProperty, onZoomStartedProperty, opacityProperty, parentProperty, parentToLocal, parentToLocal, parentToLocal, parentToLocal, parentToLocal, pickOnBoundsProperty, prefHeight, prefWidth, pressedProperty, pseudoClassStateChanged, queryAccessibleAttribute, relocate, removeEventFilter, removeEventHandler, requestFocus, resize, resizeRelocate, rotateProperty, rotationAxisProperty, scaleXProperty, scaleYProperty, scaleZProperty, sceneProperty, sceneToLocal, sceneToLocal, sceneToLocal, sceneToLocal, sceneToLocal, sceneToLocal, sceneToLocal, sceneToLocal, screenToLocal, screenToLocal, screenToLocal, setAccessibleHelp, setAccessibleRole, setAccessibleRoleDescription, setAccessibleText, setBlendMode, setCache, setCacheHint, setClip, setCursor, setDepthTest, setDisable, setEffect, setEventDispatcher, setFocusTraversable, setId, setInputMethodRequests, setLayoutX, setLayoutY, setManaged, setMouseTransparent, setNodeOrientation, setOnContextMenuRequested, setOnDragDetected, setOnDragDone, setOnDragDropped, setOnDragEntered, setOnDragExited, setOnDragOver, setOnInputMethodTextChanged, setOnKeyPressed, setOnKeyReleased, setOnKeyTyped, setOnMouseClicked, setOnMouseDragEntered, setOnMouseDragExited, setOnMouseDragged, setOnMouseDragOver, setOnMouseDragReleased, setOnMouseEntered, setOnMouseExited, setOnMouseMoved, setOnMousePressed, setOnMouseReleased, setOnRotate, setOnRotationFinished, setOnRotationStarted, setOnScroll, setOnScrollFinished, setOnScrollStarted, setOnSwipeDown, setOnSwipeLeft, setOnSwipeRight, setOnSwipeUp, setOnTouchMoved, setOnTouchPressed, setOnTouchReleased, setOnTouchStationary, setOnZoom, setOnZoomFinished, setOnZoomStarted, setOpacity, setPickOnBounds, setRotate, setRotationAxis, setScaleX, setScaleY, setScaleZ, setStyle, setTranslateX, setTranslateY, setTranslateZ, setUserData, setVisible, snapshot, snapshot, startDragAndDrop, startFullDrag, styleProperty, toBack, toFront, translateXProperty, translateYProperty, translateZProperty, usesMirroring, visibleProperty
getClass, hashCode, notify, notifyAll, wait, wait, wait
public final com.sun.javafx.collections.ObservableListWrapper<Animation> layers+
public Texture(java.lang.Object... layers)+
layers
- | Array of objects to create Texture from. Supported objects are: Animation
, Image
, String
, InputStream
!public Texture(java.util.List<Animation> layers)+
layers
- | Objects to create Texture from. Supported objects are: Animation
, Image
, String
, InputStream
!public Texture(java.util.List<Animation> layers, + int upscalingF)+
layers
- | Layers
object to create Texture from.upScalingF
- | New value of "Upscaling factor".
+ Upscaling is highly increasing textures resolution when you increase its fitWidth or fitHeight property.
+ "Upscaling factor" is the value by which is the fitWidth and fitHeight multiplied by.
+ Recommended: Do not set this on more than 2!public Texture(java.util.List<Animation> layers, + int upscalingF, + boolean dynamicScaling)+
layers
- | Layers
object to create Texture from.upScalingF
- | New value of "Upscaling factor".
+ Upscaling is highly increasing textures resolution when you increase its fitWidth or fitHeight property.
+ "Upscaling factor" is the value by which is the fitWidth and fitHeight multiplied by.
+ Recommended: Do not set this on more than 2!dynamicScaling
- | Set this on true and all layers will be resized always when fitWidth or fitHeight changed.
+ Set this on false if this Texture object will be resized frequently to save CPU time.
+ Note: All newly added layers will be resized even if this is false.public Texture clone()+
clone
in class java.lang.Object
public boolean equals(java.lang.Object o)+
equals
in class java.lang.Object
public java.lang.String toString()+
toString
in class javafx.scene.Node
public void DoScale()+
public void fitSize(double w, + double h)+
w
- | Fit width to set.h
- | Fit height to set.public void ReverseAll()+
public void RepeatAll()+
public void SetFrameTimeForAll(int frameTime)+
frameTime
- | Frame time value to set.public Animation GetLongestAnimation()+
public boolean IsAllFinished()+
public boolean IsAllOnStart()+
public void SetAutoRepeatForAll(boolean autoRepeat)+
autoRepeat
- | Auto repeat parameter for all layer/Animation in this texture.public void AddOnFinishedForAll(java.lang.Runnable onFinished)+
onFinished
- | On finished Runnable that will be called if layers/Animation in this texture finished (will be on last frame).public void RemoveOnFinishedForAll(java.lang.Runnable onFinished)+
onFinished
- | On finished Runnable that will removed from every layers/Animation in this texture if contains.public boolean Update()+
public java.lang.Object AddFrom(java.lang.Object layer)+
layer
- | Array of objects to create Texture from. Supported objects are: Animation
, Image
, String
, InputStream
!
+ Image means image to create animation from.
+ String is path to image to create animation from.
+ InputStream is InputStream object to create image for animation from.public java.util.List<java.lang.Object> AddAllFrom(java.lang.Object... layers)+
public int getUpscalingFactor()+
public void setUpscalingFactor(int upscalingF)+
upScalingF
- | New value of "Upscaling factor".public boolean isDynamicScaling()+
public void setDynamicScaling(boolean dynamicScaling)+
dynamicScaling
- | Set this on true and all layers will be resized always when fitWidth or fitHeight changed.
+ Set this on false if this Texture object will be resized frequently to save CPU time.
+
+ Note: All newly added layers will be resized even if this is false.public java.util.List<javafx.geometry.Point2D> getOriginalSizes()+
public javafx.geometry.Point2D getBiggestOriginalSizes()+
Modifier and Type | +Field and Description | +
---|---|
com.sun.javafx.collections.ObservableListWrapper<Animation> |
+Texture.layers |
+
Modifier and Type | +Method and Description | +
---|---|
Animation |
+Animation.clone() |
+
Animation |
+Animation.CreateComprimatedVersion() |
+
Animation |
+Texture.GetLongestAnimation() |
+
Constructor and Description | +
---|
Texture(java.util.List<Animation> layers)
+Create new instance.
+ |
+
Texture(java.util.List<Animation> layers,
+ int upscalingF)
+Create new instance.
+ |
+
Texture(java.util.List<Animation> layers,
+ int upscalingF,
+ boolean dynamicScaling)
+Create new instance.
+ |
+
Modifier and Type | +Method and Description | +
---|---|
Texture |
+Texture.clone() |
+
Class | +Description | +
---|---|
Animation | +
+
+ Primary goal of Texture is ability to animate image, automatically finds out length and type of animation (horizontal or vertical).
+ |
+
Texture | +
+
+ This class is for easily visualizing one our multiple Animation objects.
+ |
+
Class and Description | +
---|
Animation
+
+ Primary goal of Texture is ability to animate image, automatically finds out length and type of animation (horizontal or vertical).
+ |
+
Texture
+
+ This class is for easily visualizing one our multiple Animation objects.
+ |
+
Each package has a page that contains a list of its classes and interfaces, with a summary for each. This page can contain six categories:
+Each class, interface, nested class and nested interface has its own separate page. Each of these pages has three sections consisting of a class/interface description, summary tables, and detailed member descriptions:
+Each summary entry contains the first sentence from the detailed description for that item. The summary entries are alphabetical, while the detailed descriptions are in the order they appear in the source code. This preserves the logical groupings established by the programmer.
+Each annotation type has its own separate page with the following sections:
+Each enum has its own separate page with the following sections:
+Each documented package, class and interface has its own Use page. This page describes what packages, classes, methods, constructors and fields use any part of the given class or package. Given a class or interface A, its Use page includes subclasses of A, fields declared as A, methods that return A, and methods and constructors with parameters of type A. You can access this page by first going to the package, class or interface, then clicking on the "Use" link in the navigation bar.
+There is a Class Hierarchy page for all packages, plus a hierarchy for each package. Each hierarchy page contains a list of classes and a list of interfaces. The classes are organized by inheritance structure starting with java.lang.Object
. The interfaces do not inherit from java.lang.Object
.
The Deprecated API page lists all of the API that have been deprecated. A deprecated API is not recommended for use, generally due to improvements, and a replacement API is usually given. Deprecated APIs may be removed in future implementations.
+The Index contains an alphabetic list of all classes, interfaces, constructors, methods, and fields.
+These links take you to the next or previous class, interface, package, or related page.
+These links show and hide the HTML frames. All pages are available with or without frames.
+The All Classes link shows all classes and interfaces except non-static nested types.
+Each serializable or externalizable class has a description of its serialization fields and methods. This information is of interest to re-implementors, not to developers using the API. While there is no link in the navigation bar, you can get to this information by going to any serialized class and clicking "Serialized Form" in the "See also" section of the class description.
+The Constant Field Values page lists the static final fields and their values.
+AwtFxUtils#EditFxAsAwtImage(Image, AwtImageEditor)
+ Write your editing code to edit method!
+ For example:BufferedImage
!
+ Many of methods in this class needs relatively long time to run and supposed to not be called in loop because they may cause performance problems.BufferedImageUtil
, it also calls functions from BufferedImageUtil
but this is converting images to BufferedImages and back.public static interface AwtFxUtils.BufferedImageEditor
+AwtFxUtils#EditFxAsAwtImage(Image, AwtImageEditor)
+ Write your editing code to edit method!
+ For example:
+ + Graphics2D g2d = buffImg.createGraphics(); + g2d.setColor(Color.RED); + g2d.fillRect(0, 0, 25, 25); + g2d.dispose(); +
Modifier and Type | +Method and Description | +
---|---|
java.awt.image.BufferedImage |
+edit(java.awt.image.BufferedImage buffImg) |
+
public static interface AwtFxUtils.FxImageEditor
++ FxImageUtil.ColorizeWithColor(img, Color.GOLD); +
Modifier and Type | +Method and Description | +
---|---|
javafx.scene.image.Image |
+edit(javafx.scene.image.Image img) |
+
public class AwtFxUtils
+extends java.lang.Object
+Modifier and Type | +Class and Description | +
---|---|
static interface |
+AwtFxUtils.BufferedImageEditor
+This is used in
+AwtFxUtils#EditFxAsAwtImage(Image, AwtImageEditor)
+ Write your editing code to edit method!
+ For example: |
+
static interface |
+AwtFxUtils.FxImageEditor
+This is used in sister library called Texture!
+ Write your editing code to edit method!
+ For example:
+ |
+
Modifier and Type | +Method and Description | +
---|---|
static java.util.List<javafx.scene.image.Image> |
+AllAwtToFxImages(java.awt.image.BufferedImage... imgs)
+Convert between list of awt and fx images.
+ |
+
static java.util.List<java.awt.image.BufferedImage> |
+AllFxToAwtImages(javafx.scene.image.Image... imgs)
+Convert between list of awt and fx images.
+ |
+
static javafx.scene.image.Image[] |
+AllImagesFromFile(java.io.File file)
+This will load images from folder.
+ |
+
static boolean |
+AreColorsAproximatlyEquals(int color1RGBA,
+ int color2RGBA,
+ int acceptableDeviation)
+This method comparable identity of colors.
+ |
+
static void |
+AwtImageToFile(java.awt.image.BufferedImage img,
+ java.io.File imageFile) |
+
static java.awt.Color |
+AwtRCG() |
+
static java.awt.Color |
+AwtRCG(java.util.Random rand) |
+
static java.awt.Color |
+AwtRCG(java.util.Random rand,
+ int maxR,
+ int maxG,
+ int maxB,
+ int maxA) |
+
static javafx.scene.paint.Color |
+AwtToFxColor(java.awt.Color awtColor)
+Convert between awt and fx color.
+ |
+
static javafx.scene.image.Image |
+AwtToFxImage(java.awt.image.BufferedImage img)
+Convert between awt and fx image.
+ |
+
static java.awt.Color |
+ColorizeAwt(java.awt.Color awtColor,
+ java.awt.Color colorizer) |
+
static javafx.scene.paint.Color |
+ColorizeFx(javafx.scene.paint.Color fxColor,
+ javafx.scene.paint.Color colorizer) |
+
static java.awt.Color |
+DeriveAwt(java.awt.Color awtColor,
+ double hueShift,
+ double saturationFactor,
+ double brightnessFactor,
+ double opacityFactor) |
+
static javafx.scene.image.Image |
+EditFxAsAwtImage(javafx.scene.image.Image img,
+ AwtFxUtils.BufferedImageEditor editor) |
+
static void |
+FxImageToFile(javafx.scene.image.Image img,
+ java.io.File imageFile) |
+
static javafx.scene.paint.Color |
+FxRCG() |
+
static javafx.scene.paint.Color |
+FxRCG(java.util.Random rand) |
+
static javafx.scene.paint.Color |
+FxRCG(java.util.Random rand,
+ int maxR,
+ int maxG,
+ int maxB,
+ int maxA) |
+
static java.awt.Color |
+FxToAwtColor(javafx.scene.paint.Color fxColor)
+Convert between awt and fx color.
+ |
+
static java.awt.image.BufferedImage |
+FxToAwtImage(javafx.scene.image.Image img)
+Convert between awt and fx image.
+ |
+
static int |
+GetAlphaFromRGB(int rgb) |
+
static javafx.scene.image.WritablePixelFormat<java.nio.IntBuffer> |
+GetAssociatedPixelFormat(java.awt.image.BufferedImage bimg) |
+
static int |
+GetBestBufferedImageType(javafx.scene.image.PixelFormat<?> fxFormat,
+ java.awt.image.BufferedImage bimg) |
+
static int |
+GetBlueFromRGB(int rgb) |
+
static int |
+GetGreenFromRGB(int rgb) |
+
static int |
+GetRedFromRGB(int rgb) |
+
static java.awt.Color |
+GrayscaleAwt(java.awt.Color awtColor) |
+
static javafx.scene.image.Image |
+ImageFromFile(java.io.File file)
+This will load image from file.
+ |
+
static java.awt.Color |
+InterpolateAwts(java.awt.Color awtColor,
+ java.awt.Color endColor,
+ double interpolationFactor) |
+
static java.awt.Color |
+InvertAwt(java.awt.Color awtColor) |
+
static boolean |
+IsAwtColorGrayscaled(java.awt.Color awtColor) |
+
static boolean |
+IsAwtColorOpaque(java.awt.Color awtColor) |
+
static boolean |
+IsFxColorGrayscaled(javafx.scene.paint.Color fxColor) |
+
static int |
+RedGreenBlueToRGB(int r,
+ int g,
+ int b) |
+
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public static javafx.scene.image.Image[] AllImagesFromFile(java.io.File file)+
file
- | Folder to read images from.public static javafx.scene.image.Image ImageFromFile(java.io.File file)+
file
- | File to read image from.public static void AwtImageToFile(java.awt.image.BufferedImage img, + java.io.File imageFile)+
img
- | BufferedImage to store into file.imageFile
- | File to store BufferedImage into (if there is no suffix in file path, it will be taken as .png).public static void FxImageToFile(javafx.scene.image.Image img, + java.io.File imageFile)+
img
- | Fx Image to store into file.imageFile
- | File to store Fx Image into (If no extension in file path, it will be taken as .png).public static javafx.scene.paint.Color AwtToFxColor(java.awt.Color awtColor)+
awtColor
- | Awt color to convert.public static java.awt.Color FxToAwtColor(javafx.scene.paint.Color fxColor)+
fxColor
- | Fx color to convert.public static java.awt.Color AwtRCG()+
public static java.awt.Color AwtRCG(java.util.Random rand)+
rand
- | Random object to use.public static java.awt.Color AwtRCG(java.util.Random rand, + int maxR, + int maxG, + int maxB, + int maxA)+
rand
- | Random object to use.maxR
- | Upper limit of red value that can be generated (max 255+1).maxG
- | Upper limit of green value that can be generated (max 255+1).maxB
- | Upper limit of blue value that can be generated (max 255+1).maxA
- | Upper limit of alpha/transparency value that can be generated (max 255+1) or -1 if you want opaque color.public static javafx.scene.paint.Color FxRCG()+
public static javafx.scene.paint.Color FxRCG(java.util.Random rand)+
rand
- | Random object to use.public static javafx.scene.paint.Color FxRCG(java.util.Random rand, + int maxR, + int maxG, + int maxB, + int maxA)+
rand
- | Random object to use.maxR
- | Upper limit of red value that can be generated (max 255+1).maxG
- | Upper limit of green value that can be generated (max 255+1).maxB
- | Upper limit of blue value that can be generated (max 255+1).maxA
- | Upper limit of alpha/transparency value that can be generated (max 255+1) or -1 if you want opaque color.public static java.awt.Color GrayscaleAwt(java.awt.Color awtColor)+
public static java.awt.Color InvertAwt(java.awt.Color awtColor)+
public static java.awt.Color DeriveAwt(java.awt.Color awtColor, + double hueShift, + double saturationFactor, + double brightnessFactor, + double opacityFactor)+
Color.deriveColor(double, double, double, double)
public static java.awt.Color InterpolateAwts(java.awt.Color awtColor, + java.awt.Color endColor, + double interpolationFactor)+
Color.interpolate(javafx.scene.paint.Color, double)
public static java.awt.Color ColorizeAwt(java.awt.Color awtColor, + java.awt.Color colorizer)+
InterpolateAwts(Color, Color, double)
but this is not strictly showing start or end color based on factor, this will, we can say, merge both of them.
+ The more awtColor is same as the colorizer then less this effect will be visible.public static javafx.scene.paint.Color ColorizeFx(javafx.scene.paint.Color fxColor, + javafx.scene.paint.Color colorizer)+
InterpolateAwts(Color, Color, double)
but this is not strictly showing start or end color based on factor, this will, we can say, merge both of them.
+ The more fxColor is same as the colorizer then less this effect will be visible.public static boolean IsAwtColorGrayscaled(java.awt.Color awtColor)+
public static boolean IsFxColorGrayscaled(javafx.scene.paint.Color fxColor)+
public static boolean IsAwtColorOpaque(java.awt.Color awtColor)+
public static javafx.scene.image.Image EditFxAsAwtImage(javafx.scene.image.Image img, + AwtFxUtils.BufferedImageEditor editor)+
img
- | Fx image to edit.editor
- | AwtFxUtils.BufferedImageEditor
to use.public static boolean AreColorsAproximatlyEquals(int color1RGBA, + int color2RGBA, + int acceptableDeviation)+
color1RGBA
- | RGBA of first color.color2RGBA
- | RGBA of second color.acceptableDeviation
- | This is max acceptable deviation in RGBA of colors.public static int RedGreenBlueToRGB(int r, + int g, + int b)+
public static int GetAlphaFromRGB(int rgb)+
rgb
- | RGB to get alpha factor from.public static int GetRedFromRGB(int rgb)+
rgb
- | RGB to get red factor from.public static int GetGreenFromRGB(int rgb)+
rgb
- | RGB to get green factor from.public static int GetBlueFromRGB(int rgb)+
rgb
- | RGB to get blue factor from.public static javafx.scene.image.Image AwtToFxImage(java.awt.image.BufferedImage img)+
img
- | Awt image to convert.SwingFXUtils
public static java.awt.image.BufferedImage FxToAwtImage(javafx.scene.image.Image img)+
img
- | Fx image to convert.SwingFXUtils
public static int GetBestBufferedImageType(javafx.scene.image.PixelFormat<?> fxFormat, + java.awt.image.BufferedImage bimg)+
fxFormat
- | The PixelFormat of the source FX Image!bimg
- | An optional existing BufferedImage
to be used for storage if it is compatible, or null!fxFormat
allowing for the specified bimg
to be used
+ as a potential default storage space if it is not null and is compatible.public static javafx.scene.image.WritablePixelFormat<java.nio.IntBuffer> GetAssociatedPixelFormat(java.awt.image.BufferedImage bimg)+
bimg
- | The BufferedImage that will be used as a destination for a PixelReader<IntBuffer>#getPixels()
operation.WritablePixelFormat
type that can be used to transfer data into the indicated BufferedImage.public static java.util.List<java.awt.image.BufferedImage> AllFxToAwtImages(javafx.scene.image.Image... imgs)+
imgs
- | Fx images to convert.SwingFXUtils
public static java.util.List<javafx.scene.image.Image> AllAwtToFxImages(java.awt.image.BufferedImage... imgs)+
imgs
- | Awt images to convert.SwingFXUtils
public class BufferedImageUtil
+extends java.lang.Object
+BufferedImage
!
+ Many of methods in this class needs relatively long time to run and supposed to not be called in loop because they may cause performance problems.
+
+ Note: Many methods will change BufferedImages type to globalImageType
!Modifier and Type | +Field and Description | +
---|---|
static int |
+globalImageType
+BufferedImage type for all result images.
+ |
+
Modifier and Type | +Method and Description | +
---|---|
static java.awt.image.BufferedImage |
+ArrayScale(java.awt.image.BufferedImage img,
+ int width,
+ int height)
+This will draw multiple source images in row.
+ |
+
static java.awt.image.BufferedImage |
+ArrayScale(java.awt.image.BufferedImage img,
+ int width,
+ int height,
+ int densityX,
+ int densityY)
+This will draw multiple source images in row.
+ |
+
static java.awt.image.BufferedImage |
+BiggestImageFrom(java.awt.image.BufferedImage... imgs) |
+
static java.awt.image.BufferedImage |
+ColorFilter(java.awt.image.BufferedImage img,
+ java.awt.Color[] originalColors,
+ java.awt.Color[] refillColors,
+ int acceptableDeviation)
+This will replace colors of pixels by new one!
+ |
+
static java.awt.image.BufferedImage |
+ColorFilter(java.awt.image.BufferedImage img,
+ java.util.Map<java.awt.Color,java.awt.Color> colorMappings,
+ int acceptableDeviation)
+This will replace colors of pixels by new one!
+ |
+
static java.awt.image.BufferedImage |
+ColorizeGrayscaleWithColor(java.awt.image.BufferedImage img,
+ java.awt.Color colorizer) |
+
static java.awt.image.BufferedImage |
+ColorizeWithColor(java.awt.image.BufferedImage img,
+ java.awt.Color colorizer) |
+
static boolean |
+CompareIdentity(java.awt.image.BufferedImage img1,
+ java.awt.image.BufferedImage img2,
+ int acceptableDeviation)
+This will compare identity of images.
+ |
+
static float |
+CompareIdentityInPercent(java.awt.image.BufferedImage img1,
+ java.awt.image.BufferedImage img2,
+ int acceptableDeviation)
+This will compare identity of images in percentage.
+ |
+
static java.awt.Rectangle |
+Contains(java.awt.image.BufferedImage source,
+ java.awt.image.BufferedImage toFind) |
+
static java.awt.Rectangle |
+Contains(java.awt.image.BufferedImage source,
+ java.awt.image.BufferedImage toFind,
+ int acceptableDeviation) |
+
static java.awt.Rectangle |
+Contains(java.awt.image.BufferedImage source,
+ java.awt.image.BufferedImage toFind,
+ int acceptableDeviation,
+ int percentage) |
+
static java.awt.image.BufferedImage |
+Copy(java.awt.image.BufferedImage img) |
+
static java.awt.image.BufferedImage |
+Derive(java.awt.image.BufferedImage img,
+ double hueShift,
+ double saturationFactor,
+ double brightnessFactor,
+ double opacityFactor) |
+
static java.awt.image.BufferedImage |
+DifferenceOf(java.awt.image.BufferedImage img1,
+ java.awt.image.BufferedImage img2) |
+
static java.awt.image.BufferedImage |
+FillBackground(java.awt.image.BufferedImage img,
+ java.awt.Color color)
+This will fill background of image with color.
+ |
+
static java.awt.image.BufferedImage |
+FillPixel(java.awt.image.BufferedImage img,
+ int x,
+ int y,
+ java.awt.Color color) |
+
static java.awt.image.BufferedImage |
+Filter(java.awt.image.BufferedImage img,
+ java.awt.Color color,
+ float density)
+This will paint a colored layer over image.
+ |
+
static java.awt.image.BufferedImage |
+Filter(java.awt.image.BufferedImage img,
+ java.awt.Color color,
+ int rule,
+ float density)
+This will paint a color in to image based on rule.
+ |
+
static java.awt.image.BufferedImage |
+FlipHorizontally(java.awt.image.BufferedImage img)
+This will horizontally flip an image.
+ |
+
static java.awt.image.BufferedImage |
+FlipVertically(java.awt.image.BufferedImage img)
+This will vertically flip an image.
+ |
+
static java.awt.image.BufferedImage |
+GetRectImgFrom(java.awt.image.BufferedImage image,
+ java.awt.Rectangle bounds) |
+
static java.awt.image.BufferedImage |
+Grayscale(java.awt.image.BufferedImage img) |
+
static java.awt.image.BufferedImage |
+Interpolate(java.awt.image.BufferedImage original,
+ java.awt.image.BufferedImage overlayer,
+ int interpolationFactor) |
+
static java.awt.image.BufferedImage |
+Invert(java.awt.image.BufferedImage img) |
+
static boolean |
+IsCompletelyOpaque(java.awt.image.BufferedImage img) |
+
static boolean |
+IsImageGrayscaled(java.awt.image.BufferedImage img) |
+
static java.awt.image.BufferedImage |
+Merge(java.awt.image.BufferedImage... imgsToMerge)
+This will merge images in other words draw images from imgsToMerge one over another in order of imgsToMerge array.
+ |
+
static java.awt.image.BufferedImage |
+Merge(java.awt.Composite comp,
+ java.awt.image.BufferedImage... imgsToMerge)
+This will merge images in other words draw images from imgsToMerge one over another in order of imgsToMerge array.
+ |
+
static java.awt.image.BufferedImage |
+Merge(int imageIndex,
+ java.awt.Composite comp,
+ java.awt.image.BufferedImage... imgsToMerge)
+This will merge images in other words draw images from imgsToMerge one over another in order of imgsToMerge array.
+ |
+
static java.awt.image.BufferedImage |
+Resize(java.awt.image.BufferedImage img,
+ double width,
+ double height)
+This will resize an image.
+ |
+
static java.awt.image.BufferedImage |
+Resize(java.awt.image.BufferedImage img,
+ int hints,
+ double width,
+ double height)
+This will resize an image.
+ |
+
static java.awt.image.BufferedImage |
+Rotate(java.awt.image.BufferedImage img,
+ double angle)
+This will rotate image by angle (WORK IN PROGRESS)!
+ |
+
static java.awt.image.BufferedImage |
+SameOf(java.awt.image.BufferedImage img1,
+ java.awt.image.BufferedImage img2) |
+
static java.awt.image.BufferedImage |
+SetAlpha(java.awt.image.BufferedImage img,
+ float alpha)
+This will set alpha (opacity) of image.
+ |
+
static java.awt.image.BufferedImage |
+SmallestImageFrom(java.awt.image.BufferedImage... imgs) |
+
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public static int globalImageType+
BufferedImage.TYPE_4BYTE_ABGR
!public static boolean CompareIdentity(java.awt.image.BufferedImage img1, + java.awt.image.BufferedImage img2, + int acceptableDeviation)+
img1
- | Source image.img2
- | Image to compare.acceptableDeviation
- | This is max acceptable deviation in RGB of pixels on image.public static float CompareIdentityInPercent(java.awt.image.BufferedImage img1, + java.awt.image.BufferedImage img2, + int acceptableDeviation)+
img1
- | Source image.img2
- | Image to compare.acceptableDeviation
- | This is max acceptable deviation in RGB of pixels on image.public static java.awt.image.BufferedImage SameOf(java.awt.image.BufferedImage img1, + java.awt.image.BufferedImage img2)+
img1
- | Image 1.img2
- | Image 2.public static java.awt.image.BufferedImage DifferenceOf(java.awt.image.BufferedImage img1, + java.awt.image.BufferedImage img2)+
img1
- | Image 1.img2
- | Image 2.public static java.awt.image.BufferedImage GetRectImgFrom(java.awt.image.BufferedImage image, + java.awt.Rectangle bounds)+
image
- | Source image.bounds
- | Rectangle consisting position and bounds.public static java.awt.image.BufferedImage Resize(java.awt.image.BufferedImage img, + double width, + double height)+
img
- | Source image.width
- | New width.height
- | New height.BufferedImageUtil#Resize(BufferedImage, BufferedImage.SCALE_FAST, double, double)
public static java.awt.image.BufferedImage Resize(java.awt.image.BufferedImage img, + int hints, + double width, + double height)+
img
- | Source image.hints
- | Flags to indicate the type of algorithm to use for image resize.width
- | New width.height
- | New height.public static java.awt.image.BufferedImage BiggestImageFrom(java.awt.image.BufferedImage... imgs)+
imgs
- | Array of images.public static java.awt.image.BufferedImage SmallestImageFrom(java.awt.image.BufferedImage... imgs)+
imgs
- | Array of images.public static java.awt.image.BufferedImage Merge(java.awt.image.BufferedImage... imgsToMerge)+
imgsToMerge
- | Images to merge.public static java.awt.image.BufferedImage Merge(java.awt.Composite comp, + java.awt.image.BufferedImage... imgsToMerge)+
comp
- | The Composite
to apply before certain image is drawn. This composite will be most likely instance of AlphaComposite
.imgsToMerge
- | Images to merge.public static java.awt.image.BufferedImage Merge(int imageIndex, + java.awt.Composite comp, + java.awt.image.BufferedImage... imgsToMerge)+
imageIndex
- | This is index of image from imgsToMerge array to apply composite before drawing that image and images that are next after it (if there is 0 some composites will not work). Also this index must match bounds of imgsToMerge array.comp
- | The Composite
to apply before certain image is drawn. This composite will be most likely instance of AlphaComposite
.imgsToMerge
- | Images to merge.public static java.awt.image.BufferedImage SetAlpha(java.awt.image.BufferedImage img, + float alpha)+
img
- | Source image.alpha
- | Opacity.public static java.awt.image.BufferedImage FillPixel(java.awt.image.BufferedImage img, + int x, + int y, + java.awt.Color color)+
img
- | Source image.x
- | X position of pixel.y
- | Y position of pixel.color
- | New pixels color.public static java.awt.image.BufferedImage Filter(java.awt.image.BufferedImage img, + java.awt.Color color, + float density)+
img
- | Source image.color
- | Filters color.rule
- | The compositing rule. Example: AlphaComposite.SRC_OVER
density
- | Density of filter (0-1).public static java.awt.image.BufferedImage Filter(java.awt.image.BufferedImage img, + java.awt.Color color, + int rule, + float density)+
img
- | Source image.color
- | Filters color.rule
- | The compositing rule. Example: AlphaComposite.SRC_IN
density
- | Density of filter (0-1).public static java.awt.image.BufferedImage ColorFilter(java.awt.image.BufferedImage img, + java.awt.Color[] originalColors, + java.awt.Color[] refillColors, + int acceptableDeviation)+
img
- | Source image.originalColors
- | Old colors.refillColors
- | Color replacements.acceptableDeviation
- | This is max acceptable deviation in RGB of colors.public static java.awt.image.BufferedImage ColorFilter(java.awt.image.BufferedImage img, + java.util.Map<java.awt.Color,java.awt.Color> colorMappings, + int acceptableDeviation)+
img
- | Source image.colorMappings
- | This is map that should contains keys as colors that you want to replace and values as new variants.acceptableDeviation
- | This is max acceptable deviation in RGB of colors.public static java.awt.image.BufferedImage FillBackground(java.awt.image.BufferedImage img, + java.awt.Color color)+
img
- | Image to fill background.color
- | Color to fill with.public static java.awt.image.BufferedImage FlipHorizontally(java.awt.image.BufferedImage img)+
img
- | Image to flip.public static java.awt.image.BufferedImage FlipVertically(java.awt.image.BufferedImage img)+
img
- | Image to flip.public static java.awt.image.BufferedImage Interpolate(java.awt.image.BufferedImage original, + java.awt.image.BufferedImage overlayer, + int interpolationFactor)+
original
- | Main image.overlayer
- | Image that you want to interpolate/overlay the main one with.interpolationPercentage
- | Percentage/strength of interpolation (0-100).
+ 0 = only original will be visible, 1 = only overlayer will be visible, 0.1-0.9 = combination of both.
+
+ This is not a rule but both images should same dimensions.public static java.awt.image.BufferedImage Rotate(java.awt.image.BufferedImage img, + double angle)+
img
- | Image to rotate.angle
- | Angle to rotate by.public static java.awt.image.BufferedImage ArrayScale(java.awt.image.BufferedImage img, + int width, + int height)+
img
- | Source image.width
- | Width of final image.height
- | Height of final image.public static java.awt.image.BufferedImage ArrayScale(java.awt.image.BufferedImage img, + int width, + int height, + int densityX, + int densityY)+
img
- | Source image.width
- | Width of final image.height
- | Height of final image.densityX
- | How many source images will be drew on x axis (minimal value is 1).densityY
- | How many source images will be drew on h axis (minimal value is 1).public static java.awt.image.BufferedImage Grayscale(java.awt.image.BufferedImage img)+
img
- | Source image.AwtFxUtils.GrayscaleAwt(Color)
public static java.awt.image.BufferedImage Invert(java.awt.image.BufferedImage img)+
img
- | Source image.AwtFxUtils.InvertAwt(Color)
public static java.awt.image.BufferedImage Derive(java.awt.image.BufferedImage img, + double hueShift, + double saturationFactor, + double brightnessFactor, + double opacityFactor)+
img
- | Source image.AwtFxUtils.DeriveAwt(Color, double, double, double, double)
public static java.awt.image.BufferedImage ColorizeWithColor(java.awt.image.BufferedImage img, + java.awt.Color colorizer)+
img
- | Source image.AwtFxUtils.ColorizeAwt(Color, Color)
public static java.awt.image.BufferedImage ColorizeGrayscaleWithColor(java.awt.image.BufferedImage img, + java.awt.Color colorizer)+
img
- | Source image.AwtFxUtils.ColorizeAwt(Color, Color)
public static boolean IsImageGrayscaled(java.awt.image.BufferedImage img)+
AwtFxUtils.IsAwtColorGrayscaled(Color)
public static boolean IsCompletelyOpaque(java.awt.image.BufferedImage img)+
AwtFxUtils.IsAwtColorOpaque(Color)
public static java.awt.Rectangle Contains(java.awt.image.BufferedImage source, + java.awt.image.BufferedImage toFind)+
source
- | Source image to search in!toFind
- | Image to search for!public static java.awt.Rectangle Contains(java.awt.image.BufferedImage source, + java.awt.image.BufferedImage toFind, + int acceptableDeviation)+
source
- | Source image to search in!toFind
- | Image to search for!acceptableDeviation
- | This is max acceptable deviation in RGB of pixels on image.public static java.awt.Rectangle Contains(java.awt.image.BufferedImage source, + java.awt.image.BufferedImage toFind, + int acceptableDeviation, + int percentage)+
source
- | Source image to search in!toFind
- | Image to search for!acceptableDeviation
- | This is max acceptable deviation in RGB of pixels on image.percentage
- | How many percents of "toFind" image must be on source image to consider it as found!public static java.awt.image.BufferedImage Copy(java.awt.image.BufferedImage img)+
img
- | Image to copy.public class FxImageUtil
+extends java.lang.Object
+BufferedImageUtil
, it also calls functions from BufferedImageUtil
but this is converting images to BufferedImages and back.
+ Many of methods in this class needs relatively long time to run and supposed to not be called in loop because they may cause performance problems.Modifier and Type | +Method and Description | +
---|---|
static javafx.scene.image.Image |
+ArrayScale(javafx.scene.image.Image img,
+ int width,
+ int height)
+
+ |
+
static javafx.scene.image.Image |
+ArrayScale(javafx.scene.image.Image img,
+ int width,
+ int height,
+ int densityX,
+ int densityY)
+
+ |
+
static javafx.scene.image.Image |
+BiggestImageFrom(javafx.scene.image.Image... imgs)
+
+ |
+
static javafx.scene.image.Image |
+ColorFilter(javafx.scene.image.Image img,
+ javafx.scene.paint.Color[] originalColors,
+ javafx.scene.paint.Color[] refillColors,
+ int acceptableDeviation)
+
+ |
+
static javafx.scene.image.Image |
+ColorFilter(javafx.scene.image.Image img,
+ java.util.Map<javafx.scene.paint.Color,javafx.scene.paint.Color> colorMappings,
+ int acceptableDeviation)
+
+ |
+
static javafx.scene.image.Image |
+ColorizeGrayscaleWithColor(javafx.scene.image.Image img,
+ javafx.scene.paint.Color colorizer)
+
+ |
+
static javafx.scene.image.Image |
+ColorizeWithColor(javafx.scene.image.Image img,
+ javafx.scene.paint.Color colorizer)
+
+ |
+
static boolean |
+CompareIdentity(javafx.scene.image.Image img1,
+ javafx.scene.image.Image img2,
+ int acceptableDeviation) |
+
static float |
+CompareIdentityInPercent(javafx.scene.image.Image img1,
+ javafx.scene.image.Image img2,
+ int acceptableDeviation) |
+
static java.awt.Rectangle |
+Contains(javafx.scene.image.Image source,
+ javafx.scene.image.Image toFind)
+
+ |
+
static java.awt.Rectangle |
+Contains(javafx.scene.image.Image source,
+ javafx.scene.image.Image toFind,
+ int acceptableDeviation)
+
+ |
+
static java.awt.Rectangle |
+Contains(javafx.scene.image.Image source,
+ javafx.scene.image.Image toFind,
+ int acceptableDeviation,
+ int percentage)
+
+ |
+
static javafx.scene.image.Image |
+Copy(javafx.scene.image.Image img)
+
+ |
+
static javafx.scene.image.Image |
+Derive(javafx.scene.image.Image img,
+ double hueShift,
+ double saturationFactor,
+ double brightnessFactor,
+ double opacityFactor) |
+
static javafx.scene.image.Image |
+DifferenceOf(javafx.scene.image.Image img1,
+ javafx.scene.image.Image img2) |
+
static javafx.scene.image.Image |
+FillBackground(javafx.scene.image.Image img,
+ javafx.scene.paint.Color color)
+
+ |
+
static javafx.scene.image.Image |
+FillPixel(javafx.scene.image.Image img,
+ int x,
+ int y,
+ javafx.scene.paint.Color color)
+
+ |
+
static javafx.scene.image.Image |
+Filter(javafx.scene.image.Image img,
+ javafx.scene.paint.Color color,
+ float density)
+
+ |
+
static javafx.scene.image.Image |
+Filter(javafx.scene.image.Image img,
+ javafx.scene.paint.Color color,
+ int rule,
+ float density)
+
+ |
+
static javafx.scene.image.Image |
+FlipHorizontally(javafx.scene.image.Image img)
+
+ |
+
static javafx.scene.image.Image |
+FlipVertically(javafx.scene.image.Image img)
+
+ |
+
static javafx.scene.image.Image |
+GetRectImgFrom(javafx.scene.image.Image image,
+ java.awt.Rectangle bounds)
+
+ |
+
static javafx.scene.image.Image |
+Grayscale(javafx.scene.image.Image img)
+
+ |
+
static javafx.scene.image.Image |
+Interpolate(javafx.scene.image.Image original,
+ javafx.scene.image.Image overlayer,
+ int interpolationFactor)
+
+ |
+
static javafx.scene.image.Image |
+Invert(javafx.scene.image.Image img)
+
+ |
+
static boolean |
+IsCompletelyOpaque(javafx.scene.image.Image img)
+
+ |
+
static boolean |
+IsImageGrayscaled(javafx.scene.image.Image img)
+
+ |
+
static javafx.scene.image.Image |
+Merge(java.awt.Composite comp,
+ javafx.scene.image.Image... imgsToMerge)
+
+ |
+
static javafx.scene.image.Image |
+Merge(javafx.scene.image.Image... imgsToMerge)
+
+ |
+
static javafx.scene.image.Image |
+Merge(int imageIndex,
+ java.awt.Composite comp,
+ javafx.scene.image.Image... imgsToMerge)
+
+ |
+
static javafx.scene.image.Image |
+Resize(javafx.scene.image.Image img,
+ double width,
+ double height)
+
+ |
+
static javafx.scene.image.Image |
+Resize(javafx.scene.image.Image img,
+ int hints,
+ double width,
+ double height)
+
+ |
+
static javafx.scene.image.Image |
+Rotate(javafx.scene.image.Image img,
+ double angle)
+
+ |
+
static javafx.scene.image.Image |
+SameOf(javafx.scene.image.Image img1,
+ javafx.scene.image.Image img2) |
+
static javafx.scene.image.Image |
+SetAlpha(javafx.scene.image.Image img,
+ float alpha)
+
+ |
+
static javafx.scene.image.Image |
+SmallestImageFrom(javafx.scene.image.Image... imgs)
+
+ |
+
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public static boolean CompareIdentity(javafx.scene.image.Image img1, + javafx.scene.image.Image img2, + int acceptableDeviation)+
BufferedImageUtil#CompareIdentity(BufferedImage, BufferedImage, int)}
public static float CompareIdentityInPercent(javafx.scene.image.Image img1, + javafx.scene.image.Image img2, + int acceptableDeviation)+
BufferedImageUtil#CompareIdentityInPercent(BufferedImage, BufferedImage, int)}
public static javafx.scene.image.Image SameOf(javafx.scene.image.Image img1, + javafx.scene.image.Image img2)+
BufferedImageUtil#SameOf(BufferedImage, BufferedImage)}
public static javafx.scene.image.Image DifferenceOf(javafx.scene.image.Image img1, + javafx.scene.image.Image img2)+
BufferedImageUtil#DifferenceOf(BufferedImage, BufferedImage)}
public static javafx.scene.image.Image GetRectImgFrom(javafx.scene.image.Image image, + java.awt.Rectangle bounds)+ +
public static javafx.scene.image.Image Resize(javafx.scene.image.Image img, + double width, + double height)+ +
public static javafx.scene.image.Image Resize(javafx.scene.image.Image img, + int hints, + double width, + double height)+ +
public static javafx.scene.image.Image SetAlpha(javafx.scene.image.Image img, + float alpha)+ +
public static javafx.scene.image.Image BiggestImageFrom(javafx.scene.image.Image... imgs)+ +
public static javafx.scene.image.Image SmallestImageFrom(javafx.scene.image.Image... imgs)+ +
public static javafx.scene.image.Image Merge(javafx.scene.image.Image... imgsToMerge)+ +
public static javafx.scene.image.Image Merge(java.awt.Composite comp, + javafx.scene.image.Image... imgsToMerge)+ +
public static javafx.scene.image.Image Merge(int imageIndex, + java.awt.Composite comp, + javafx.scene.image.Image... imgsToMerge)+ +
public static javafx.scene.image.Image FillPixel(javafx.scene.image.Image img, + int x, + int y, + javafx.scene.paint.Color color)+ +
public static javafx.scene.image.Image Filter(javafx.scene.image.Image img, + javafx.scene.paint.Color color, + float density)+ +
public static javafx.scene.image.Image Filter(javafx.scene.image.Image img, + javafx.scene.paint.Color color, + int rule, + float density)+ +
public static javafx.scene.image.Image ColorFilter(javafx.scene.image.Image img, + javafx.scene.paint.Color[] originalColors, + javafx.scene.paint.Color[] refillColors, + int acceptableDeviation)+ +
public static javafx.scene.image.Image ColorFilter(javafx.scene.image.Image img, + java.util.Map<javafx.scene.paint.Color,javafx.scene.paint.Color> colorMappings, + int acceptableDeviation)+ +
public static javafx.scene.image.Image FillBackground(javafx.scene.image.Image img, + javafx.scene.paint.Color color)+ +
public static javafx.scene.image.Image FlipHorizontally(javafx.scene.image.Image img)+ +
public static javafx.scene.image.Image FlipVertically(javafx.scene.image.Image img)+ +
public static javafx.scene.image.Image Interpolate(javafx.scene.image.Image original, + javafx.scene.image.Image overlayer, + int interpolationFactor)+ +
public static javafx.scene.image.Image Rotate(javafx.scene.image.Image img, + double angle)+ +
public static javafx.scene.image.Image ArrayScale(javafx.scene.image.Image img, + int width, + int height)+ +
public static javafx.scene.image.Image ArrayScale(javafx.scene.image.Image img, + int width, + int height, + int densityX, + int densityY)+ +
public static javafx.scene.image.Image Grayscale(javafx.scene.image.Image img)+ +
public static javafx.scene.image.Image Invert(javafx.scene.image.Image img)+ +
public static javafx.scene.image.Image Derive(javafx.scene.image.Image img, + double hueShift, + double saturationFactor, + double brightnessFactor, + double opacityFactor)+
public static javafx.scene.image.Image ColorizeWithColor(javafx.scene.image.Image img, + javafx.scene.paint.Color colorizer)+ +
public static javafx.scene.image.Image ColorizeGrayscaleWithColor(javafx.scene.image.Image img, + javafx.scene.paint.Color colorizer)+ +
public static boolean IsImageGrayscaled(javafx.scene.image.Image img)+ +
public static boolean IsCompletelyOpaque(javafx.scene.image.Image img)+ +
public static java.awt.Rectangle Contains(javafx.scene.image.Image source, + javafx.scene.image.Image toFind)+ +
public static java.awt.Rectangle Contains(javafx.scene.image.Image source, + javafx.scene.image.Image toFind, + int acceptableDeviation)+ +
public static java.awt.Rectangle Contains(javafx.scene.image.Image source, + javafx.scene.image.Image toFind, + int acceptableDeviation, + int percentage)+ +
public static javafx.scene.image.Image Copy(javafx.scene.image.Image img)+ +
Modifier and Type | +Method and Description | +
---|---|
static javafx.scene.image.Image |
+AwtFxUtils.EditFxAsAwtImage(javafx.scene.image.Image img,
+ AwtFxUtils.BufferedImageEditor editor) |
+
Interface | +Description | +
---|---|
AwtFxUtils.BufferedImageEditor | +
+ This is used in
+AwtFxUtils#EditFxAsAwtImage(Image, AwtImageEditor)
+ Write your editing code to edit method!
+ For example: |
+
AwtFxUtils.FxImageEditor | +
+ This is used in sister library called Texture!
+ Write your editing code to edit method!
+ For example:
+ |
+
Class | +Description | +
---|---|
AwtFxUtils | +
+ This class contains mainly converting methods.
+ |
+
BufferedImageUtil | +
+ This utility class contains powerful tools to work with
+BufferedImage !
+ Many of methods in this class needs relatively long time to run and supposed to not be called in loop because they may cause performance problems. |
+
FxImageUtil | +
+ This class contains exactly same functions as
+BufferedImageUtil , it also calls functions from BufferedImageUtil but this is converting images to BufferedImages and back. |
+
Class and Description | +
---|
AwtFxUtils.BufferedImageEditor
+ This is used in
+AwtFxUtils#EditFxAsAwtImage(Image, AwtImageEditor)
+ Write your editing code to edit method!
+ For example: |
+
Each package has a page that contains a list of its classes and interfaces, with a summary for each. This page can contain six categories:
+Each class, interface, nested class and nested interface has its own separate page. Each of these pages has three sections consisting of a class/interface description, summary tables, and detailed member descriptions:
+Each summary entry contains the first sentence from the detailed description for that item. The summary entries are alphabetical, while the detailed descriptions are in the order they appear in the source code. This preserves the logical groupings established by the programmer.
+Each annotation type has its own separate page with the following sections:
+Each enum has its own separate page with the following sections:
+Each documented package, class and interface has its own Use page. This page describes what packages, classes, methods, constructors and fields use any part of the given class or package. Given a class or interface A, its Use page includes subclasses of A, fields declared as A, methods that return A, and methods and constructors with parameters of type A. You can access this page by first going to the package, class or interface, then clicking on the "Use" link in the navigation bar.
+There is a Class Hierarchy page for all packages, plus a hierarchy for each package. Each hierarchy page contains a list of classes and a list of interfaces. The classes are organized by inheritance structure starting with java.lang.Object
. The interfaces do not inherit from java.lang.Object
.
The Deprecated API page lists all of the API that have been deprecated. A deprecated API is not recommended for use, generally due to improvements, and a replacement API is usually given. Deprecated APIs may be removed in future implementations.
+The Index contains an alphabetic list of all classes, interfaces, constructors, methods, and fields.
+These links take you to the next or previous class, interface, package, or related page.
+These links show and hide the HTML frames. All pages are available with or without frames.
+The All Classes link shows all classes and interfaces except non-static nested types.
+Each serializable or externalizable class has a description of its serialization fields and methods. This information is of interest to re-implementors, not to developers using the API. While there is no link in the navigation bar, you can get to this information by going to any serialized class and clicking "Serialized Form" in the "See also" section of the class description.
+The Constant Field Values page lists the static final fields and their values.
+AwtFxUtils.FxImageEditor
!AwtFxUtils.FxImageEditor
!public class Animation
+extends java.lang.Object
+implements java.lang.Cloneable
++ Primary goal of Texture is ability to animate image, automatically finds out length and type of animation (horizontal or vertical). + The goal has been accomplished very well! Only problem is that all frames must have the same width and height. For example 32*160 image = 5 frames long animation. + If Texture can't finds out length or type of animation (for example 11*59 image) it is unable to animate it. In this case it creates one frame long animation which consist of image from constructor (see ImageToFrames method). + The same thing will happen if you insert for example 40*40 image, what mean one frame long animation. +
++ This is also able to animate textures from a lot of different games such as Minecraft. +
Type | +Property and Description | +
---|---|
javafx.beans.property.SimpleIntegerProperty |
+CurrentFrame |
+
javafx.beans.property.SimpleDoubleProperty |
+Speed |
+
Constructor and Description | +
---|
Animation(javafx.scene.image.Image[] frames,
+ int... framesOrder)
+Create new instance of Texture.
+ |
+
Animation(javafx.scene.image.Image[] frames,
+ int frameTime,
+ boolean autoRepeat,
+ int... framesOrder)
+Create new instance of Texture.
+ |
+
Animation(javafx.scene.image.Image[] frames,
+ int reachableLentgh,
+ int frameTime,
+ boolean autoRepeat,
+ int... framesOrder)
+Create new instance of Texture.
+ |
+
Animation(javafx.scene.image.Image img,
+ int... framesOrder)
+Create new instance of Texture.
+ |
+
Animation(javafx.scene.image.Image img,
+ int frameTime,
+ boolean autoRepeat,
+ int... framesOrder)
+Create new instance of Texture.
+ |
+
Animation(javafx.scene.image.Image img,
+ int reachableLentgh,
+ int frameTime,
+ boolean autoRepeat,
+ int... framesOrder)
+Create new instance of Texture.
+ |
+
Modifier and Type | +Method and Description | +
---|---|
int |
+AnimationLength() |
+
javafx.scene.image.Image[] |
+AvailableFrames() |
+
Animation |
+clone() |
+
boolean |
+ContainsFrame(javafx.scene.image.Image frame) |
+
Animation |
+CreateComprimatedVersion() |
+
int |
+CurrentFrame() |
+
javafx.beans.property.SimpleIntegerProperty |
+CurrentFrameProperty() |
+
double |
+CurrentTicks() |
+
void |
+EditEach(ugp.org.GraphicsManipulatior.AwtFxUtils.FxImageEditor edit)
+Loop through every available frame while editing it via code in
+AwtFxUtils.FxImageEditor ! |
+
boolean |
+equals(java.lang.Object obj) |
+
javafx.scene.image.Image |
+FirstFrame() |
+
int[] |
+FramesOrder() |
+
static javafx.scene.image.Image |
+FramesToImage(boolean vertical,
+ javafx.scene.image.Image... frames) |
+
static javafx.scene.image.Image |
+FramesToImage(javafx.scene.image.Image... frames) |
+
int |
+FrameTime() |
+
java.util.List<java.lang.Runnable> |
+GetOnFinished() |
+
javafx.scene.image.Image |
+GetRawTexture() |
+
double |
+GetSpeed() |
+
javafx.scene.image.Image |
+Grab() |
+
javafx.scene.image.Image |
+GrabAnimationFrame(int frameIndex) |
+
javafx.scene.image.Image |
+GrabFrame(int frameIndex) |
+
javafx.scene.image.Image |
+GrabRectFromRaw(java.awt.Rectangle bounds) |
+
static javafx.scene.image.Image[] |
+ImageToFrames(javafx.scene.image.Image inputImage) |
+
boolean |
+IsAutoRepeating() |
+
boolean |
+IsFinished() |
+
boolean |
+IsOnStart() |
+
javafx.scene.image.Image |
+LastFrame() |
+
int |
+Length() |
+
void |
+NextFrame()
+Animation jumps on next frame if current frame is not last one.
+ |
+
void |
+PreviousFrame()
+Animation returns on previous frame if current frame is not first one.
+ |
+
int |
+ReachableLentgh() |
+
void |
+Repeat()
+The animation will cut on current frame and starts from the beginning.
+ |
+
void |
+Reverse()
+This make animation runs conversely.
+ |
+
void |
+SetAutoRepeat(boolean newAutoRepeat) |
+
void |
+SetCurrentFrame(int frame) |
+
void |
+SetFramesOrder(int... framesOrder) |
+
void |
+SetFrameTime(int frameTime)
+Set the frameTime value, that is how many ticks will be each frame showed before animation jumps on next one (greater number = slower animation)
+ |
+
void |
+SetReachableLentgh(int reachableLentgh)
+Set the reachableLentgh value, that is max reachable frame index that animation can reach (0 is also number).
+ |
+
void |
+SetSpeed(double speed) |
+
javafx.beans.property.SimpleDoubleProperty |
+SpeedProperty() |
+
java.lang.String |
+toString() |
+
boolean |
+Update()
+Update this animation.
+ |
+
getClass, hashCode, notify, notifyAll, wait, wait, wait
public javafx.beans.property.SimpleIntegerProperty CurrentFrameProperty+
public javafx.beans.property.SimpleDoubleProperty SpeedProperty+
public Animation(javafx.scene.image.Image img, + int... framesOrder)+
img
- | Texture source or in other words image you want to animate (All frames in image must have same dimensions).framesOrder
- | Order of frames or in other words array of ints that every int represents index of frame. Each frame can be also used more times, it means final animation can be longer or shorter than the original one!
+ For example, I have 11 frames long ani and I set this on new int[] {0, 0, 1, 2, 0} and I get the animation in order, first frame, second frame, third frame and first frame (0 = first frame because in arrays 0 means first pattern).public Animation(javafx.scene.image.Image img, + int frameTime, + boolean autoRepeat, + int... framesOrder)+
img
- | Texture source or in other words image you want to animate (All frames in image must have same dimensions).
+ or set on false and animation will stuck on last frame after one cycle.frameTime
- | This is how many ticks will be each frame showed before animation jumps on next one (greater number = slower animation)autoRepeat
- | Set on true and animation will automatically repeat (starts from beginning) after reaching the last frame.framesOrder
- | Order of frames or in other words array of ints that every int represents index of frame. Each frame can be also used more times, it means final animation can be longer or shorter than the original one!
+ For example, I have 11 frames long ani and I set this on new int[] {0, 0, 1, 2, 0} and I get the animation in order, first frame, second frame, third frame and first frame (0 = first frame because in arrays 0 means first pattern).public Animation(javafx.scene.image.Image img, + int reachableLentgh, + int frameTime, + boolean autoRepeat, + int... framesOrder)+
img
- | Texture source or in other words image you want to animate (All frames in image must have same dimensions).
+ or set on false and animation will stuck on last frame after one cycle.reachableLentgh
- | Max reachable frame that animation can reach (0 is also number). For example, I have 20 frames long ani and I set this on 9, after reaching 9th frame animation will repeats or stops.frameTime
- | That is how many ticks will be each frame showed before animation jumps on next one (greater number = slower animation)autoRepeat
- | Set on true and animation will automatically repeat (starts from beginning) after reaching the last frame.framesOrder
- | Order of frames or in other words array of ints that every int represents index of frame. Each frame can be also used more times, it means final animation can be longer or shorter than the original one!
+ For example, I have 11 frames long ani and I set this on new int[] {0, 0, 1, 2, 0} and I get the animation in order, first frame, second frame, third frame and first frame (0 = first frame because in arrays 0 means first pattern).public Animation(javafx.scene.image.Image[] frames, + int... framesOrder)+
frames
- | Array of animation's frames (In this case frames don't have to have same dimensions).framesOrder
- | Order of frames or in other words array of ints that every int represents index of frame. Each frame can be also used more times, it means final animation can be longer or shorter than the original one!
+ For example, I have 11 frames long ani and I set this on new int[] {0, 0, 1, 2, 0} and I get the animation in order, first frame, second frame, third frame and first frame (0 = first frame because in arrays 0 means first pattern).public Animation(javafx.scene.image.Image[] frames, + int frameTime, + boolean autoRepeat, + int... framesOrder)+
frames
- | Array of animation's frames (In this case frames don't have to have same dimensions).
+ or set on false and animation will stuck on last frame after one cycle.frameTime
- | This is how many ticks will be each frame showed before animation jumps on next one (greater number = slower animation)autoRepeat
- | Set on true and animation will automatically repeat (starts from beginning) after reaching the last frame.framesOrder
- | Order of frames or in other words array of ints that every int represents index of frame. Each frame can be also used more times, it means final animation can be longer or shorter than the original one!
+ For example, I have 11 frames long ani and I set this on new int[] {0, 0, 1, 2, 0} and I get the animation in order, first frame, second frame, third frame and first frame (0 = first frame because in arrays 0 means first pattern).public Animation(javafx.scene.image.Image[] frames, + int reachableLentgh, + int frameTime, + boolean autoRepeat, + int... framesOrder)+
frames
- | Array of animation's frames (In this case frames don't have to have same dimensions).
+ or set on false and animation will stuck on last frame after one cycle.reachableLentgh
- | Max reachable frame that animation can reach (0 is also number). For example, I have 20 frames long ani and I set this on 9, after reaching 9th frame animation will repeats or stops.frameTime
- | This is how many ticks will be each frame showed before animation jumps on next one (greater number = slower animation)autoRepeat
- | Set on true and animation will automatically repeat (starts from beginning) after reaching the last frame.framesOrder
- | Order of frames or in other words array of ints that every int represents index of frame. Each frame can be also used more times, it means final animation can be longer or shorter than the original one!
+ For example, I have 11 frames long ani and I set this on new int[] {0, 0, 1, 2, 0} and I get the animation in order, first frame, second frame, third frame and first frame (0 = first frame because in arrays 0 means first pattern).public Animation clone()+
clone
in class java.lang.Object
public boolean equals(java.lang.Object obj)+
equals
in class java.lang.Object
Animation
- object to compare.public java.lang.String toString()+
toString
in class java.lang.Object
public boolean Update()+
AnimationLength()
is greater than 1.public Animation CreateComprimatedVersion()+
public javafx.scene.image.Image LastFrame()+
public javafx.scene.image.Image FirstFrame()+
public javafx.scene.image.Image Grab()+
Update()
method).public javafx.scene.image.Image GrabAnimationFrame(int frameIndex)+
frame
- | Index of required frame (0 is also number).public javafx.scene.image.Image GrabFrame(int frameIndex)+
frame
- | Index of required frame (0 is also number).public javafx.scene.image.Image[] AvailableFrames()+
public javafx.scene.image.Image GetRawTexture()+
public void Reverse()+
public void NextFrame()+
public void PreviousFrame()+
public void SetCurrentFrame(int frame)+
frame
- | Sets animation on required frame (0 is also number).public void Repeat()+
public void SetFramesOrder(int... framesOrder)+
framesOrder
- | Order of frames or in other words array of ints that every int represents index of frame (minimal possible index = 0 and maximal possible index = Length()-1
).
+ Each frame can be also used more times, it means final animation can be longer or shorter than the original one!
+ For example, I have 11 frames long ani and I set this on new int[] {0, 0, 1, 2, 0} and I get the animation in order, first frame, second frame, third frame and first frame (0 = first frame because in arrays 0 means first pattern).public int[] FramesOrder()+
public void SetReachableLentgh(int reachableLentgh)+
AnimationLength()
-1) is!reachableLentgh
- | Value to set.public boolean ContainsFrame(javafx.scene.image.Image frame)+
frame
- | The frame.public void SetFrameTime(int frameTime)+
frameTime
- | Value to set.public int ReachableLentgh()+
public int FrameTime()+
public double CurrentTicks()+
FrameTime()
animation will move on next frame while setting this value on 0 and whole process will repeat.public javafx.beans.property.SimpleIntegerProperty CurrentFrameProperty()+
public void SetAutoRepeat(boolean newAutoRepeat)+
newAutoRepeat
- | New auto repeat value.
+ Set on true and animation will automatically repeat (starts from beginning) after reaching the last frame.public boolean IsAutoRepeating()+
Repeat()
is called or current frame is set.public boolean IsFinished()+
public boolean IsOnStart()+
public java.util.List<java.lang.Runnable> GetOnFinished()+
Update()
or IsFinished()
must be called to run this.public int CurrentFrame()+
public int Length()+
AvailableFrames()
.length).
+ If you do not change reachable length and frames order of animation than we can say that AnimationLength()
-1 equals Length()
-1 equals ReachableLentgh()
.public int AnimationLength()+
AnimationLength()
-1 equals Length()
-1 equals ReachableLentgh()
.public javafx.scene.image.Image GrabRectFromRaw(java.awt.Rectangle bounds)+
bounds
- | Rectangle with X, Y, Width and Height parameters.public void SetSpeed(double speed)+
speed
- | New animation speed multiplier value to be set;public double GetSpeed()+
public javafx.beans.property.SimpleDoubleProperty SpeedProperty()+
public void EditEach(ugp.org.GraphicsManipulatior.AwtFxUtils.FxImageEditor edit)+
AwtFxUtils.FxImageEditor
!edit
- | FxImageEditor to edit each available frame!public static javafx.scene.image.Image[] ImageToFrames(javafx.scene.image.Image inputImage)+
inputImage
- | Image to turn in to frames.public static javafx.scene.image.Image FramesToImage(javafx.scene.image.Image... frames)+
frames
- | Frames to turn in to image.public static javafx.scene.image.Image FramesToImage(boolean vertical, + javafx.scene.image.Image... frames)+
frames
- | Frames to turn in to image.public class Texture +extends javafx.scene.image.ImageView +implements java.lang.Iterable<Animation>, java.lang.Cloneable+
+ This class is for easily visualizing one our multiple Animation objects. +
fitHeightProperty, fitWidthProperty, imageProperty, preserveRatioProperty, smoothProperty, viewportProperty, xProperty, yProperty
accessibleHelpProperty, accessibleRoleDescriptionProperty, accessibleRoleProperty, accessibleTextProperty, blendModeProperty, boundsInLocalProperty, boundsInParentProperty, cacheHintProperty, cacheProperty, clipProperty, cursorProperty, depthTestProperty, disabledProperty, disableProperty, effectiveNodeOrientationProperty, effectProperty, eventDispatcherProperty, focusedProperty, focusTraversableProperty, hoverProperty, idProperty, impl_showMnemonicsProperty, inputMethodRequestsProperty, layoutBoundsProperty, layoutXProperty, layoutYProperty, localToParentTransformProperty, localToSceneTransformProperty, managedProperty, mouseTransparentProperty, nodeOrientationProperty, onContextMenuRequestedProperty, onDragDetectedProperty, onDragDoneProperty, onDragDroppedProperty, onDragEnteredProperty, onDragExitedProperty, onDragOverProperty, onInputMethodTextChangedProperty, onKeyPressedProperty, onKeyReleasedProperty, onKeyTypedProperty, onMouseClickedProperty, onMouseDragEnteredProperty, onMouseDragExitedProperty, onMouseDraggedProperty, onMouseDragOverProperty, onMouseDragReleasedProperty, onMouseEnteredProperty, onMouseExitedProperty, onMouseMovedProperty, onMousePressedProperty, onMouseReleasedProperty, onRotateProperty, onRotationFinishedProperty, onRotationStartedProperty, onScrollFinishedProperty, onScrollProperty, onScrollStartedProperty, onSwipeDownProperty, onSwipeLeftProperty, onSwipeRightProperty, onSwipeUpProperty, onTouchMovedProperty, onTouchPressedProperty, onTouchReleasedProperty, onTouchStationaryProperty, onZoomFinishedProperty, onZoomProperty, onZoomStartedProperty, opacityProperty, parentProperty, pickOnBoundsProperty, pressedProperty, rotateProperty, rotationAxisProperty, scaleXProperty, scaleYProperty, scaleZProperty, sceneProperty, styleProperty, translateXProperty, translateYProperty, translateZProperty, visibleProperty
Modifier and Type | +Field and Description | +
---|---|
com.sun.javafx.collections.ObservableListWrapper<Animation> |
+layers |
+
SMOOTH_DEFAULT
BASELINE_OFFSET_SAME_AS_HEIGHT
Constructor and Description | +
---|
Texture(java.util.List<Animation> layers)
+Create new instance.
+ |
+
Texture(java.util.List<Animation> layers,
+ int upscalingF)
+Create new instance.
+ |
+
Texture(java.util.List<Animation> layers,
+ int upscalingF,
+ boolean dynamicScaling)
+Create new instance.
+ |
+
Texture(java.lang.Object... layers)
+Create new instance.
+ |
+
Modifier and Type | +Method and Description | +
---|---|
java.util.List<java.lang.Object> |
+AddAllFrom(java.lang.Object... layers) |
+
java.lang.Object |
+AddFrom(java.lang.Object layer)
+Add Animation from object.
+ |
+
void |
+AddOnFinishedForAll(java.lang.Runnable onFinished) |
+
Texture |
+clone() |
+
void |
+DoScale()
+This function is scaling individual layers via upscalingFactor.
+ |
+
void |
+EditEachInAll(ugp.org.GraphicsManipulatior.AwtFxUtils.FxImageEditor edit)
+Loop through every available frame in every Animation in this Texture while editing it via code in
+AwtFxUtils.FxImageEditor ! |
+
boolean |
+equals(java.lang.Object o) |
+
void |
+fitSize(double w,
+ double h) |
+
javafx.geometry.Point2D |
+getBiggestOriginalSizes() |
+
Animation |
+GetLongestAnimation() |
+
java.util.List<javafx.geometry.Point2D> |
+getOriginalSizes() |
+
int |
+getUpscalingFactor()
+Upscaling is highly increasing textures resolution when you increase its fitWidth or fitHeight property.
+ |
+
boolean |
+IsAllFinished() |
+
boolean |
+IsAllOnStart() |
+
boolean |
+isDynamicScaling() |
+
java.util.Iterator<Animation> |
+iterator() |
+
void |
+RemoveOnFinishedForAll(java.lang.Runnable onFinished) |
+
void |
+Repaint()
+This will insert merged image from all Animations to ImageView.
+ |
+
void |
+RepeatAll()
+This will repeat all animations.
+ |
+
void |
+ReverseAll()
+This will reverse all animations.
+ |
+
void |
+SetAutoRepeatForAll(boolean autoRepeat) |
+
void |
+setDynamicScaling(boolean dynamicScaling) |
+
void |
+SetFrameTimeForAll(int frameTime)
+This will set frameTime for all animations.
+ |
+
void |
+SetSpeedForAll(double speed) |
+
void |
+setUpscalingFactor(int upscalingF)
+Upscaling is highly increasing textures resolution when you increase its fitWidth or fitHeight property.
+ |
+
java.lang.String |
+toString() |
+
boolean |
+Update()
+This will update and all Animations.
+ |
+
fitHeightProperty, fitWidthProperty, getClassCssMetaData, getCssMetaData, getFitHeight, getFitWidth, getImage, getViewport, getX, getY, imageProperty, impl_computeGeomBounds, impl_processMXNode, impl_updatePeer, isPreserveRatio, isSmooth, preserveRatioProperty, setFitHeight, setFitWidth, setImage, setPreserveRatio, setSmooth, setViewport, setX, setY, smoothProperty, viewportProperty, xProperty, yProperty
accessibleHelpProperty, accessibleRoleDescriptionProperty, accessibleRoleProperty, accessibleTextProperty, addEventFilter, addEventHandler, applyCss, autosize, blendModeProperty, boundsInLocalProperty, boundsInParentProperty, buildEventDispatchChain, cacheHintProperty, cacheProperty, clipProperty, computeAreaInScreen, contains, contains, cursorProperty, depthTestProperty, disabledProperty, disableProperty, effectiveNodeOrientationProperty, effectProperty, eventDispatcherProperty, executeAccessibleAction, fireEvent, focusedProperty, focusTraversableProperty, getAccessibleHelp, getAccessibleRole, getAccessibleRoleDescription, getAccessibleText, getBaselineOffset, getBlendMode, getBoundsInLocal, getBoundsInParent, getCacheHint, getClip, getContentBias, getCursor, getDepthTest, getEffect, getEffectiveNodeOrientation, getEventDispatcher, getId, getInputMethodRequests, getLayoutBounds, getLayoutX, getLayoutY, getLocalToParentTransform, getLocalToSceneTransform, getNodeOrientation, getOnContextMenuRequested, getOnDragDetected, getOnDragDone, getOnDragDropped, getOnDragEntered, getOnDragExited, getOnDragOver, getOnInputMethodTextChanged, getOnKeyPressed, getOnKeyReleased, getOnKeyTyped, getOnMouseClicked, getOnMouseDragEntered, getOnMouseDragExited, getOnMouseDragged, getOnMouseDragOver, getOnMouseDragReleased, getOnMouseEntered, getOnMouseExited, getOnMouseMoved, getOnMousePressed, getOnMouseReleased, getOnRotate, getOnRotationFinished, getOnRotationStarted, getOnScroll, getOnScrollFinished, getOnScrollStarted, getOnSwipeDown, getOnSwipeLeft, getOnSwipeRight, getOnSwipeUp, getOnTouchMoved, getOnTouchPressed, getOnTouchReleased, getOnTouchStationary, getOnZoom, getOnZoomFinished, getOnZoomStarted, getOpacity, getParent, getProperties, getPseudoClassStates, getRotate, getRotationAxis, getScaleX, getScaleY, getScaleZ, getScene, getStyle, getStyleableParent, getStyleClass, getTransforms, getTranslateX, getTranslateY, getTranslateZ, getTypeSelector, getUserData, hasProperties, hoverProperty, idProperty, impl_findStyles, impl_getLeafTransform, impl_getMatchingStyles, impl_getPeer, impl_getPivotX, impl_getPivotY, impl_getPivotZ, impl_getStyleMap, impl_hasTransforms, impl_isShowMnemonics, impl_isTreeVisible, impl_pickNode, impl_processCSS, impl_reapplyCSS, impl_setShowMnemonics, impl_setStyleMap, impl_showMnemonicsProperty, impl_syncPeer, impl_transformsChanged, impl_traverse, inputMethodRequestsProperty, intersects, intersects, isCache, isDisable, isDisabled, isFocused, isFocusTraversable, isHover, isManaged, isMouseTransparent, isPickOnBounds, isPressed, isResizable, isVisible, layoutBoundsProperty, layoutXProperty, layoutYProperty, localToParent, localToParent, localToParent, localToParent, localToParent, localToParentTransformProperty, localToScene, localToScene, localToScene, localToScene, localToScene, localToScene, localToScene, localToScene, localToScene, localToScene, localToSceneTransformProperty, localToScreen, localToScreen, localToScreen, localToScreen, localToScreen, lookup, lookupAll, managedProperty, maxHeight, maxWidth, minHeight, minWidth, mouseTransparentProperty, nodeOrientationProperty, notifyAccessibleAttributeChanged, onContextMenuRequestedProperty, onDragDetectedProperty, onDragDoneProperty, onDragDroppedProperty, onDragEnteredProperty, onDragExitedProperty, onDragOverProperty, onInputMethodTextChangedProperty, onKeyPressedProperty, onKeyReleasedProperty, onKeyTypedProperty, onMouseClickedProperty, onMouseDragEnteredProperty, onMouseDragExitedProperty, onMouseDraggedProperty, onMouseDragOverProperty, onMouseDragReleasedProperty, onMouseEnteredProperty, onMouseExitedProperty, onMouseMovedProperty, onMousePressedProperty, onMouseReleasedProperty, onRotateProperty, onRotationFinishedProperty, onRotationStartedProperty, onScrollFinishedProperty, onScrollProperty, onScrollStartedProperty, onSwipeDownProperty, onSwipeLeftProperty, onSwipeRightProperty, onSwipeUpProperty, onTouchMovedProperty, onTouchPressedProperty, onTouchReleasedProperty, onTouchStationaryProperty, onZoomFinishedProperty, onZoomProperty, onZoomStartedProperty, opacityProperty, parentProperty, parentToLocal, parentToLocal, parentToLocal, parentToLocal, parentToLocal, pickOnBoundsProperty, prefHeight, prefWidth, pressedProperty, pseudoClassStateChanged, queryAccessibleAttribute, relocate, removeEventFilter, removeEventHandler, requestFocus, resize, resizeRelocate, rotateProperty, rotationAxisProperty, scaleXProperty, scaleYProperty, scaleZProperty, sceneProperty, sceneToLocal, sceneToLocal, sceneToLocal, sceneToLocal, sceneToLocal, sceneToLocal, sceneToLocal, sceneToLocal, screenToLocal, screenToLocal, screenToLocal, setAccessibleHelp, setAccessibleRole, setAccessibleRoleDescription, setAccessibleText, setBlendMode, setCache, setCacheHint, setClip, setCursor, setDepthTest, setDisable, setEffect, setEventDispatcher, setFocusTraversable, setId, setInputMethodRequests, setLayoutX, setLayoutY, setManaged, setMouseTransparent, setNodeOrientation, setOnContextMenuRequested, setOnDragDetected, setOnDragDone, setOnDragDropped, setOnDragEntered, setOnDragExited, setOnDragOver, setOnInputMethodTextChanged, setOnKeyPressed, setOnKeyReleased, setOnKeyTyped, setOnMouseClicked, setOnMouseDragEntered, setOnMouseDragExited, setOnMouseDragged, setOnMouseDragOver, setOnMouseDragReleased, setOnMouseEntered, setOnMouseExited, setOnMouseMoved, setOnMousePressed, setOnMouseReleased, setOnRotate, setOnRotationFinished, setOnRotationStarted, setOnScroll, setOnScrollFinished, setOnScrollStarted, setOnSwipeDown, setOnSwipeLeft, setOnSwipeRight, setOnSwipeUp, setOnTouchMoved, setOnTouchPressed, setOnTouchReleased, setOnTouchStationary, setOnZoom, setOnZoomFinished, setOnZoomStarted, setOpacity, setPickOnBounds, setRotate, setRotationAxis, setScaleX, setScaleY, setScaleZ, setStyle, setTranslateX, setTranslateY, setTranslateZ, setUserData, setVisible, snapshot, snapshot, startDragAndDrop, startFullDrag, styleProperty, toBack, toFront, translateXProperty, translateYProperty, translateZProperty, usesMirroring, visibleProperty
getClass, hashCode, notify, notifyAll, wait, wait, wait
forEach, spliterator
public final com.sun.javafx.collections.ObservableListWrapper<Animation> layers+
public Texture(java.lang.Object... layers)+
layers
- | Array of objects to create Texture from. Supported objects are: Animation
, Image
, String
, InputStream
!public Texture(java.util.List<Animation> layers)+
layers
- | Objects to create Texture from. Supported objects are: Animation
, Image
, String
, InputStream
!public Texture(java.util.List<Animation> layers, + int upscalingF)+
layers
- | Layers
object to create Texture from.upScalingF
- | New value of "Upscaling factor".
+ Upscaling is highly increasing textures resolution when you increase its fitWidth or fitHeight property.
+ "Upscaling factor" is the value by which is the fitWidth and fitHeight multiplied by.
+ Recommended: Do not set this on more than 2!public Texture(java.util.List<Animation> layers, + int upscalingF, + boolean dynamicScaling)+
layers
- | Layers
object to create Texture from.upScalingF
- | New value of "Upscaling factor".
+ Upscaling is highly increasing textures resolution when you increase its fitWidth or fitHeight property.
+ "Upscaling factor" is the value by which is the fitWidth and fitHeight multiplied by.
+ Recommended: Do not set this on more than 2!dynamicScaling
- | Set this on true and all layers will be resized always when fitWidth or fitHeight changed.
+ Set this on false if this Texture object will be resized frequently to save CPU time.
+ Note: All newly added layers will be resized even if this is false.public Texture clone()+
clone
in class java.lang.Object
public boolean equals(java.lang.Object o)+
equals
in class java.lang.Object
public java.lang.String toString()+
toString
in class javafx.scene.Node
public java.util.Iterator<Animation> iterator()+
iterator
in interface java.lang.Iterable<Animation>
public void Repaint()+
public void DoScale()+
public void fitSize(double w, + double h)+
w
- | Fit width to set.h
- | Fit height to set.public void ReverseAll()+
public void RepeatAll()+
public void SetFrameTimeForAll(int frameTime)+
frameTime
- | Frame time value to set.public Animation GetLongestAnimation()+
public boolean IsAllFinished()+
public boolean IsAllOnStart()+
public void SetAutoRepeatForAll(boolean autoRepeat)+
autoRepeat
- | Auto repeat parameter for all layer/Animation in this texture.public void AddOnFinishedForAll(java.lang.Runnable onFinished)+
onFinished
- | On finished Runnable that will be called if layers/Animation in this texture finished (will be on last frame).public void RemoveOnFinishedForAll(java.lang.Runnable onFinished)+
onFinished
- | On finished Runnable that will removed from every layers/Animation in this texture if contains.public void SetSpeedForAll(double speed)+
speed
- | New speed multiplier value to set for each Animation in this texture;public void EditEachInAll(ugp.org.GraphicsManipulatior.AwtFxUtils.FxImageEditor edit)+
AwtFxUtils.FxImageEditor
!edit
- | FxImageEditor to use!public boolean Update()+
public java.lang.Object AddFrom(java.lang.Object layer)+
layer
- | Array of objects to create Texture from. Supported objects are: Animation
, Image
, String
, InputStream
!
+ Image means image to create animation from.
+ String is path to image to create animation from.
+ InputStream is InputStream object to create image for animation from.public java.util.List<java.lang.Object> AddAllFrom(java.lang.Object... layers)+
public int getUpscalingFactor()+
public void setUpscalingFactor(int upscalingF)+
upScalingF
- | New value of "Upscaling factor".public boolean isDynamicScaling()+
public void setDynamicScaling(boolean dynamicScaling)+
dynamicScaling
- | Set this on true and all layers will be resized always when fitWidth or fitHeight changed.
+ Set this on false if this Texture object will be resized frequently to save CPU time.
+
+ Note: All newly added layers will be resized even if this is false.public java.util.List<javafx.geometry.Point2D> getOriginalSizes()+
public javafx.geometry.Point2D getBiggestOriginalSizes()+
Modifier and Type | +Field and Description | +
---|---|
com.sun.javafx.collections.ObservableListWrapper<Animation> |
+Texture.layers |
+
Modifier and Type | +Method and Description | +
---|---|
Animation |
+Animation.clone() |
+
Animation |
+Animation.CreateComprimatedVersion() |
+
Animation |
+Texture.GetLongestAnimation() |
+
Modifier and Type | +Method and Description | +
---|---|
java.util.Iterator<Animation> |
+Texture.iterator() |
+
Constructor and Description | +
---|
Texture(java.util.List<Animation> layers)
+Create new instance.
+ |
+
Texture(java.util.List<Animation> layers,
+ int upscalingF)
+Create new instance.
+ |
+
Texture(java.util.List<Animation> layers,
+ int upscalingF,
+ boolean dynamicScaling)
+Create new instance.
+ |
+
Modifier and Type | +Method and Description | +
---|---|
Texture |
+Texture.clone() |
+
Class | +Description | +
---|---|
Animation | +
+
+ Primary goal of Texture is ability to animate image, automatically finds out length and type of animation (horizontal or vertical).
+ |
+
Texture | +
+
+ This class is for easily visualizing one our multiple Animation objects.
+ |
+
Class and Description | +
---|
Animation
+
+ Primary goal of Texture is ability to animate image, automatically finds out length and type of animation (horizontal or vertical).
+ |
+
Texture
+
+ This class is for easily visualizing one our multiple Animation objects.
+ |
+
Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.
Alternative Proxies: