cz.cuni.jagrlib.iface
Interface FillCallback

All Superinterfaces:
java.io.Serializable

public interface FillCallback
extends java.io.Serializable

Interface for fill call-back routines.

Since:
0.02
See Also:
FillCallback.java

Field Summary
static int MASK_ALPHA
          Use alpha-channel modulation.
static int MASK_BIT
          Use bit-mask modulation.
static int MASK_COLOR
          Use color modulation.
static int MASK_PARAMETRIC
          Use parametric (relative) coordinates.
 
Method Summary
 double getAlpha(double t, double u, boolean cyclic)
          Returns alpha-channel information about the given point.
 double getAlpha(int i, int j, int width, int height, boolean cyclic)
          Returns alpha-channel information about the given point.
 boolean getBit(double t, double u, boolean cyclic)
          Returns boolean information about the given point.
 boolean getBit(int i, int j, int width, int height, boolean cyclic)
          Returns boolean information about the given point.
 void getColor(double[] color, double t, double u, boolean cyclic)
          Returns color information (RGB) about the given point.
 void getColor(double[] color, int i, int j, int width, int height, boolean cyclic)
          Returns color information (RGB) about the given point.
 int getFeatures()
          Tells which features are used by this fill-modulation function.
 

Field Detail

MASK_BIT

static final int MASK_BIT
Use bit-mask modulation.

See Also:
Constant Field Values

MASK_ALPHA

static final int MASK_ALPHA
Use alpha-channel modulation.

See Also:
Constant Field Values

MASK_COLOR

static final int MASK_COLOR
Use color modulation.

See Also:
Constant Field Values

MASK_PARAMETRIC

static final int MASK_PARAMETRIC
Use parametric (relative) coordinates.

See Also:
Constant Field Values
Method Detail

getFeatures

int getFeatures()
Tells which features are used by this fill-modulation function.

Returns:
Flags using MASK_* constants.

getBit

boolean getBit(int i,
               int j,
               int width,
               int height,
               boolean cyclic)
Returns boolean information about the given point.

Parameters:
i - Point's horizontal index (from 0 to width-1).
j - Point's vertical index (from 0 to height-1).
width - Total pattern width.
height - Total pattern height.
cyclic - Is that pattern cyclic?.
Returns:
true for the point that has to be drawn.

getBit

boolean getBit(double t,
               double u,
               boolean cyclic)
Returns boolean information about the given point.

Parameters:
t - Point's relative horizontal coordinate (from 0.0 to 1.0).
u - Point's relative vertical coordinate (from 0.0 to 1.0).
cyclic - Is that pattern cyclic?.
Returns:
true for the point that has to be drawn.

getAlpha

double getAlpha(int i,
                int j,
                int width,
                int height,
                boolean cyclic)
Returns alpha-channel information about the given point.

Parameters:
i - Point's horizontal index (from 0 to width-1).
j - Point's vertical index (from 0 to height-1).
width - Total pattern width.
height - Total pattern height.
cyclic - Is that pattern cyclic?.
Returns:
Alpha (opacity) to draw the point with (from 0.0 to 1.0).

getAlpha

double getAlpha(double t,
                double u,
                boolean cyclic)
Returns alpha-channel information about the given point.

Parameters:
t - Point's relative horizontal coordinate (from 0.0 to 1.0).
u - Point's relative vertical coordinate (from 0.0 to 1.0).
cyclic - Is that pattern cyclic?.
Returns:
Alpha (opacity) to draw the point with (from 0.0 to 1.0).

getColor

void getColor(double[] color,
              int i,
              int j,
              int width,
              int height,
              boolean cyclic)
Returns color information (RGB) about the given point.

Parameters:
color - RGB color of the point.
i - Point's horizontal index (from 0 to width-1).
j - Point's vertical index (from 0 to height-1).
width - Total pattern width.
height - Total pattern height.
cyclic - Is that pattern cyclic?.

getColor

void getColor(double[] color,
              double t,
              double u,
              boolean cyclic)
Returns color information (RGB) about the given point.

Parameters:
color - RGB color of the point.
t - Point's relative horizontal coordinate (from 0.0 to 1.0).
u - Point's relative vertical coordinate (from 0.0 to 1.0).
cyclic - Is that pattern cyclic?.