Deprecated List
Date: 2016-04-28

# Deprecated API

## Contents

- Deprecated Classes
- Deprecated Fields
- Deprecated Methods

- Deprecated Classes
  Class and Description
  org.apache.xmlgraphics.java2d.CMYKColorSpace This class has been moved to the "color" subpackage.

- Deprecated Fields
  Field and Description
  org.apache.xmlgraphics.ps.PSGenerator.ATEND Please use DSCConstants.ATEND. This constant was in the wrong place.
  org.apache.xmlgraphics.ps.DSCConstants.END_PAGE Shouldn't really use that. Bad idea. "Page" and "Trailer" end a page.
  org.apache.xmlgraphics.fonts.Glyphs.MAC_GLYPH_NAMES That array was supposed to represent the standard Macintosh ordering of glyphs in a TrueType font (it does NOT correspond to the MacRoman encoding). In addition some entries are incorrect.

- Deprecated Methods
  Method and Description
  org.apache.xmlgraphics.image.loader.util.ImageUtil.closeQuietly(Source) use `XmlSourceUtil.closeQuietly(Source)` instead
  org.apache.xmlgraphics.image.loader.util.ImageUtil.getInputStream(Source) Please use `XmlSourceUtil.getInputStream(Source)` instead.
  org.apache.xmlgraphics.java2d.color.DeviceCMYKColorSpace.getInstance() Use `ColorSpaces.getDeviceCMYKColorSpace()` instead.
  org.apache.xmlgraphics.image.loader.impl.AbstractImageLoaderFactory.getUsagePenalty(String, ImageFlavor) Redundancy with `ImageLoader.getUsagePenalty()`
  org.apache.xmlgraphics.image.loader.spi.ImageLoaderFactory.getUsagePenalty(String, ImageFlavor) Redundancy with `ImageLoader.getUsagePenalty()`
  org.apache.xmlgraphics.fonts.Glyphs.glyphToString(String) User getUnicodeCodePointsForGlyphName instead. This method only returns the first Unicode code point it finds.
  org.apache.xmlgraphics.image.loader.util.ImageUtil.hasReader(Source) use `XmlSourceUtil.hasReader(Source)` instead
  org.apache.xmlgraphics.ps.PSGenerator.isResourceSupplied(PSResource) Use the isResourceSupplied() on ResourceTracker instead.
  org.apache.xmlgraphics.image.loader.util.ImageUtil.needInputStream(Source) use `XmlSourceUtil.needInputStream(Source)` instead
  org.apache.xmlgraphics.ps.PSGenerator.notifyResourceUsage(PSResource, boolean) Use the notifyResourceUsageOnPage() on ResourceTracker instead
  org.apache.xmlgraphics.ps.PSGenerator.notifyStartNewPage() Use the notifyStartNewPage() on ResourceTracker instead.
  org.apache.xmlgraphics.ps.PSImageUtils.paintForm(PSResource, Rectangle2D, PSGenerator) Please use `PSImageUtils.paintForm(PSResource, Dimension2D, Rectangle2D, PSGenerator)` instead.
  org.apache.xmlgraphics.ps.PSImageUtils.paintReusableImage(String, Rectangle2D, PSGenerator) Please use `PSImageUtils.paintForm(PSResource, Dimension2D, Rectangle2D, PSGenerator)` instead.
  org.apache.xmlgraphics.util.Service.providers(Class, boolean) use the type-safe methods providers(Class) or providerNames(Class) instead.
  org.apache.xmlgraphics.image.loader.util.ImageUtil.removeStreams(Source) use `XmlSourceUtil.removeStreams(Source)` instead
  org.apache.xmlgraphics.ps.PSImageUtils.renderEPS(byte[], String, float, float, float, float, float, float, float, float, PSGenerator) Please use the variant with the InputStream as parameter
  org.apache.xmlgraphics.ps.PSGenerator.useRGBColor(Color) use useColor method instead
  org.apache.xmlgraphics.ps.PSProcSets.writeFOPEPSProcSet(PSGenerator) Use writeEPSProcSet() instead.
  org.apache.xmlgraphics.ps.PSProcSets.writeFOPStdProcSet(PSGenerator) Use writeStdProcSet() instead.
  org.apache.xmlgraphics.ps.PSImageUtils.writeImage(byte[], Dimension, String, Rectangle2D, boolean, ColorSpace, PSGenerator) Please use the variant with the more versatile ImageEncoder as parameter
  org.apache.xmlgraphics.ps.PSGenerator.writeResources(boolean) Use the writeResources() on ResourceTracker instead.
  org.apache.xmlgraphics.ps.PSImageUtils.writeReusableImage(byte[], Dimension, String, String, boolean, ColorSpace, PSGenerator) Please use `FormGenerator`
  org.apache.xmlgraphics.ps.PSImageUtils.writeReusableImage(ImageEncoder, Dimension, String, String, ColorSpace, boolean, PSGenerator) Please use `FormGenerator`