ilog.views.graphic.linkpolicy
Interface IlvCrossingGraphic

All Known Implementing Classes:
IlvAbstractCrossingGraphic, IlvBridgeCrossings, IlvTunnelCrossings

public interface IlvCrossingGraphic

An interface to be implemented by the crossing graphic object used in IlvCrossingAwareLinkImage.

Notice: the crossing graphic of a link is not necessarily in the same grapher as the link. However, the methods defined in this interface get the transformation used to draw the link as input parameter, which is not necessarily the same transformation used to draw this crossing graphic.

Since:
JViews 6.0
See Also:
IlvCrossingAwareLinkImage.setCrossingGraphic(ilog.views.IlvGraphic)

Method Summary
 void addCrossingBound(IlvRect boundingRect, IlvTransformer t, IlvLinkImage link1, IlvLinkImage link2, IlvPoint p0, IlvPoint p1, IlvPoint p2, IlvPoint p3, float startGap, float endGap, float normalGap)
          Adds the bound of the crossing to the input bounding rectangle.
 boolean containsAtCrossing(IlvPoint p, IlvPoint tp, IlvTransformer t, IlvLinkImage link1, IlvLinkImage link2, IlvPoint p0, IlvPoint p1, IlvPoint p2, IlvPoint p3, float startGap, float endGap, float normalGap)
          Tests if a point lies within the drawing of a crossing.
 void crossingChanged()
          This method is called whenever a crossing related to this crossing graphic has changed.
 void drawCrossing(Graphics dst, IlvTransformer t, IlvLinkImage link1, IlvLinkImage link2, IlvPoint p0, IlvPoint p1, IlvPoint p2, IlvPoint p3, float startGap, float endGap, float normalGap)
          Draws the crossing between the input links.
 

Method Detail

addCrossingBound

void addCrossingBound(IlvRect boundingRect,
                      IlvTransformer t,
                      IlvLinkImage link1,
                      IlvLinkImage link2,
                      IlvPoint p0,
                      IlvPoint p1,
                      IlvPoint p2,
                      IlvPoint p3,
                      float startGap,
                      float endGap,
                      float normalGap)
Adds the bound of the crossing to the input bounding rectangle. The input points and gaps are transformed by the input transformer.

Parameters:
boundingRect - The bounding rectangle containing the result.
t - The transformation used to draw the first link.
link1 - The first link, which is the link containing this crossing graphic.
link2 - The second link.
p0 - The point before the start point of the crossing picture inside the first link.
p1 - The start point of the crossing picture inside the first link.
p2 - The end point of the crossing picture inside the first link.
p3 - The point after the end point of the crossing picture inside the first link.
startGap - The real gap between start point and the link crossing.
endGap - The real gap between end point and the link crossing.
normalGap - The desired normal gap at the link crossing. The start gap and end gap may be smaller than the normal gap.

drawCrossing

void drawCrossing(Graphics dst,
                  IlvTransformer t,
                  IlvLinkImage link1,
                  IlvLinkImage link2,
                  IlvPoint p0,
                  IlvPoint p1,
                  IlvPoint p2,
                  IlvPoint p3,
                  float startGap,
                  float endGap,
                  float normalGap)
Draws the crossing between the input links. The input points and gaps are transformed by the input transformer.

Parameters:
dst - The destination Graphics.
t - The transformation used to draw the first link.
link1 - The first link, which is the link containing this crossing graphic.
link2 - The second link.
p0 - The point before the start point of the crossing picture inside the first link.
p1 - The start point of the crossing picture inside the first link.
p2 - The end point of the crossing picture inside the first link.
p3 - The point after the end point of the crossing picture inside the first link.
startGap - The real gap between start point and the link crossing.
endGap - The real gap between end point and the link crossing.
normalGap - The desired normal gap at the link crossing. The start gap and end gap may be smaller than the normal gap.

containsAtCrossing

boolean containsAtCrossing(IlvPoint p,
                           IlvPoint tp,
                           IlvTransformer t,
                           IlvLinkImage link1,
                           IlvLinkImage link2,
                           IlvPoint p0,
                           IlvPoint p1,
                           IlvPoint p2,
                           IlvPoint p3,
                           float startGap,
                           float endGap,
                           float normalGap)
Tests if a point lies within the drawing of a crossing. The input points and gaps are transformed by the input transformer.

Parameters:
p - The point to be tested. This point is untransformed.
tp - The point p transformed by the transformer t.
t - The transformation used to draw the first link.
link1 - The first link, which is the link containing this crossing graphic.
link2 - The second link.
p0 - The point before the start point of the crossing picture inside the first link.
p1 - The start point of the crossing picture inside the first link.
p2 - The end point of the crossing picture inside the first link.
p3 - The point after the end point of the crossing picture inside the first link.
startGap - The real gap between start point and the link crossing.
endGap - The real gap between end point and the link crossing.
normalGap - The desired normal gap at the link crossing. The start gap and end gap may be smaller than the normal gap.

crossingChanged

void crossingChanged()
This method is called whenever a crossing related to this crossing graphic has changed. Typically, you can use this to invalidate internal data structures such as a cache for the bounding box of the object.



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