TimeInterval
Contents
[
Hide
]Inheritance: java.lang.Object
public class TimeInterval
Represents the time interval in milliseconds
Constructors
Constructor | Description |
---|---|
TimeInterval(long from, long to) | Initializes a new instance of the TimeInterval class. |
Methods
Method | Description |
---|---|
getFrom() | Gets From milliseconds. |
setFrom(long value) | Sets From milliseconds. |
getTo() | Gets To milliseconds. |
setTo(long value) | Sets To milliseconds. |
Example: Export of part of animation from GIF image based on time interval.
try (Image image = Image.load("Animation.gif"))
{
GifOptions options = new GifOptions();
options.setFullFrame(true);
final MultiPageOptions multiPageOptions = new MultiPageOptions();
multiPageOptions.setMode(MultiPageMode.TimeInterval);
multiPageOptions.setTimeInterval(new TimeInterval(0, 400));
options.setMultiPageOptions(multiPageOptions);
image.save("PartOfAnimation.gif", options);
}
TimeInterval(long from, long to)
public TimeInterval(long from, long to)
Initializes a new instance of the TimeInterval class.
Parameters:
Parameter | Type | Description |
---|---|---|
from | long | From milliseconds. |
to | long | To milliseconds. |
getFrom()
public final long getFrom()
Gets From milliseconds.
Returns: long
setFrom(long value)
public final void setFrom(long value)
Sets From milliseconds.
Parameters:
Parameter | Type | Description |
---|---|---|
value | long |
getTo()
public final long getTo()
Gets To milliseconds.
Returns: long
setTo(long value)
public final void setTo(long value)
Sets To milliseconds.
Parameters:
Parameter | Type | Description |
---|---|---|
value | long |