Class AbstractBlendComposite
- java.lang.Object
-
- com.github.weisj.jsvg.nodes.filter.AbstractBlendComposite
-
- All Implemented Interfaces:
java.awt.Composite
- Direct Known Subclasses:
BlendModeComposite,CompositeModeComposite.ArithmeticComposite,CompositeModeComposite.LighterComposite
public abstract class AbstractBlendComposite extends java.lang.Object implements java.awt.CompositeA blend composite defines the rule according to which a drawing primitive (known as the source) is mixed with existing graphics (know as the destination.)
BlendCompositeis an implementation of theCompositeinterface and must therefore be set as a state on aGraphics2Dsurface.Please refer to
Graphics2D.setComposite(java.awt.Composite)for more information on how to use this class with a graphics surface.Blending Modes
This class offers a certain number of blending modes, or compositing rules. These rules are inspired from graphics editing software packages, like Adobe Photoshop or The GIMP.
Given the wide variety of implemented blending modes and the difficulty to describe them with words, please refer to those tools to visually see the result of these blending modes.
- See Also:
Graphics2D,Composite,AlphaComposite
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceAbstractBlendComposite.Blenderprivate static classAbstractBlendComposite.BlendingContext
-
Field Summary
Fields Modifier and Type Field Description private booleanconvertToLinearRGB
-
Constructor Summary
Constructors Modifier Constructor Description protectedAbstractBlendComposite()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract @NotNull AbstractBlendComposite.Blenderblender()java.awt.CompositeContextcreateContext(java.awt.image.ColorModel srcColorModel, java.awt.image.ColorModel dstColorModel, java.awt.RenderingHints hints)private static booleanisColorModelInvalid(java.awt.image.ColorModel cm)voidsetConvertToLinearRGB(boolean convertToLinearRGB)
-
-
-
Method Detail
-
blender
@NotNull protected abstract @NotNull AbstractBlendComposite.Blender blender()
-
isColorModelInvalid
private static boolean isColorModelInvalid(java.awt.image.ColorModel cm)
-
setConvertToLinearRGB
public void setConvertToLinearRGB(boolean convertToLinearRGB)
-
createContext
public java.awt.CompositeContext createContext(java.awt.image.ColorModel srcColorModel, java.awt.image.ColorModel dstColorModel, java.awt.RenderingHints hints)- Specified by:
createContextin interfacejava.awt.Composite
-
-