Class GdiObject


  • public class GdiObject
    extends java.lang.Object
    Represents GDI Objects encountred in WMF Files.
    Version:
    $Id: GdiObject.java 1808001 2017-09-11 09:51:29Z ssteiner $
    • Field Summary

      Fields 
      Modifier and Type Field Description
      (package private) int id  
      (package private) java.lang.Object obj  
      (package private) int type  
      (package private) boolean used  
    • Constructor Summary

      Constructors 
      Constructor Description
      GdiObject​(int _id, boolean _used)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void clear()  
      int getID()
      Return the identification of this GdiObject.
      java.lang.Object getObject()
      Return the Object associated with this GdiObject.
      int getType()
      Return the type of this GdiObject.
      boolean isUsed()
      Return true if this GdiObject is used.
      void Setup​(int _type, java.lang.Object _obj)
      Setup this Object, which means that it is used and associated with an Object.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • id

        int id
      • used

        boolean used
      • obj

        java.lang.Object obj
      • type

        int type
    • Constructor Detail

      • GdiObject

        GdiObject​(int _id,
                  boolean _used)
    • Method Detail

      • clear

        public void clear()
      • Setup

        public void Setup​(int _type,
                          java.lang.Object _obj)
        Setup this Object, which means that it is used and associated with an Object.

        The Object can be any Java Object that is useful for an implementation of AbstractWMFPainter that uses this GdiObject.

        For example, if the painter paints in a Java Graphics2D :

        • For a PEN or BRUSH GdiObject : the Object will be a Color
        • For a FONT GdiObject : the Object can be a Font (in fact, the actual WMFPainter implementation uses a more sophisticated kind of Object in order to keep track of the associated charset)
        Parameters:
        _type - the type of this object
        _obj - the associated Object
      • isUsed

        public boolean isUsed()
        Return true if this GdiObject is used.
      • getType

        public int getType()
        Return the type of this GdiObject.
      • getObject

        public java.lang.Object getObject()
        Return the Object associated with this GdiObject.
      • getID

        public int getID()
        Return the identification of this GdiObject.