Пример #1
0
        public bool CompareBitmaps(SubtitleFrame other)
        {
            if (BitmapHash == 0)
                SetBitmapHash();

            if (other.BitmapHash == 0)
                other.SetBitmapHash();

            return BitmapHash == other.BitmapHash;
        }
Пример #2
0
        public SubtitleCaption()
        {
            frames = new SubtitleFrame[2];

            hdColorSet     = new byte[256, 3];
            hdTransparency = new byte[256];

            frames[0] = new SubtitleFrame();
            frames[1] = new SubtitleFrame();
        }
Пример #3
0
        public SubtitleCaption()
        {
            frames = new SubtitleFrame[2];

            hdColorSet = new byte[256, 3];
            hdTransparency = new byte[256];

            frames[0] = new SubtitleFrame();
            frames[1] = new SubtitleFrame();
        }
Пример #4
0
        /// <summary>
        /// Copy constructor
        /// </summary>
        /// <param name="other">source to copy from</param>
        public SubtitleFrame(SubtitleFrame other)
        {
            bitmapStarts = new long[2];
            bitmapLengths = new long[2];
            for (int i = 0; i < 2; i++)
            {
                bitmapStarts[i] = other.bitmapStarts[i];
                bitmapLengths[i] = other.bitmapStarts[i];
            }

            bitmapPos = new Rectangle(other.bitmapPos.Location, other.bitmapPos.Size);
        }
Пример #5
0
        /// <summary>
        /// Copy constructor
        /// </summary>
        /// <param name="other">source to copy from</param>
        public SubtitleFrame(SubtitleFrame other)
        {
            bitmapStarts  = new long[2];
            bitmapLengths = new long[2];
            for (int i = 0; i < 2; i++)
            {
                bitmapStarts[i]  = other.bitmapStarts[i];
                bitmapLengths[i] = other.bitmapStarts[i];
            }

            bitmapPos = new Rectangle(other.bitmapPos.Location, other.bitmapPos.Size);
        }
Пример #6
0
        public bool CompareBitmaps(SubtitleFrame other)
        {
            if (BitmapHash == 0)
            {
                SetBitmapHash();
            }

            if (other.BitmapHash == 0)
            {
                other.SetBitmapHash();
            }

            return(BitmapHash == other.BitmapHash);
        }
Пример #7
0
        public SubtitleCaption(SubtitleCaption other, int n, int parentIndex)
            : this()
        {
            frames[0] = new SubtitleFrame(other.frames[1]);

            startTime = other.startTime;
            endTime = other.endTime;
            forced = other.forced;
            scanned = other.scanned;
            paletteEntries = other.paletteEntries;
            addAfter = parentIndex;

            numFrames = 1;
            emptySubtitle = other.emptySubtitle;
            Array.Copy(other.hdTransparency, hdTransparency, other.hdTransparency.Length);
            for (int j = 0; j < 256; j++)
                for (int i = 0; i < 3; i++)
                    hdColorSet[j, i] = other.hdColorSet[j, i];
        }
Пример #8
0
        public SubtitleCaption(SubtitleCaption other, int n, int parentIndex) : this()
        {
            frames[0] = new SubtitleFrame(other.frames[1]);

            startTime      = other.startTime;
            endTime        = other.endTime;
            forced         = other.forced;
            scanned        = other.scanned;
            paletteEntries = other.paletteEntries;
            addAfter       = parentIndex;

            numFrames     = 1;
            emptySubtitle = other.emptySubtitle;
            Array.Copy(other.hdTransparency, hdTransparency, other.hdTransparency.Length);
            for (int j = 0; j < 256; j++)
            {
                for (int i = 0; i < 3; i++)
                {
                    hdColorSet[j, i] = other.hdColorSet[j, i];
                }
            }
        }