Class AbstractWMFPainter

  • Direct Known Subclasses:
    WMFPainter

    public class AbstractWMFPainter
    extends java.lang.Object
    This class provides generic methods that must be used by a particular WMFPainter.
    • Constructor Detail

      • AbstractWMFPainter

        public AbstractWMFPainter()
    • Method Detail

      • getImage

        protected java.awt.image.BufferedImage getImage​(byte[] bit,
                                                        int width,
                                                        int height)
        Return the image associated with a bitmap in a Metafile. 24 bits and 8 bits bitmaps are handled.
        Parameters:
        bit - the bitmap byte array
        width - the bitmap assumed width
        height - the bitmap assumed height
        Returns:
        the Image associated with the bitmap (null if the dimensions detected in the header are not consistent with the assumed dimensions)
      • getImageDimension

        protected java.awt.Dimension getImageDimension​(byte[] bit)
      • getImage

        protected java.awt.image.BufferedImage getImage​(byte[] bit)
        Return the image associated with a bitmap in a Metafile. 24 bits and 8 bits bitmaps are handled.
        Parameters:
        bit - the bitmap byte array
        Returns:
        the Image associated with the bitmap (null if the dimensions detected in the header are not consistent with the assumed dimensions)
      • getCharacterIterator

        protected java.text.AttributedCharacterIterator getCharacterIterator​(java.awt.Graphics2D g2d,
                                                                             java.lang.String sr,
                                                                             WMFFont wmffont)
        Create an AttributedCharacterIterator with the current definition of the WMF Font, and the input String.
      • getCharacterIterator

        protected java.text.AttributedCharacterIterator getCharacterIterator​(java.awt.Graphics2D g2d,
                                                                             java.lang.String sr,
                                                                             WMFFont wmffont,
                                                                             int align)
        Create an AttributedCharacterIterator with the current definition of the WMF Font, and the input String.
      • getAttributedString

        protected java.text.AttributedString getAttributedString​(java.awt.Graphics2D g2d,
                                                                 java.lang.String sr,
                                                                 WMFFont wmffont)
      • setRecordStore

        public void setRecordStore​(WMFRecordStore currentStore)
        Sets the WMFRecordStore this WMFPainter should use to render
      • getRecordStore

        public WMFRecordStore getRecordStore()
        Returns the WMFRecordStore this WMFPainter renders
      • addObject

        protected int addObject​(WMFRecordStore store,
                                int type,
                                java.lang.Object obj)
      • addObjectAt

        protected int addObjectAt​(WMFRecordStore store,
                                  int type,
                                  java.lang.Object obj,
                                  int idx)