Ejemplo n.º 1
0
 /**<summary>Constructs the base object data.</summary>*/
 public ObjectData(ObjectDataHeader objectHeader, ChunkHeader chunkHeader)
 {
     this.objectHeader = objectHeader;
     this.chunkHeader  = chunkHeader;
     stringTable       = new StringTable();
     groupInfo         = new GroupInfo();
     imageDirectory    = new ImageDirectory();
     graphicsData      = new GraphicsData(this.imageDirectory);
 }
Ejemplo n.º 2
0
        //========= CONSTRUCTORS =========
        #region Constructors

        /**<summary>Constructs the base object data.</summary>*/
        public ObjectData()
        {
            objectHeader   = new ObjectDataHeader();
            chunkHeader    = new ChunkHeader();
            stringTable    = new StringTable();
            groupInfo      = new GroupInfo();
            imageDirectory = new ImageDirectory();
            graphicsData   = new GraphicsData(this.imageDirectory);
        }
Ejemplo n.º 3
0
        //========= CONSTRUCTORS =========
        #region Constructors

        /**<summary>Constructs the base object data.</summary>*/
        internal ObjectData()
        {
            this.objectHeader   = new ObjectDataHeader();
            this.chunkHeader    = new ChunkHeader();
            this.stringTable    = new StringTable();
            this.groupInfo      = new GroupInfo();
            this.imageDirectory = new ImageDirectory();
            this.graphicsData   = new GraphicsData(this.imageDirectory);
        }
        //=========== LOADING ============
        #region Loading

        /**<summary>Returns an object loaded from the specified stream.</summary>*/
        public static GraphicsData FromStream(Stream stream)
        {
            GraphicsData graphicsData = new GraphicsData();

            BinaryReader reader = new BinaryReader(stream);

            graphicsData.imageDirectory.Read(reader);
            graphicsData.Read(reader);

            return(graphicsData);
        }