summary refs log tree commit diff stats
path: root/src/com/fourisland/fourpuzzle/transition/Transition.java
blob: e9b6d9f79968266f5284306e9c05118b828cbcb2 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package com.fourisland.fourpuzzle.transition;

import java.awt.Graphics2D;
import java.awt.image.BufferedImage;

/**
 *
 * @author hatkirby
 */
public interface Transition {

    /**
     * Render the transition to the display
     * 
     * @param g The graphics device to render the transition to
     * @return If the transition has completed, true. Otherwise false.
     */
    public boolean render(Graphics2D g);
    
    public void setPreTransition(BufferedImage preTransition);
    
    /**
     * Create another Transition with the same properties
     * 
     * This function is used in the Database where default transitions are
     * stored to be used in certain circumstances. When these transitions are
     * needed, this function is called on them to create a copy of the
     * Transition with the same parameters. Essentially, this function should
     * return a new Transition of the same type constructed with the same
     * parameters as the Transition this function is being called on.
     * 
     * @return A copy of the specified Transition
     */
    public Transition copy();
}