|
||||||||||
| PREV CLASS Documentation homepage NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectilog.views.IlvGraphicUtil
public class IlvGraphicUtil
Utility class for drawings.
| Field Summary | |
|---|---|
static float |
AUTO_SMOOTHNESS
Smoothness value for splines. |
static float |
COMPATIBLE_SMOOTHNESS
Smoothness value for splines for backward compatibility. |
| Method Summary | |
|---|---|
static Shape |
AddClip(Graphics g,
Shape shape)
Adds a clipping Shape to the current clip
on the given Graphics. |
static void |
BezierBoundingBox(IlvRect bbox,
IlvPoint[] pts,
int length,
boolean ghosting,
float smoothness,
float lineWidth,
int lineJoin,
int endCap,
IlvTransformer t)
Computes the bounding rectangle of a Bezier spline. |
static void |
BezierBoundingBox(IlvRect bbox,
IlvPoint[] pts,
int length,
float lineWidth,
int lineJoin,
int endCap,
IlvTransformer t)
Computes the bounding rectangle of a Bezier spline of up to 4 control points. |
static void |
ClosedBezierBoundingBox(IlvRect bbox,
IlvPoint[] pts,
int length,
boolean ghosting,
float smoothness,
float lineWidth,
int lineJoin,
int endCap,
IlvTransformer t)
Computes the bounding rectangle of a closed Bezier spline. |
static void |
ClosedBezierBoundingBox(IlvRect bbox,
IlvPoint[] pts,
int length,
float lineWidth,
int lineJoin,
int endCap,
IlvTransformer t)
Computes the bounding rectangle of a closed Bezier spline of up to 4 control points. |
static Shape |
CreateTransformedShape(Shape shape,
IlvTransformer t)
Transforms a Shape object. |
static void |
DrawBezier(Graphics g,
IlvPoint[] pts,
int length,
boolean ghosting,
float smoothness,
float lineWidth,
int lineJoin,
int endCap,
float[] lineStyle,
IlvTransformer t,
boolean pointsTransformed)
Draws a Bezier spline. |
static void |
DrawBezier(Graphics g,
IlvPoint[] pts,
int length,
float lineWidth,
int lineJoin,
int endCap,
float[] lineStyle,
IlvTransformer t)
Draws a Bezier spline of up to 4 control points. |
static void |
DrawBezier(Graphics g,
IlvPoint[] pts,
int length,
float lineWidth,
int lineJoin,
int endCap,
float[] lineStyle,
IlvTransformer t,
boolean pointsTransformed)
Draws a Bezier spline of up to 4 control points. |
static void |
DrawClosedBezier(Graphics g,
IlvPoint[] pts,
int length,
boolean ghosting,
float smoothness,
float lineWidth,
int lineJoin,
int endCap,
float[] lineStyle,
IlvTransformer t)
Draws a closed Bezier spline. |
static void |
DrawClosedBezier(Graphics g,
IlvPoint[] pts,
int length,
float lineWidth,
int lineJoin,
int endCap,
float[] lineStyle,
IlvTransformer t)
Draws a closed Bezier spline of up to 4 control points. |
static void |
DrawImage(Graphics g,
IlvRect drawrect,
Image image,
IlvTransformer t,
ImageObserver observer,
boolean highquality)
Draws an Image with a given IlvTransformer. |
static void |
DrawPolygon(Graphics g,
IlvPoint[] points,
int length,
IlvTransformer t)
Draws an outline of a polygon. |
static void |
DrawPolyline(Graphics g,
IlvPoint[] pts,
int length,
float lineWidth,
int lineJoin,
int endCap,
float[] lineStyle,
IlvTransformer t)
Draws a polyline. |
static void |
DrawPolyline(Graphics g,
IlvPoint[] pts,
int length,
float lineWidth,
int lineJoin,
int endCap,
float[] lineStyle,
IlvTransformer t,
boolean pointsTransformed)
Draws a polyline. |
static void |
DrawRenderedImage(Graphics g,
IlvRect drawrect,
RenderedImage image,
IlvTransformer t,
boolean highquality)
Draws a RenderedImage with a given
IlvTransformer. |
static void |
DrawString(Graphics g,
String text,
int x,
int y,
boolean antialiased)
Draws the text given by the specified string using the current font and color of the specified graphics context. |
static void |
FillBezier(Graphics g,
IlvPoint[] pts,
int length,
boolean ghosting,
float smoothness,
IlvTransformer t)
Draws a filled Bezier spline. |
static void |
FillBezier(Graphics g,
IlvPoint[] pts,
int length,
IlvTransformer t)
Draws a filled Bezier spline of up to 4 control points. |
static void |
FillOutlinedPolygon(Graphics g,
IlvPoint[] points,
int length,
Color fillColor,
Color outlineColor,
IlvTransformer t)
Draws an outlined polygon. |
static void |
FillPolygon(Graphics g,
IlvPoint[] points,
int length,
IlvTransformer t)
Draws a filled polygon. |
static int |
GetAlpha(Color c)
Deprecated. since JViews 5.5 you should use Color.getAlpha() instead |
static IlvPoint[] |
GetAutoSmoothSpline(IlvPoint[] originalpoints,
int length,
boolean ghosting,
IlvPoint[] bezierpoints,
int[] flags,
int[] resultingLength)
Returns an array of IlvPoints for a smooth spline from
an array of IlvPoints of user control points. |
static float |
GetFontDescent(String text,
Font font,
boolean antialiased)
Returns the descent of the specified text when drawn with the specified font. |
static IlvPoint[] |
GetPolyPoints(IlvPolyPointsInterface polypoints,
IlvTransformer t)
Returns the points of a polypoint. |
static IlvPoint[] |
GetSmoothSpline(IlvPoint[] originalpoints,
int length,
float smoothness,
boolean ghosting,
IlvPoint[] bezierpoints)
Returns an array of IlvPoints for a smooth spline from
an array of IlvPoints of user control points. |
static IlvPoint |
GetSmoothSplineBendFromHandle(int handleIndex,
IlvPoint handlePoint,
IlvPoint[] bendpoints,
int length,
float smoothness,
boolean ghosting)
Returns the used control point from the handle position on a smooth spline. |
static IlvPoint |
GetSmoothSplineHandleFromBend(int handleIndex,
IlvPoint[] bendpoints,
int length,
float smoothness,
boolean ghosting)
Returns a position on a smooth spline that can be used as selection handle points on the spline. |
static IlvPoint[] |
GetSmoothSplineHandlesFromBends(IlvPoint[] bendpoints,
int length,
float smoothness,
boolean ghosting,
IlvPoint[] handlepoints)
Returns an array of IlvPoints for a smooth spline
that can be used as selection handle points on the spline. |
static IlvRect |
GetStringBounds(String text,
Font font,
boolean antialiased)
Returns the bounding rectangle enclosing text when drawn with the specified font. |
static boolean |
IsJViews60LineStyleMode()
Returns true if polylines and Bezier curves
with line styles are drawn in JViews 6.0 style. |
static boolean |
isPrinting(Graphics g)
Returns true if we are currently printing. |
static Color |
MakeColor(int rgba)
Deprecated. since JViews 5.5 you should use new Color(rgba, true) instead. |
static Color |
MakeColor(int r,
int g,
int b,
int alpha)
Deprecated. since JViews 5.5 you should use new Color(r,g,b,alpha) instead. |
static boolean |
PointInBezier(IlvPoint point,
IlvPoint[] pts,
int length,
boolean ghosting,
float smoothness,
float lineWidth,
int lineJoin,
int endCap,
IlvTransformer t)
Performs a hit test on a Bezier spline. |
static boolean |
PointInBezier(IlvPoint point,
IlvPoint[] pts,
int length,
float lineWidth,
int lineJoin,
int endCap,
IlvTransformer t)
Performs a hit test on a Bezier spline of up to 4 control points. |
static boolean |
PointInClosedBezier(IlvPoint point,
IlvPoint[] pts,
int length,
boolean ghosting,
float smoothness,
float lineWidth,
int lineJoin,
int endCap,
IlvTransformer t)
Performs a hit test on a closed Bezier spline. |
static boolean |
PointInClosedBezier(IlvPoint point,
IlvPoint[] pts,
int length,
float lineWidth,
int lineJoin,
int endCap,
IlvTransformer t)
Performs a hit test on a closed Bezier spline of up to 4 control points. |
static boolean |
PointInFilledBezier(IlvPoint point,
IlvPoint[] pts,
int length,
boolean ghosting,
float smoothness,
IlvTransformer t)
Performs a hit test on a filled Bezier spline. |
static boolean |
PointInFilledBezier(IlvPoint point,
IlvPoint[] pts,
int length,
IlvTransformer t)
Performs a hit test on a filled Bezier spline of up to 4 control points. |
static boolean |
PointInPolygon(IlvPoint point,
IlvPoint[] pts,
int length,
IlvTransformer t)
Deprecated. Beginning with ILOG JViews 5.5 you should use PointInPolygon(IlvPoint,IlvPoint[],int,IlvTransformer) instead. |
static boolean |
PointInPolygon(IlvPoint point,
IlvPoint[] pts,
int length,
IlvTransformer t,
boolean fill)
Performs a hit test on a polygon. |
static boolean |
PointInPolyline(IlvPoint point,
IlvPoint[] pts,
int length,
float lineWidth,
int lineJoin,
int endCap,
IlvTransformer t)
Performs a hit test on a polyline. |
static boolean |
PointInShape(IlvPoint pt,
Shape shape)
Returns true if an IlvPoint is inside a
particular Shape object, or false otherwise. |
static IlvRect |
PolylineBBox(IlvPoint[] pts,
int length,
float lineWidth,
int lineJoin,
int endCap,
IlvTransformer t)
Computes the bounding rectangle of a polyline. |
static IlvRect |
RectBBox(IlvRect rect,
IlvTransformer t)
Returns the bounding box of an IlvRect transformed with the
given IlvTransformer. |
static void |
SetJViews60LineStyleMode(boolean flag)
Sets the behavior of current products to JViews 6.0 line style zooming. |
static void |
StartAntiAliasing(Graphics g)
Sets the antialiasing hint on the Graphics. |
static void |
StopAntiAliasing(Graphics g)
Unsets the antialiasing hint on the Graphics. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final float COMPATIBLE_SMOOTHNESS
DrawBezier(java.awt.Graphics,IlvPoint[],int,boolean,float,float,int,int,float[],IlvTransformer,boolean),
DrawClosedBezier(Graphics,IlvPoint[],int,boolean,float,float,int,int,float[],IlvTransformer),
FillBezier(Graphics,IlvPoint[],int,boolean,float,IlvTransformer),
Constant Field Valuespublic static final float AUTO_SMOOTHNESS
DrawBezier(java.awt.Graphics,IlvPoint[],int,boolean,float,float,int,int,float[],IlvTransformer,boolean),
DrawClosedBezier(Graphics,IlvPoint[],int,boolean,float,float,int,int,float[],IlvTransformer),
FillBezier(Graphics,IlvPoint[],int,boolean,float,IlvTransformer),
Constant Field Values| Method Detail |
|---|
public static void DrawPolyline(Graphics g,
IlvPoint[] pts,
int length,
float lineWidth,
int lineJoin,
int endCap,
float[] lineStyle,
IlvTransformer t)
g - The destination Graphics.pts - The control points of the polyline.length - The number of significant points in pts.lineWidth - The width of the pen used to draw the polyline.lineJoin - The 'line join' style used to draw the polyline.
The valid values are defined in the interface IlvStroke.endCap - The 'end cap' style used to draw the polyline.
The valid values are defined in the interface IlvStroke.lineStyle - The array representing the dashing pattern.t - The transformer used to draw the polyline.PolylineBBox(IlvPoint[],int,float,int,int,IlvTransformer),
PointInPolyline(IlvPoint,IlvPoint[],int,float,int,int,IlvTransformer),
IlvStroke
public static void DrawPolyline(Graphics g,
IlvPoint[] pts,
int length,
float lineWidth,
int lineJoin,
int endCap,
float[] lineStyle,
IlvTransformer t,
boolean pointsTransformed)
g - The destination Graphics.pts - The control points of the polyline.length - The number of significant points in pts.lineWidth - The width of the pen used to draw the polyline.lineJoin - The 'line join' style used to draw the polyline.
The valid values are defined in the interface IlvStroke.endCap - The 'end cap' style used to draw the polyline.
The valid values are defined in the interface IlvStroke.lineStyle - The array representing the dashing pattern.t - The transformer used to draw the polyline.pointsTransformed - true, if the control points are already
transformed by the transformer, false otherwise.PolylineBBox(IlvPoint[],int,float,int,int,IlvTransformer),
PointInPolyline(IlvPoint,IlvPoint[],int,float,int,int,IlvTransformer),
IlvStrokepublic static boolean isPrinting(Graphics g)
true if we are currently printing.
The method checks the value of the printing rendering hint key on the
Graphics2D object. The printing rendering hint is automatically
set by the IlvManager on the Graphics2D when you are
printing a layer.
public static boolean PointInPolyline(IlvPoint point,
IlvPoint[] pts,
int length,
float lineWidth,
int lineJoin,
int endCap,
IlvTransformer t)
point - The point to testpts - The control points of the polylinelength - The number of significant points in pts.lineWidth - The width of the pen used to draw the polyline.lineJoin - The 'line join' style used to draw the polyline.
The valid values are defined in the interface IlvStroke.endCap - The 'end cap' style used to draw the polyline.
The valid values are defined in the interface IlvStroke.t - The transformer used to draw the polyline.
true if the point is on the polyline,
false otherwise.DrawPolyline(Graphics,IlvPoint[],int,float,int,int,float[],IlvTransformer),
PolylineBBox(IlvPoint[],int,float,int,int,IlvTransformer),
IlvStroke
public static IlvRect PolylineBBox(IlvPoint[] pts,
int length,
float lineWidth,
int lineJoin,
int endCap,
IlvTransformer t)
pts - The control points of the polyline.length - The number of significant points in pts.lineWidth - The width of the pen used to draw the polyline.lineJoin - The 'line join' style used to draw the polyline.
The valid values are defined in the interface IlvStroke.endCap - The 'end cap' style used to draw the polyline.
The valid values are defined in the interface IlvStroke.t - The transformer used to compute the bbox.DrawPolyline(Graphics,IlvPoint[],int,float,int,int,float[],IlvTransformer),
PointInPolyline(IlvPoint,IlvPoint[],int,float,int,int,IlvTransformer),
IlvStroke
public static void DrawBezier(Graphics g,
IlvPoint[] pts,
int length,
boolean ghosting,
float smoothness,
float lineWidth,
int lineJoin,
int endCap,
float[] lineStyle,
IlvTransformer t,
boolean pointsTransformed)
g - The destination Graphics.pts - The control points of the spline.length - The number of significant points in pts.ghosting - true if the line is drawn during ghosting
that happens during interactive spline creation. In this case, it is
unknown how many control points the user will add later; therefore, the
spline drawing is optimized under the assumption that the user will add
more control points.smoothness - The smoothness of a multipoint spline (between 0 and 1).lineWidth - The width of the pen used to draw the spline.lineJoin - The 'line join' style used to draw the spline.
The valid values are defined in the interface IlvStroke.endCap - The 'end cap' style used to draw the spline.
The valid values are defined in the interface IlvStroke.lineStyle - The array representing the dashing pattern.t - The transformer used to draw the spline.pointsTransformed - May be set to true if the points
in pts are already transformed by the transformer.BezierBoundingBox(IlvRect,IlvPoint[],int,boolean,float,float,int,int,IlvTransformer),
PointInBezier(IlvPoint,IlvPoint[],int,boolean,float,float,int,int,IlvTransformer),
IlvStroke,
IlvMakeSplineInteractor.drawGhost(java.awt.Graphics),
COMPATIBLE_SMOOTHNESS
public static void DrawBezier(Graphics g,
IlvPoint[] pts,
int length,
float lineWidth,
int lineJoin,
int endCap,
float[] lineStyle,
IlvTransformer t)
g - The destination Graphics.pts - The control points of the spline with untransformed coordinates.length - The number of significant points in pts.lineWidth - The width of the pen used to draw the spline.lineJoin - The 'line join' style used to draw the spline.
The valid values are defined in the interface IlvStroke.endCap - The 'end cap' style used to draw the spline.
The valid values are defined in the interface IlvStroke.lineStyle - The array representing the dashing pattern.t - The transformer used to draw the spline.BezierBoundingBox(IlvRect,IlvPoint[],int,float,int,int,IlvTransformer),
PointInBezier(IlvPoint,IlvPoint[],int,float,int,int,IlvTransformer),
IlvStroke
public static void DrawBezier(Graphics g,
IlvPoint[] pts,
int length,
float lineWidth,
int lineJoin,
int endCap,
float[] lineStyle,
IlvTransformer t,
boolean pointsTransformed)
g - The destination Graphics.pts - The control points of the spline.length - The number of significant points in pts.lineWidth - The width of the pen used to draw the spline.lineJoin - The 'line join' style used to draw the spline.
The valid values are defined in the interface IlvStroke.endCap - The 'end cap' style used to draw the spline.
The valid values are defined in the interface IlvStroke.lineStyle - The array representing the dashing pattern.t - The transformer used to draw the spline.pointsTransformed - May be set to true if the points
in pts are already transformed by the transformer.BezierBoundingBox(IlvRect,IlvPoint[],int,float,int,int,IlvTransformer),
PointInBezier(IlvPoint,IlvPoint[],int,float,int,int,IlvTransformer),
IlvStroke
public static void BezierBoundingBox(IlvRect bbox,
IlvPoint[] pts,
int length,
boolean ghosting,
float smoothness,
float lineWidth,
int lineJoin,
int endCap,
IlvTransformer t)
bbox - A rectangle where the result is set.pts - The control points of the spline with untransformed coordinates.length - The number of significant points in pts.ghosting - true if the line is drawn during ghosting
that happens during interactive spline creation. In this case, it is
unknown how many control points the user will add later; therefore, the
spline drawing is optimized under the assumption that the user will add
more control points.smoothness - The smoothness of a multipoint spline (between 0 and 1).lineWidth - The width of the pen used to draw the spline.lineJoin - The 'line join' style used to draw the spline.
The valid values are defined in the interface IlvStroke.endCap - The 'end cap' style used to draw the spline.
The valid values are defined in the interface IlvStroke.t - The transformer used to compute the bbox.DrawBezier(java.awt.Graphics,IlvPoint[],int,boolean,float,float,int,int,float[],IlvTransformer,boolean),
PointInBezier(IlvPoint,IlvPoint[],int,boolean,float,float,int,int,IlvTransformer),
IlvStroke,
IlvMakeSplineInteractor.drawGhost(java.awt.Graphics),
COMPATIBLE_SMOOTHNESS
public static void BezierBoundingBox(IlvRect bbox,
IlvPoint[] pts,
int length,
float lineWidth,
int lineJoin,
int endCap,
IlvTransformer t)
bbox - A rectangle where the result is set.pts - The control points of the spline with untransformed coordinates.length - The number of significant points in pts.lineWidth - The width of the pen used to draw the spline.lineJoin - The 'line join' style used to draw the spline.
The valid values are defined in the interface IlvStroke.endCap - The 'end cap' style used to draw the spline.
The valid values are defined in the interface IlvStroke.t - The transformer used to compute the bbox.DrawBezier(java.awt.Graphics,IlvPoint[],int,float,int,int,float[],IlvTransformer),
PointInBezier(IlvPoint,IlvPoint[],int,float,int,int,IlvTransformer),
IlvStroke
public static boolean PointInBezier(IlvPoint point,
IlvPoint[] pts,
int length,
boolean ghosting,
float smoothness,
float lineWidth,
int lineJoin,
int endCap,
IlvTransformer t)
point - The point to test.pts - The control points of the spline with untransformed coordinates.length - The number of significant points in pts.ghosting - true if the line is drawn during ghosting
that happens during interactive spline creation. In this case, it is
unknown how many control points the user will add later; therefore, the
spline drawing is optimized under the assumption that the user will add
more control points.smoothness - The smoothness of a multipoint spline (between 0 and 1).lineWidth - The width of the pen used to draw the spline.lineJoin - The 'line join' style used to draw the spline.
The valid values are defined in the interface IlvStroke.endCap - The 'end cap' style used to draw the spline.
The valid values are defined in the interface IlvStroke.t - The transformer used to draw the spline.
true if the point is on the Bezier spline,
false otherwise.DrawBezier(java.awt.Graphics,IlvPoint[],int,boolean,float,float,int,int,float[],IlvTransformer,boolean),
BezierBoundingBox(IlvRect,IlvPoint[],int,boolean,float,float,int,int,IlvTransformer),
IlvStroke,
IlvMakeSplineInteractor.drawGhost(java.awt.Graphics),
COMPATIBLE_SMOOTHNESS
public static boolean PointInBezier(IlvPoint point,
IlvPoint[] pts,
int length,
float lineWidth,
int lineJoin,
int endCap,
IlvTransformer t)
point - The point to testpts - The control points of the spline with untransformed coordinates.length - The number of significant points in pts.lineWidth - The width of the pen used to draw the spline.lineJoin - The 'line join' style used to draw the spline.
The valid values are defined in the interface IlvStroke.endCap - The 'end cap' style used to draw the spline.
The valid values are defined in the interface IlvStroke.t - The transformer used to draw the spline.
true if the point is on the Bezier spline,
false otherwise.DrawBezier(java.awt.Graphics,IlvPoint[],int,float,int,int,float[],IlvTransformer),
BezierBoundingBox(IlvRect,IlvPoint[],int,float,int,int,IlvTransformer),
IlvStroke
public static void DrawClosedBezier(Graphics g,
IlvPoint[] pts,
int length,
boolean ghosting,
float smoothness,
float lineWidth,
int lineJoin,
int endCap,
float[] lineStyle,
IlvTransformer t)
g - The destination Graphics.pts - The control points of the spline with untransformed coordinates.length - The number of significant points in pts.ghosting - true if the line is drawn during ghosting
that happens during interactive spline creation. In this case, it is
unknown how many control points the user will add later; therefore, the
spline drawing is optimized under the assumption that the user will add
more control points.smoothness - The smoothness of a multipoint spline (between 0 and 1).lineWidth - The width of the pen used to draw the spline.lineJoin - The 'line join' style used to draw the spline.
The valid values are defined in the interface IlvStroke.endCap - The 'end cap' style used to draw the spline.
The valid values are defined in the interface IlvStroke.lineStyle - The array representing the dashing pattern.t - The transformer used to draw the spline.ClosedBezierBoundingBox(IlvRect,IlvPoint[],int,boolean,float,float,int,int,IlvTransformer),
PointInClosedBezier(IlvPoint,IlvPoint[],int,boolean,float,float,int,int,IlvTransformer),
IlvStroke,
IlvMakeClosedSplineInteractor.drawGhost(java.awt.Graphics),
COMPATIBLE_SMOOTHNESS
public static void DrawClosedBezier(Graphics g,
IlvPoint[] pts,
int length,
float lineWidth,
int lineJoin,
int endCap,
float[] lineStyle,
IlvTransformer t)
g - The destination Graphics.pts - The control points of the spline with untransformed coordinates.length - The number of significant points in pts.lineWidth - The width of the pen used to draw the spline.lineJoin - The 'line join' style used to draw the spline.
The valid values are defined in the interface IlvStroke.endCap - The 'end cap' style used to draw the spline.
The valid values are defined in the interface IlvStroke.lineStyle - The array representing the dashing pattern.t - The transformer used to draw the spline.ClosedBezierBoundingBox(IlvRect,IlvPoint[],int,float,int,int,IlvTransformer),
PointInClosedBezier(IlvPoint,IlvPoint[],int,float,int,int,IlvTransformer),
IlvStroke
public static void ClosedBezierBoundingBox(IlvRect bbox,
IlvPoint[] pts,
int length,
boolean ghosting,
float smoothness,
float lineWidth,
int lineJoin,
int endCap,
IlvTransformer t)
bbox - A rectangle where the result is set.pts - The control points of the spline with untransformed coordinates.length - The number of significant points in pts.ghosting - true if the line is drawn during ghosting
that happens during interactive spline creation. In this case, it is
unknown how many control points the user will add later; therefore, the
spline drawing is optimized under the assumption that the user will add
more control points.smoothness - The smoothness of a multipoint spline (between 0 and 1).lineWidth - The width of the pen used to draw the spline.lineJoin - The 'line join' style used to draw the spline.
The valid values are defined in the interface IlvStroke.endCap - The 'end cap' style used to draw the spline.
The valid values are defined in the interface IlvStroke.t - The transformer used to compute the bbox.DrawClosedBezier(Graphics,IlvPoint[],int,boolean,float,float,int,int,float[],IlvTransformer),
PointInClosedBezier(IlvPoint,IlvPoint[],int,boolean,float,float,int,int,IlvTransformer),
IlvStroke,
IlvMakeClosedSplineInteractor.drawGhost(java.awt.Graphics),
COMPATIBLE_SMOOTHNESS
public static void ClosedBezierBoundingBox(IlvRect bbox,
IlvPoint[] pts,
int length,
float lineWidth,
int lineJoin,
int endCap,
IlvTransformer t)
bbox - A rectangle where the result is set.pts - The control points of the spline with untransformed coordinates.length - The number of significant points in pts.lineWidth - The width of the pen used to draw the spline.lineJoin - The 'line join' style used to draw the spline.
The valid values are defined in the interface IlvStroke.endCap - The 'end cap' style used to draw the spline.
The valid values are defined in the interface IlvStroke.t - The transformer used to compute the bbox.DrawClosedBezier(Graphics,IlvPoint[],int,float,int,int,float[],IlvTransformer),
PointInClosedBezier(IlvPoint,IlvPoint[],int,float,int,int,IlvTransformer),
IlvStroke
public static boolean PointInClosedBezier(IlvPoint point,
IlvPoint[] pts,
int length,
boolean ghosting,
float smoothness,
float lineWidth,
int lineJoin,
int endCap,
IlvTransformer t)
point - The point to test.pts - The control points of the spline with untransformed coordinates.length - The number of significant points in pts.ghosting - true if the line is drawn during ghosting
that happens during interactive spline creation. In this case, it is
unknown how many control points the user will add later; therefore, the
spline drawing is optimized under the assumption that the user will add
more control points.smoothness - The smoothness of a multipoint spline (between 0 and 1).lineWidth - The width of the pen used to draw the spline.lineJoin - The 'line join' style used to draw the spline.
The valid values are defined in the interface IlvStroke.endCap - The 'end cap' style used to draw the spline.
The valid values are defined in the interface IlvStroke.t - The transformer used to draw the spline.
true if the point is on the Bezier spline,
false otherwise.DrawClosedBezier(Graphics,IlvPoint[],int,boolean,float,float,int,int,float[],IlvTransformer),
ClosedBezierBoundingBox(IlvRect,IlvPoint[],int,boolean,float,float,int,int,IlvTransformer),
IlvStroke,
IlvMakeClosedSplineInteractor.drawGhost(java.awt.Graphics),
COMPATIBLE_SMOOTHNESS
public static boolean PointInClosedBezier(IlvPoint point,
IlvPoint[] pts,
int length,
float lineWidth,
int lineJoin,
int endCap,
IlvTransformer t)
point - The point to test.pts - The control points of the spline with untransformed coordinates.length - The number of significant points in pts.lineWidth - The width of the pen used to draw the spline.lineJoin - The 'line join' style used to draw the spline.
The valid values are defined in the interface IlvStroke.endCap - The 'end cap' style used to draw the spline.
The valid values are defined in the interface IlvStroke.t - The transformer used to draw the spline.
true if the point is on the Bezier spline,
false otherwise.DrawClosedBezier(Graphics,IlvPoint[],int,float,int,int,float[],IlvTransformer),
ClosedBezierBoundingBox(IlvRect,IlvPoint[],int,float,int,int,IlvTransformer),
IlvStroke
public static void FillBezier(Graphics g,
IlvPoint[] pts,
int length,
boolean ghosting,
float smoothness,
IlvTransformer t)
g - The destination Graphics.pts - The control points of the spline with untransformed coordinates.length - The number of significant points in pts.ghosting - true if the line is drawn during ghosting
that happens during interactive spline creation. In this case, it is
unknown how many control points the user will add later; therefore, the
spline drawing is optimized under the assumption that the user will add
more control points.smoothness - The smoothness of a multipoint spline (between 0 and 1).t - The transformer used to draw the spline.PointInFilledBezier(IlvPoint,IlvPoint[],int,boolean,float,IlvTransformer),
IlvMakeFilledSplineInteractor.drawGhost(java.awt.Graphics),
COMPATIBLE_SMOOTHNESS
public static void FillBezier(Graphics g,
IlvPoint[] pts,
int length,
IlvTransformer t)
g - The destination Graphics.pts - The control points of the spline with untransformed coordinates.length - The number of significant points in pts.t - The transformer used to draw the spline.PointInFilledBezier(IlvPoint,IlvPoint[],int,IlvTransformer)
public static boolean PointInFilledBezier(IlvPoint point,
IlvPoint[] pts,
int length,
boolean ghosting,
float smoothness,
IlvTransformer t)
point - The point to testpts - The control points of the spline with untransformed coordinates.length - The number of significant points in pts.ghosting - true if the line is drawn during ghosting
that happens during interactive spline creation. In this case, it is
unknown how many control points the user will add later; therefore, the
spline drawing is optimized under the assumption that the user will add
more control points.smoothness - The smoothness of a multipoint spline (between 0 and 1).t - The transformer used to draw the spline.
true if the point is on the Bezier spline,
false otherwise.FillBezier(Graphics,IlvPoint[],int,boolean,float,IlvTransformer),
IlvMakeFilledSplineInteractor.drawGhost(java.awt.Graphics),
COMPATIBLE_SMOOTHNESS
public static boolean PointInFilledBezier(IlvPoint point,
IlvPoint[] pts,
int length,
IlvTransformer t)
point - The point to testpts - The control points of the spline with untransformed coordinates.length - The number of significant points in pts.t - The transformer used to draw the spline.
true if the point is on the Bezier spline,
false otherwise.FillBezier(Graphics,IlvPoint[],int,IlvTransformer)
public static IlvPoint[] GetSmoothSpline(IlvPoint[] originalpoints,
int length,
float smoothness,
boolean ghosting,
IlvPoint[] bezierpoints)
IlvPoints for a smooth spline from
an array of IlvPoints of user control points.
If required space is available in the bezierpoints array,
the method uses it.
The number of significant points in the resulting array is:
length, if length <= 2
(length - 2) * 3 + 1 +
(ghosting?1:0),
if length > 2
originalpoints - The user control points.length - The number of significant points in
originalpoints.smoothness - The smoothness of a multipoint spline (between 0 and 1).ghosting - true if the line is drawn during ghosting
that happens during interactive spline creation. In this case, it is
unknown how many control points the user will add later; therefore, the
spline drawing is optimized under the assumption that the user will add
more control points.bezierpoints - An array of points that is filled. If the array is
null or not large enough, a new array of appropriate size
is allocated and returned.
public static IlvPoint[] GetSmoothSplineHandlesFromBends(IlvPoint[] bendpoints,
int length,
float smoothness,
boolean ghosting,
IlvPoint[] handlepoints)
IlvPoints for a smooth spline
that can be used as selection handle points on the spline.
The returned points are guaranteed to be on the spline.
The number of handle points is always the same as the number of
user control points.
If required space is available in the handlepoints array,
the method uses it.
bendpoints - The user control points.length - The number of significant points in bendpoints.smoothness - The smoothness of a multipoint spline (between 0 and 1).ghosting - true if the line is drawn during ghosting
that happens during interactive spline creation. In this case, it is
unknown how many control points the user will add later; therefore, the
spline drawing is optimized assuming that the user will add
more control points.handlepoints - An array of points that is filled. If the array is
null or not large enough, a new array of appropriate size
is allocated and returned.GetSmoothSpline(ilog.views.IlvPoint[], int, float, boolean),
GetSmoothSplineHandleFromBend(int, ilog.views.IlvPoint[], int, float, boolean),
GetSmoothSplineBendFromHandle(int, ilog.views.IlvPoint, ilog.views.IlvPoint[], int, float, boolean)
public static IlvPoint GetSmoothSplineHandleFromBend(int handleIndex,
IlvPoint[] bendpoints,
int length,
float smoothness,
boolean ghosting)
GetSmoothSplineHandlesFromBends(ilog.views.IlvPoint[], int, float, boolean, ilog.views.IlvPoint[]) returns all handle positions,
this method returns the position of the handle with the given index.
The number of handle points is always the same as the number of
user control points.
handleIndex - The index of the handle.bendpoints - The user control points.length - The number of significant points in bendpoints.smoothness - The smoothness of a multipoint spline (between 0 and 1).ghosting - true if the line is drawn during ghosting
that happens during interactive spline creation. In this case, it is
unknown how many control points the user will add later; therefore, the
spline drawing is optimized assuming that the user will add
more control points.GetSmoothSpline(ilog.views.IlvPoint[], int, float, boolean),
GetSmoothSplineHandlesFromBends(ilog.views.IlvPoint[], int, float, boolean, ilog.views.IlvPoint[]),
GetSmoothSplineBendFromHandle(int, ilog.views.IlvPoint, ilog.views.IlvPoint[], int, float, boolean)
public static IlvPoint GetSmoothSplineBendFromHandle(int handleIndex,
IlvPoint handlePoint,
IlvPoint[] bendpoints,
int length,
float smoothness,
boolean ghosting)
GetSmoothSplineHandleFromBend(int, ilog.views.IlvPoint[], int, float, boolean).
The number of handle points is always the same as the number of
user control points.
handleIndex - The index of the handle.handlePoint - The position of the handle on the spline.bendpoints - The user control points.length - The number of significant points in bendpoints.smoothness - The smoothness of a multipoint spline (between 0 and 1).ghosting - true if the line is drawn during ghosting
that happens during interactive spline creation. In this case, it is
unknown how many control points the user will add later; therefore, the
spline drawing is optimized assuming that the user will add
more control points.GetSmoothSpline(ilog.views.IlvPoint[], int, float, boolean),
GetSmoothSplineHandlesFromBends(ilog.views.IlvPoint[], int, float, boolean, ilog.views.IlvPoint[]),
GetSmoothSplineHandleFromBend(int, ilog.views.IlvPoint[], int, float, boolean)
public static IlvPoint[] GetAutoSmoothSpline(IlvPoint[] originalpoints,
int length,
boolean ghosting,
IlvPoint[] bezierpoints,
int[] flags,
int[] resultingLength)
IlvPoints for a smooth spline from
an array of IlvPoints of user control points.
If required space is available in the bezierpoints array,
the method uses it.
This method analyzes the control points to calculate an appropriate
smoothness automatically. The number of significant points in the
resulting array depends on the position of the control points.
The algorithm needs an auxiliary integer array of the size
length. If an array flags of size
length is passed, this array is used as auxiliary array.
originalpoints - The user control points.length - The number of significant points in
originalpoints.ghosting - true if the line is drawn during ghosting
that happens during interactive spline creation. In this case, it is
unknown how many control points the user will add later; therefore, the
spline drawing is optimized under the assumption that the user will add
more control points.bezierpoints - The returned array.flags - An auxiliary array. Can be null.resultingLength - An array of 1, which will receive the number
of significant points in the returned array.
public static void FillPolygon(Graphics g,
IlvPoint[] points,
int length,
IlvTransformer t)
g - The Graphics object used to draw.points - The control points of the polygon.length - The number of significant
points in points.t - The transformer.
public static void DrawPolygon(Graphics g,
IlvPoint[] points,
int length,
IlvTransformer t)
g - The Graphics object used to draw.points - The control points of the polygon.length - The number of significant
points in points.t - The transformer.
public static boolean PointInPolygon(IlvPoint point,
IlvPoint[] pts,
int length,
IlvTransformer t)
PointInPolygon(IlvPoint,IlvPoint[],int,IlvTransformer) instead.
point - The point to testpts - The control points of the polylinelength - The number of significant points in pts.t - The transformer used to draw the polygon.
true if the point is on the polyline,
false otherwise.FillPolygon(Graphics, IlvPoint[],int,IlvTransformer)
public static boolean PointInPolygon(IlvPoint point,
IlvPoint[] pts,
int length,
IlvTransformer t,
boolean fill)
point - The point to test.pts - The control points of the polyline.length - The number of significant points in pts.t - The transformer used to draw the polygon.fill - Whether the polygon is filled or not.
true if the point is on the polyline,
false otherwise.FillPolygon(Graphics, IlvPoint[],int,IlvTransformer)
public static void FillOutlinedPolygon(Graphics g,
IlvPoint[] points,
int length,
Color fillColor,
Color outlineColor,
IlvTransformer t)
g - The Graphics object used to draw.points - The control points of the polyline.length - The number of significant
points in points.fillColor - The color used to fill the polygon.outlineColor - The color used to draw the outline.t - The transformer.
public static void DrawString(Graphics g,
String text,
int x,
int y,
boolean antialiased)
g - The graphics.text - The string to draw.x - The x position.y - The y position.antialiased - If true the text is antialiased.GetStringBounds(java.lang.String, java.awt.Font, boolean)
public static IlvRect GetStringBounds(String text,
Font font,
boolean antialiased)