deadbeef.SupTools
Class SubPicture

java.lang.Object
  extended by deadbeef.SupTools.SubPicture
All Implemented Interfaces:
java.lang.Cloneable

public class SubPicture
extends java.lang.Object
implements java.lang.Cloneable

Stores information about one subpicture frame. Note: image related members are private and need getters to allow more complex access functions for BD-SUPs. Indeed the class SubPictureBD doesn't access the image width/height and offsets of the parent class at all. Only when the copy function is used to create a SubPicture copy from a SubPictureBD instance, these members are filled correctly.
This also means that the setter functions for these members are pretty much useless as they only change the members of the parent class, but don't influence the values returned by the getters. This is a little unclean but by design to not allow write access to the internal structures.

Author:
0xdeadbeef

Field Summary
 long endTime
          end time in milliseconds
 java.util.ArrayList<ErasePatch> erasePatch
          list of erase patches
 boolean exclude
          exclude from export?
 int height
          screen height
 boolean isforced
          if true, this is a forced subtitle
 long startTime
          start time in milliseconds
 int width
          screen width
 
Constructor Summary
SubPicture()
           
 
Method Summary
 SubPicture clone()
           
 SubPicture copy()
          Allows to get a clone of the parent object even for SubPictureBD objects.
 int getImageHeight()
          get image height
 int getImageWidth()
          get image width
 int getOfsX()
          get image x offset
 int getOfsY()
          get image y offset
 void setImageHeight(int h)
          Set image height
 void setImageWidth(int w)
          Set image width
 void setOfsX(int ofs)
          Set image x offset
 void setOfsY(int ofs)
          Set image y offset
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

width

public int width
screen width


height

public int height
screen height


startTime

public long startTime
start time in milliseconds


endTime

public long endTime
end time in milliseconds


isforced

public boolean isforced
if true, this is a forced subtitle


exclude

public boolean exclude
exclude from export?


erasePatch

public java.util.ArrayList<ErasePatch> erasePatch
list of erase patches

Constructor Detail

SubPicture

public SubPicture()
Method Detail

copy

public SubPicture copy()
Allows to get a clone of the parent object even for SubPictureBD objects.

Returns:
clone of the parent object

getImageWidth

public int getImageWidth()
get image width

Returns:
image width in pixels

getImageHeight

public int getImageHeight()
get image height

Returns:
image height in pixels

getOfsX

public int getOfsX()
get image x offset

Returns:
image x offset in pixels

getOfsY

public int getOfsY()
get image y offset

Returns:
image y offset in pixels

setImageWidth

public void setImageWidth(int w)
Set image width

Parameters:
w - width in pixels

setImageHeight

public void setImageHeight(int h)
Set image height

Parameters:
h - height in pixels

setOfsX

public void setOfsX(int ofs)
Set image x offset

Parameters:
ofs - offset in pixels

setOfsY

public void setOfsY(int ofs)
Set image y offset

Parameters:
ofs - offset in pixels

clone

public SubPicture clone()
Overrides:
clone in class java.lang.Object