public bool CompareBitmaps(SubtitleFrame other) { if (BitmapHash == 0) SetBitmapHash(); if (other.BitmapHash == 0) other.SetBitmapHash(); return BitmapHash == other.BitmapHash; }
public SubtitleCaption() { frames = new SubtitleFrame[2]; hdColorSet = new byte[256, 3]; hdTransparency = new byte[256]; frames[0] = new SubtitleFrame(); frames[1] = new SubtitleFrame(); }
/// <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); }
public bool CompareBitmaps(SubtitleFrame other) { if (BitmapHash == 0) { SetBitmapHash(); } if (other.BitmapHash == 0) { other.SetBitmapHash(); } return(BitmapHash == other.BitmapHash); }
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]; }
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]; } } }