Ejemplo n.º 1
0
        public bool CompareBitmaps(SubtitleFrame other)
        {
            if (BitmapHash == 0)
                SetBitmapHash();

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

            return BitmapHash == other.BitmapHash;
        }
Ejemplo n.º 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();
        }
Ejemplo n.º 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();
        }
Ejemplo n.º 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);
        }
Ejemplo n.º 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);
        }
Ejemplo n.º 6
0
        public bool CompareBitmaps(SubtitleFrame other)
        {
            if (BitmapHash == 0)
            {
                SetBitmapHash();
            }

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

            return(BitmapHash == other.BitmapHash);
        }
Ejemplo n.º 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];
        }
Ejemplo n.º 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];
                }
            }
        }