ilog.util
Interface IlLineStyle

All Superinterfaces:
Serializable
All Known Implementing Classes:
IltLineStyle, IltLineStyle.LineStyleWrapper, IltLineStyle.Solid

public interface IlLineStyle
extends Serializable

This interface describes a pattern with which a 1D line can be filled.

When a line is drawn, the pattern is drawn in the foreground color, and the remainder of the line is drawn in the background color. If the background color is null, it means that the line is transparent.

Since:
JTGO 3.0

Method Summary
 double drawLine(Graphics g, int x1, int y1, int x2, int y2, Color foreground, Color background, double offset)
          Draws a line of thickness 1.
 double getPeriod()
          Returns the periodicity of the pattern.
 int pixelColor(double offset)
          Returns the color for a given offset.
 

Method Detail

getPeriod

double getPeriod()
Returns the periodicity of the pattern.


pixelColor

int pixelColor(double offset)
Returns the color for a given offset.

Returns:
0 for background, 1 for foreground.

drawLine

double drawLine(Graphics g,
                int x1,
                int y1,
                int x2,
                int y2,
                Color foreground,
                Color background,
                double offset)
Draws a line of thickness 1.

Parameters:
g - The Graphics where the line will be drawn.
x1 - Starting point of the line.
y1 - Starting point of the line.
x2 - End point of the line.
y2 - End point of the line.
foreground - Foreground color.
background - Background color or null.
offset - The starting pixel within the pattern (>=0, < getPeriod()).
Returns:
The next pixel within the pattern.


Copyright © 1996-2007 ILOG S.A. All rights reserved.   Documentation homepage.   . All Rights Reserved.