public class ImageLine extends ImageElement
ImageLine
class has functions for image painting.
title: SystemCoreLib
description: functions for image painting
copyright: (c) 2012 thomas kaffka, born at 11/08/1959 in düsseldorf - germany , all rights reserved.
Modifier and Type | Field and Description |
---|---|
static int |
SHORTEN_BOTH |
static int |
SHORTEN_FROM |
static int |
SHORTEN_NO |
static int |
SHORTEN_TO |
Constructor and Description |
---|
ImageLine(double px1,
double py1,
double pz1,
double px2,
double py2,
double pz2,
boolean precalc)
The constructor
ImageLine creates a new instance(object) of the class. |
ImageLine(double px1,
double py1,
double pz1,
double px2,
double py2,
double pz2,
double center_x,
double center_y,
boolean precalc)
The constructor
ImageLine creates a new instance(object) of the class. |
ImageLine(double factor,
int model,
double px1,
double py1,
double pz1,
double px2,
double py2,
double pz2,
boolean precalc)
The constructor
ImageLine creates a new instance(object) of the class. |
Modifier and Type | Method and Description |
---|---|
void |
draw2D(GraphicParameter gp,
boolean convert_coordinates)
The method
draw2D draw 2 dimensional lines. |
void |
draw2D(GraphicParameter gp,
boolean convert_coordinates,
boolean mirror)
The method
draw2D draw 2 dimensional lines. |
void |
draw3D(GraphicParameter gp,
boolean convert_coordinates)
The method
draw2D draw all points of the line list in 2 dimensions. |
double |
getFactor()
get field: the current factor.
|
int |
getModel()
get field: the current model.
|
boolean |
getRecalc()
get field: the current recalc.
|
double |
getX1_old()
get field: the current value of x1.
|
double |
getX1()
get field: the current value of x1.
|
double |
getX2_old()
get field: the current value of x2.
|
double |
getX2()
get field: the current value of x2.
|
double |
getY1_old()
get field: the current value of y1.
|
double |
getY1()
get field: the current value of y1.
|
double |
getY2_old()
get field: the current value of y2.
|
double |
getY2()
get field: the current value of y2.
|
double |
getZ1_old()
get field: the current value of z1.
|
double |
getZ1()
get field: the current value of z1.
|
double |
getZ2_old()
get field: the current value of z2.
|
double |
getZ2()
get field: the current value of z2.
|
void |
setFactor(double input)
set field: the current factor.
|
void |
setModel(int input)
set field: the current model.
|
void |
setRecalc(boolean input)
set field: the current recalc.
|
void |
setX1(double input)
set field: set the field of x1.
|
void |
setX2(double input)
set field: set the field of x2.
|
void |
setY1(double input)
set field: set the field of y1.
|
void |
setY2(double input)
set field: set the field y2.
|
void |
setZ1(double input)
set field: set the field z1.
|
void |
setZ2(double input)
set field: set the field z2.
|
calc3DCoords, getColor, setColor
public static final int SHORTEN_BOTH
public static final int SHORTEN_FROM
public static final int SHORTEN_TO
public static final int SHORTEN_NO
public ImageLine(double px1, double py1, double pz1, double px2, double py2, double pz2, boolean precalc)
ImageLine
creates a new instance(object) of the class.px1
- coordinate.px2
- coordinate.py1
- coordinate.py2
- coordinate.pz1
- coordinate.pz2
- coordinate.precalc
- .public ImageLine(double px1, double py1, double pz1, double px2, double py2, double pz2, double center_x, double center_y, boolean precalc)
ImageLine
creates a new instance(object) of the class.px1
- coordinate.px2
- coordinate.py1
- coordinate.py2
- coordinate.pz1
- coordinate.pz2
- coordinate.center_x
- the center of a 3D image.center_y
- the center of a 3D image.precalc
- .public ImageLine(double factor, int model, double px1, double py1, double pz1, double px2, double py2, double pz2, boolean precalc)
ImageLine
creates a new instance(object) of the class.factor
- decrement of the linear equation.model
- the model of decrementation.px1
- coordinate.px2
- coordinate.py1
- coordinate.py2
- coordinate.pz1
- coordinate.pz2
- coordinate.precalc
- .public double getFactor()
public int getModel()
public boolean getRecalc()
getRecalc
in class ImageElement
public double getX1()
getX1
in class ImageElement
public double getX2()
public double getY1()
getY1
in class ImageElement
public double getY2()
public double getZ1()
getZ1
in class ImageElement
public double getZ2()
public double getX1_old()
getX1_old
in class ImageElement
public double getX2_old()
public double getY1_old()
getY1_old
in class ImageElement
public double getY2_old()
public double getZ1_old()
getZ1_old
in class ImageElement
public double getZ2_old()
public void setFactor(double input)
input
- the factorpublic void setModel(int input)
input
- the modelpublic void setRecalc(boolean input)
setRecalc
in class ImageElement
input
- the recalcpublic void setX1(double input)
setX1
in class ImageElement
input
- x1public void setX2(double input)
input
- x2public void setY1(double input)
setY1
in class ImageElement
input
- y1public void setY2(double input)
input
- y2public void setZ1(double input)
setZ1
in class ImageElement
input
- z1public void setZ2(double input)
input
- z2public void draw2D(GraphicParameter gp, boolean convert_coordinates) throws java.lang.Exception
draw2D
draw 2 dimensional lines.draw2D
in class ImageElement
gp
- the graphic parameters.convert_coordinates
- true = coordinates conversion with calculated factors.java.lang.Exception
- if errorpublic void draw2D(GraphicParameter gp, boolean convert_coordinates, boolean mirror) throws java.lang.Exception
draw2D
draw 2 dimensional lines.gp
- the graphic parameters.convert_coordinates
- true = coordinates conversion with calculated factors.mirror
- mirrors the points at the y axis.java.lang.Exception
- if errorpublic void draw3D(GraphicParameter gp, boolean convert_coordinates) throws java.lang.Exception
draw2D
draw all points of the line list in 2 dimensions.draw3D
in class ImageElement
gp
- the graphic parameters.convert_coordinates
- true = coordinates conversion with calculated factors.java.lang.Exception
- if error