ilog.tgo.grprim
Class IltLineStyle.LineStyleWrapper

java.lang.Object
  extended by ilog.tgo.grprim.IltLineStyle
      extended by ilog.tgo.grprim.IltLineStyle.LineStyleWrapper
All Implemented Interfaces:
IlLineStyle, Serializable
Enclosing class:
IltLineStyle

public static class IltLineStyle.LineStyleWrapper
extends IltLineStyle

A line style which:

Internal use only !

See Also:
Serialized Form
Internal method or field: do not use!

Nested Class Summary
 
Nested classes/interfaces inherited from class ilog.tgo.grprim.IltLineStyle
IltLineStyle.LineStyleWrapper, IltLineStyle.Solid
 
Field Summary
protected  IlLineStyle lstyle
           
 
Fields inherited from class ilog.tgo.grprim.IltLineStyle
Solid
 
Constructor Summary
IltLineStyle.LineStyleWrapper(IlLineStyle lstyle)
           
 
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 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.
 double getPeriod()
          Returns the periodicity of the pattern.
 int hashCode()
           
 int pixelColor(double offset)
          Returns the color for a given offset.
 
Methods inherited from class ilog.tgo.grprim.IltLineStyle
GetAlternatingLineStyle, GetAlternatingLineStyle, NewAlternatingLineStyle, NewAlternatingLineStyle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

lstyle

protected IlLineStyle lstyle
Constructor Detail

IltLineStyle.LineStyleWrapper

public IltLineStyle.LineStyleWrapper(IlLineStyle lstyle)
Method Detail

getPeriod

public double getPeriod()
Description copied from interface: IlLineStyle
Returns the periodicity of the pattern.


pixelColor

public int pixelColor(double offset)
Description copied from interface: IlLineStyle
Returns the color for a given offset.

Returns:
0 for background, 1 for foreground.

drawLine

public double drawLine(Graphics g,
                       int x1,
                       int y1,
                       int x2,
                       int y2,
                       Color foreground,
                       Color background,
                       double offset)
Description copied from interface: IlLineStyle
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.

drawThickLine

public 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)
Description copied from class: IltLineStyle
Draws a thick line. More precisely, this fills a trapezoid bounded by s, halfplane1, halfplane2, halfplaneB1 and halfplaneB2.

Specified by:
drawThickLine in class IltLineStyle
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

hashCode

public int hashCode()
Overrides:
hashCode in class Object


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