Class TextureFactory
java.lang.Object
org.apache.batik.transcoder.wmf.tosvg.TextureFactory
This class generate Paints from WMF hatch definitions. All generated
Paints are cached for future use.
- Version:
- $Id: TextureFactory.java 1831635 2018-05-15 13:33:47Z ssteiner $
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static class
Contain a handle to a Colored texture, with optional foreground and background colors. -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate Paint
createTexture
(int textureId, Color foreground, Color background) Called internally if the Paint does not exist in the cache and must be created.static TextureFactory
Get the unique instance of the class.static TextureFactory
getInstance
(float scale) Get the unique instance of the class, setting the scale of the pattern.getTexture
(int textureId) Get a texture from a WMF hatch definition (in black Color).getTexture
(int textureId, Color foreground) Get a texture from a WMF hatch definition, with a foreground color.getTexture
(int textureId, Color foreground, Color background) Get a texture from a WMF hatch definition, with a foreground and a background color.void
reset()
Rest the factory.
-
Field Details
-
fac
-
textures
-
SIZE
private static final int SIZE- See Also:
-
scale
private float scale
-
-
Constructor Details
-
TextureFactory
private TextureFactory(float scale)
-
-
Method Details
-
getInstance
Get the unique instance of the class. -
getInstance
Get the unique instance of the class, setting the scale of the pattern. TODO : scale is not handled for now -
reset
public void reset()Rest the factory. It empties all the previouly cached Paints are disposed of. -
getTexture
Get a texture from a WMF hatch definition (in black Color). This texture will be cached, so the Paint will only be created once. -
getTexture
Get a texture from a WMF hatch definition, with a foreground color. This texture will be cached, so the Paint will only be created once. -
getTexture
Get a texture from a WMF hatch definition, with a foreground and a background color. This texture will be cached, so the Paint will only be created once. -
createTexture
Called internally if the Paint does not exist in the cache and must be created.
-