コード例 #1
0
 /// <summary> Constructor
 ///
 /// </summary>
 /// <param name="">erd
 /// </param>
 public BlipStoreEntry(EscherRecordData erd) : base(erd)
 {
     type  = BlipType.getType(Instance);
     write = false;
     sbyte[] bytes = Bytes;
     referenceCount = IntegerHelper.getInt(bytes[24], bytes[25], bytes[26], bytes[27]);
 }
コード例 #2
0
        private BlipType(int val, string d)
        {
            _Value = val;
            desc   = d;

            BlipType[] newtypes = new BlipType[types.Length + 1];
            Array.Copy(types, 0, newtypes, 0, types.Length);
            newtypes[types.Length] = this;
            types = newtypes;
        }
コード例 #3
0
        /// <summary> Constructor
        ///
        /// </summary>
        /// <param name="d">the drawing
        /// </param>
        /// <exception cref=""> IOException
        /// </exception>
        public BlipStoreEntry(Drawing d) : base(EscherRecordType.BSE)
        {
            type     = BlipType.PNG;
            Version  = 2;
            Instance = type.Value;

            sbyte[] imageData = d.ImageBytes;
            imageDataLength = imageData.Length;
            data            = new sbyte[imageDataLength + IMAGE_DATA_OFFSET];
            Array.Copy(imageData, 0, data, IMAGE_DATA_OFFSET, imageDataLength);
            referenceCount = d.ReferenceCount;
            write          = true;
        }
コード例 #4
0
        public static BlipType getType(int val)
        {
            BlipType type = UNKNOWN;

            for (int i = 0; i < types.Length; i++)
            {
                if (types[i]._Value == val)
                {
                    type = types[i];
                    break;
                }
            }

            return(type);
        }