ilog.tgo.grprim
Class IltLineStyle

java.lang.Object
  extended by ilog.tgo.grprim.IltLineStyle
All Implemented Interfaces:
IlLineStyle, Serializable
Direct Known Subclasses:
IltLineStyle.LineStyleWrapper, IltLineStyle.Solid

public abstract class IltLineStyle
extends Object
implements IlLineStyle

This class 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.

See Also:
Ilt1DPalette, Serialized Form

Nested Class Summary
static class IltLineStyle.LineStyleWrapper
          A line style which: for thin lines makes an indirection to another IlLineStyle, for thick lines fills all pixels in the foreground color.
static class IltLineStyle.Solid
          Describes a line style which fills all pixels in the foreground color.
 
Field Summary
static IltLineStyle Solid
          This line style always fills the entire line with the foreground color.
 
Constructor Summary
protected IltLineStyle()
          Default constructor
 
Method Summary
abstract  double drawThickLine(Graphics g, ilog.tgo.grprim.internal.IltStrip s, ilog.tgo.grprim.internal.IltLine halfplane1, ilog.tgo.grprim.internal.IltLine halfplane2, ilog.tgo.grprim.internal.IltLine halfplaneB1, ilog.tgo.grprim.internal.IltLine halfplaneB2, Color foreground, Color background, double offset)
          Draws a thick line.
static IltLineStyle GetAlternatingLineStyle(float[] dashes)
          Returns a line style with the given configuration if it exists.
static float[] GetAlternatingLineStyle(IlLineStyle lstyle)
           
static IltLineStyle NewAlternatingLineStyle(double[] dashes)
          Deprecated. Please use the method that takes a float array argument instead.
static IltLineStyle NewAlternatingLineStyle(float[] dashes)
          Returns a new alternating line style.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface ilog.util.IlLineStyle
drawLine, getPeriod, pixelColor
 

Field Detail

Solid

public static IltLineStyle Solid
This line style always fills the entire line with the foreground color. The background color and the offset are ignored.

Constructor Detail

IltLineStyle

protected IltLineStyle()
Default constructor

Method Detail

drawThickLine

public abstract double drawThickLine(Graphics g,
                                     ilog.tgo.grprim.internal.IltStrip s,
                                     ilog.tgo.grprim.internal.IltLine halfplane1,
                                     ilog.tgo.grprim.internal.IltLine halfplane2,
                                     ilog.tgo.grprim.internal.IltLine halfplaneB1,
                                     ilog.tgo.grprim.internal.IltLine halfplaneB2,
                                     Color foreground,
                                     Color background,
                                     double offset)
Draws a thick line. More precisely, this fills a trapezoid bounded by s, halfplane1, halfplane2, halfplaneB1 and halfplaneB2.

Parameters:
s - the strip which is to be filled
halfplane1 - starting line
halfplane2 - end line
halfplaneB1 - bevel delimiter 1
halfplaneB2 - bevel delimiter 2
foreground - foreground color
background - background color, or null
offset - the starting pixel within the pattern (>=0, < getPeriod())
Returns:
the next pixel within the pattern
Internal method or field: do not use!

NewAlternatingLineStyle

public static IltLineStyle NewAlternatingLineStyle(double[] dashes)
Deprecated. Please use the method that takes a float array argument instead.

Returns a new alternating line style. This sets a number of pixels in the foreground color, then a number of pixels in the background color, and so on. When the given array is exhausted, restart from the beginning.

Parameters:
dashes - A non-empty array of positive numbers. The first number is the number of pixels in the foreground color, the second is the number of pixels in the background color, the third number is the number of pixels in the foreground color, and so on.
Deprecated Since:
JTGO 4.0

NewAlternatingLineStyle

public static IltLineStyle NewAlternatingLineStyle(float[] dashes)
Returns a new alternating line style. This sets a number of pixels in the foreground color, then a number of pixels in the background color, and so on. When the given array is exhausted, restart from the beginning.

Parameters:
dashes - A non-empty array of positive numbers. The first number is the number of pixels in the foreground color, the second is the number of pixels in the background color, the third number is the number of pixels in the foreground color, and so on.
Since:
JTGO 4.0

GetAlternatingLineStyle

public static float[] GetAlternatingLineStyle(IlLineStyle lstyle)
Internal method or field: do not use!

GetAlternatingLineStyle

public static IltLineStyle GetAlternatingLineStyle(float[] dashes)
Returns a line style with the given configuration if it exists. If a line style does not exist, one is created and returned.

Since:
JTGO 4.0


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