/** Get a texture from a WMF hatch definition (in black Color). This * texture will be cached, so the Paint will only be created once. */ public Paint getTexture(int textureId) { Integer _itexture = textureId; if (textures.containsKey( _itexture)) { Paint paint = (Paint)(textures.get(_itexture)); return paint; } else { Paint paint = createTexture(textureId, null, null); if (paint != null) textures.put(_itexture, paint); return paint; } }
/** Get a texture from a WMF hatch definition (in black Color). This * texture will be cached, so the Paint will only be created once. */ public Paint getTexture(int textureId) { Integer _itexture = new Integer(textureId); if (textures.containsKey( _itexture)) { Paint paint = (Paint)(textures.get(_itexture)); return paint; } else { Paint paint = createTexture(textureId, null, null); if (paint != null) textures.put(_itexture, paint); return paint; } }
/** 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. */ public Paint getTexture(int textureId, Color foreground) { ColoredTexture _ctexture = new ColoredTexture(textureId, foreground, null); if (textures.containsKey(_ctexture)) { Paint paint = (Paint)(textures.get(_ctexture)); return paint; } else { Paint paint = createTexture(textureId, foreground, null); if (paint != null) textures.put(_ctexture, paint); return paint; } }
/** 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. */ public Paint getTexture(int textureId, Color foreground) { ColoredTexture _ctexture = new ColoredTexture(textureId, foreground, null); if (textures.containsKey(_ctexture)) { Paint paint = (Paint)(textures.get(_ctexture)); return paint; } else { Paint paint = createTexture(textureId, foreground, null); if (paint != null) textures.put(_ctexture, paint); return paint; } }
/** 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. */ public Paint getTexture(int textureId, Color foreground, Color background) { ColoredTexture _ctexture = new ColoredTexture(textureId, foreground, background); if (textures.containsKey(_ctexture)) { Paint paint = (Paint)(textures.get(_ctexture)); return paint; } else { Paint paint = createTexture(textureId, foreground, background); if (paint != null) textures.put(_ctexture, paint); return paint; } }
/** 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. */ public Paint getTexture(int textureId, Color foreground, Color background) { ColoredTexture _ctexture = new ColoredTexture(textureId, foreground, background); if (textures.containsKey(_ctexture)) { Paint paint = (Paint)(textures.get(_ctexture)); return paint; } else { Paint paint = createTexture(textureId, foreground, background); if (paint != null) textures.put(_ctexture, paint); return paint; } }