public final class Painter
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private java.awt.Color[] |
colorTable |
private double |
ctMax |
private double |
ctMin |
private java.awt.BasicStroke |
dashedStroke |
private java.awt.Graphics2D |
g |
private java.awt.BasicStroke |
normalStroke |
(package private) java.awt.geom.AffineTransform |
normalTransform |
private PointPainter |
pointPainter |
(package private) java.awt.geom.AffineTransform |
upTransform |
private Box |
wkBox |
private WorldTransform |
worldTransform |
Constructor and Description |
---|
Painter(WorldTransform transform) |
Modifier and Type | Method and Description |
---|---|
void |
draw3DAreaMarks(float[][] ca,
int n,
double diam) |
void |
draw3DCarrot(double xa,
double ya,
double za,
double ra,
double xb,
double yb,
double zb,
double rb) |
void |
draw3DCircle(double x,
double y,
double z,
double r) |
void |
draw3DIntMarks(float[][] ca,
int n,
int w,
int h) |
void |
draw3DLine(double xa,
double ya,
double za,
double xb,
double yb,
double zb) |
void |
draw3DMark(double x,
double y,
double z,
int ityp,
int isize) |
void |
draw3DMarks(float[][] ca,
int n) |
void |
draw3DOutline(double xa,
double ya,
double za,
double ra,
double xb,
double yb,
double zb,
double rb) |
void |
draw3DPoint(double x,
double y,
double z) |
void |
draw3DPolygon(double[][] da) |
void |
draw3DSegment(double xa,
double ya,
double za,
double ra,
double xb,
double yb,
double zb,
double rb) |
void |
draw3DZOffsetLine(double xa,
double ya,
double za,
double xb,
double yb,
double zb,
double z0,
double dpdz) |
void |
drawAreaMarks(double[] xp,
double[] yp,
double diam) |
void |
drawAxes() |
void |
drawCable(Position pa,
Position pcenter,
Position pb) |
void |
drawCarrotSides(double xa,
double ya,
double ra,
double xb,
double yb,
double rb) |
void |
drawCenteredBox(Position pos,
int hx,
int hy) |
void |
drawCenteredLabel(java.lang.String s,
double x,
double y) |
void |
drawCenteredOval(double cx,
double cy,
double rx,
double ry,
java.awt.Color clin,
double width,
boolean widthIsPixels) |
void |
drawCenteredOval(double cx,
double cy,
int hx,
int hy) |
void |
drawCenteredOval(Position pos,
int hx,
int hy) |
void |
drawCenteredPixelLine(double x,
double y,
int[] xpts,
int[] ypts) |
void |
drawCenteredString(java.lang.String s,
int x,
int y) |
void |
drawCircle(double x,
double y,
double r) |
void |
drawCircle(Position position,
double radius) |
void |
drawColoredCells(double[][][] mesh,
double[] dat) |
void |
drawColoredCells(double[][][] mesh,
double[] dat,
boolean[] mask) |
void |
drawDashedRectangle(double cx,
double cy,
double rx,
double ry) |
void |
drawFilledOval(double cx,
double cy,
double rx,
double ry,
java.awt.Color cfill,
java.awt.Color cborder,
double width,
boolean widthIsPixels) |
void |
drawFilledRectangle(double cx,
double cy,
double rx,
double ry,
java.awt.Color cfill,
java.awt.Color cborder,
double width,
boolean widthIsPixels) |
void |
drawFilledRectangle(double cx,
double cy,
int w,
int h,
java.awt.Color cfill) |
void |
drawFilledTriangle(double x0,
double y0,
double x1,
double y1,
double x2,
double y2,
java.awt.Color fillColor,
java.awt.Color color,
double width,
boolean b) |
void |
drawFixedSizeLine(double x,
double y,
java.awt.Color c,
int idx,
int idy,
int wfac) |
void |
drawHalfCable(double x0,
double y0,
double dx0,
double dy0,
double x1,
double y1,
int n) |
void |
drawIntCircle(double x,
double y,
int r) |
void |
drawIntMarks(double[] xp,
double[] yp,
int n,
int w,
int h) |
void |
drawLabel(java.lang.String s,
double x,
double y) |
void |
drawLabel(java.lang.String s,
double x,
double y,
java.awt.Color c) |
void |
drawLabelAt(java.lang.String s,
int ix,
int iy) |
void |
drawLeftAlignedLabel(java.lang.String s,
double x,
double y) |
void |
drawLine(double x0,
double y0,
double x1,
double y1) |
void |
drawLine(double x0,
double y0,
double x1,
double y1,
java.awt.Color col,
double width,
boolean widthIsPixels) |
void |
drawLine(Position p1,
Position p2) |
void |
drawLineOffsetText(java.lang.String s,
double x,
double y,
int dx,
int dy) |
void |
drawMarks(double[] xp,
double[] yp) |
void |
drawMarks(double[] xp,
double[] yp,
int n) |
void |
drawOffsetCenteredLabel(java.lang.String s,
double x,
double y) |
(package private) void |
drawOutline(double xa,
double ya,
double ra,
double xb,
double yb,
double rb) |
void |
drawOval(double cx,
double cy,
double rx,
double ry,
java.awt.Color cborder,
double width,
boolean widthIsPixels) |
void |
drawPixelLine(int x0,
int y0,
int x1,
int y1) |
void |
drawPolygon(double[] xp,
double[] yp) |
void |
drawPolygon(double[] xp,
double[] yp,
int np) |
void |
drawPolygon(double[] xp,
double[] yp,
int np,
java.awt.Color col,
double width,
boolean widthIsPixels) |
(package private) void |
drawPolyline(double[] xp,
double[] yp) |
void |
drawPolyline(double[] xp,
double[] yp,
int np) |
void |
drawPolyline(double[] xp,
double[] yp,
int np,
java.awt.Color col,
double width,
boolean widthIsPixels) |
void |
drawRectangle(double cx,
double cy,
double rx,
double ry,
java.awt.Color cborder,
double width,
boolean widthIsPixels) |
void |
drawRectangle(int[] xyxy) |
void |
drawRightAlignedLabel(java.lang.String s,
double x,
double y) |
(package private) void |
drawSides(double xa,
double ya,
double ra,
double xb,
double yb,
double rb) |
void |
drawSome3DMarks(float[][] ca,
int n,
double pas) |
void |
drawString(java.lang.String s,
int x,
int y) |
void |
drawString3D(double x,
double y,
double z,
java.lang.String lbl) |
void |
drawString3DOffset(double x,
double y,
double z,
java.lang.String lbl,
int idx,
int idy) |
void |
drawText(java.lang.String s,
double x,
double y) |
void |
drawUpLabel(java.lang.String s,
double x,
double y) |
void |
drawUpLabel(java.lang.String s,
double x,
double y,
java.awt.Color c) |
void |
drawUpper3DAreaMarks(float[][] ca,
int n,
double diam,
double zp,
double zd) |
void |
drawUpper3DIntMarks(float[][] ca,
int n,
int w,
int h,
double zp,
double zd) |
void |
drawUpperSome3DMarks(float[][] ca,
int n,
double pas,
double zp,
double zd) |
void |
drawWhiteLine(double width,
double[] xp,
double[] yp) |
void |
drawXCenteredYBottomAlignedLabel(java.lang.String s,
double x,
double y) |
void |
drawXCenteredYTopAlignedLabel(java.lang.String s,
double x,
double y) |
double |
dxydp() |
void |
fill3DCircle(double x,
double y,
double z,
double r) |
void |
fill3DOval(double x,
double y,
double z,
int hw,
int hh) |
void |
fill3DSegment(double xa,
double ya,
double za,
double ra,
double xb,
double yb,
double zb,
double rb) |
void |
fillBackground(java.awt.Color c) |
void |
fillCenteredBox(Position pos,
int hx,
int hy) |
void |
fillCenteredOval(double cx,
double cy,
double rx,
double ry,
java.awt.Color cfill) |
void |
fillCenteredOval(Position pos,
int ir) |
void |
fillCenteredRectangle(double x,
double y,
double rx,
double ry) |
void |
fillCircle(double x,
double y,
double r) |
void |
fillCircle(Position position,
double radius) |
void |
fillIntCircle(double x,
double y,
int r) |
void |
fillIntRectangle(int x,
int y,
int cw,
int ch,
java.awt.Color color) |
(package private) void |
fillOutline(double xa,
double ya,
double ra,
double xb,
double yb,
double rb) |
void |
fillPixelRectangle(int ix,
int iy,
java.awt.Color c,
int size) |
void |
fillPolygon(double[] xp,
double[] yp) |
void |
fillPolygon(double[] xp,
double[] yp,
int np) |
void |
fillPolygon(double[] xp,
double[] yp,
int np,
java.awt.Color col) |
void |
fillPolygon(Polypoint pp,
int cfill,
int cline) |
void |
fillRectangle(double x,
double y,
java.awt.Color c,
int size) |
void |
fillRectangle(double x1,
double y1,
double x2,
double y2,
java.awt.Color c) |
Box |
getBox() |
int |
getCanvasHeight() |
int |
getCanvasWidth() |
java.awt.Graphics2D |
getGraphics() |
int |
getLabelPoint(double[] xpts,
double[] ypts) |
double |
getPixelArea() |
Size |
getPixelSize() |
(package private) PointPainter |
getPointPainter() |
double |
getWorldCanvasWidth() |
double |
getXProj(double[] c) |
double |
getXProj(float[] c) |
int |
getXProjPixel(double x,
double y,
double z) |
double[] |
getXYXYLimits() |
double |
getYProj(double[] c) |
double |
getYProj(float[] c) |
int |
getYProjPixel(double x,
double y,
double z) |
double |
getZProj(double[] c) |
double |
getZProj(double x,
double y,
double z) |
double |
getZProj(float[] c) |
boolean |
intIsOnCanvas(int x,
int y) |
boolean |
isOnCanvas(double x,
double y) |
boolean |
isOnCanvas(Position p) |
boolean |
isShowing(double x,
double y) |
void |
paintLegend(int ileg,
java.lang.String s) |
void |
paintLiveTrash() |
void |
paintTrash() |
void |
paintTrash(boolean live) |
IntPosition |
pow(Position p) |
int |
powx(double wx) |
int |
powy(double wy) |
void |
push(double x,
double y) |
void |
push3D(double x,
double y,
double z) |
void |
reframe(Box box) |
private void |
resetStroke() |
int |
screenDistance2(double x,
double y,
double z,
int x2,
int y2) |
(package private) void |
setBasicStroke(double w) |
void |
setColor(java.awt.Color c) |
void |
setColor(SColor sc) |
void |
setColorBlack() |
void |
setColorBlue() |
void |
setColorCyan() |
void |
setColorDarkGray() |
void |
setColorGray() |
void |
setColorGreen() |
void |
setColorMagenta() |
void |
setColorOrange() |
void |
setColorRange(double ca,
double cb) |
void |
setColorRed() |
void |
setColorTable(java.awt.Color[] ct) |
void |
setColorWhite() |
void |
setColorYellow() |
(package private) void |
setDashedStroke(double w) |
void |
setDefaultColorTable() |
void |
setGraphics(java.awt.Graphics2D g2d) |
void |
setIntColor(int icol) |
(package private) void |
setNormalStroke() |
void |
setPixelScalingFromTop(double d) |
void |
setStroke(java.awt.BasicStroke bs) |
(package private) void |
setWorldTransform(WorldTransform transform) |
void |
startBox() |
int |
stringWidth(java.lang.String s) |
boolean |
visible3D(double x,
double y,
double z) |
Position |
wop(IntPosition ip) |
double |
wopx(int x) |
double |
wopy(int y) |
(package private) double |
xProj(double x,
double y,
double z) |
(package private) double |
yProj(double x,
double y,
double z) |
private double |
zProj(double x,
double y,
double z) |
private WorldTransform worldTransform
private java.awt.Graphics2D g
private java.awt.BasicStroke normalStroke
private java.awt.BasicStroke dashedStroke
private PointPainter pointPainter
java.awt.geom.AffineTransform upTransform
java.awt.geom.AffineTransform normalTransform
private java.awt.Color[] colorTable
private double ctMin
private double ctMax
private Box wkBox
public Painter(WorldTransform transform)
PointPainter getPointPainter()
public boolean isShowing(double x, double y)
public void reframe(Box box)
public int getCanvasWidth()
public double getWorldCanvasWidth()
public int getCanvasHeight()
public Size getPixelSize()
public double getPixelArea()
public boolean isOnCanvas(Position p)
public boolean isOnCanvas(double x, double y)
public boolean intIsOnCanvas(int x, int y)
public void setPixelScalingFromTop(double d)
public final double[] getXYXYLimits()
void setWorldTransform(WorldTransform transform)
public void setGraphics(java.awt.Graphics2D g2d)
public java.awt.Graphics2D getGraphics()
public IntPosition pow(Position p)
public double dxydp()
public int powx(double wx)
public int powy(double wy)
public Position wop(IntPosition ip)
public double wopx(int x)
public double wopy(int y)
void setBasicStroke(double w)
void setDashedStroke(double w)
void setNormalStroke()
private void resetStroke()
public void setStroke(java.awt.BasicStroke bs)
public final void drawPixelLine(int x0, int y0, int x1, int y1)
void drawPolyline(double[] xp, double[] yp)
public void drawPolyline(double[] xp, double[] yp, int np)
public void drawPolyline(double[] xp, double[] yp, int np, java.awt.Color col, double width, boolean widthIsPixels)
public void drawMarks(double[] xp, double[] yp)
public void drawMarks(double[] xp, double[] yp, int n)
public void drawIntMarks(double[] xp, double[] yp, int n, int w, int h)
public void drawAreaMarks(double[] xp, double[] yp, double diam)
public void drawPolygon(double[] xp, double[] yp)
public void drawPolygon(double[] xp, double[] yp, int np)
public void drawPolygon(double[] xp, double[] yp, int np, java.awt.Color col, double width, boolean widthIsPixels)
public void fillPolygon(double[] xp, double[] yp, int np)
public void fillPolygon(double[] xp, double[] yp, int np, java.awt.Color col)
public void fillPolygon(double[] xp, double[] yp)
public void fillPolygon(Polypoint pp, int cfill, int cline)
public void setColor(SColor sc)
public void setColor(java.awt.Color c)
public void setColorWhite()
public void setColorRed()
public void setColorGreen()
public void setColorBlue()
public void setColorBlack()
public void setColorGray()
public void setColorCyan()
public void setColorMagenta()
public void setColorYellow()
public void setColorOrange()
public void setColorDarkGray()
public void drawWhiteLine(double width, double[] xp, double[] yp)
public void fillRectangle(double x, double y, java.awt.Color c, int size)
public void fillRectangle(double x1, double y1, double x2, double y2, java.awt.Color c)
public void fillPixelRectangle(int ix, int iy, java.awt.Color c, int size)
public void drawLine(double x0, double y0, double x1, double y1, java.awt.Color col, double width, boolean widthIsPixels)
public void drawLine(double x0, double y0, double x1, double y1)
public void drawCenteredBox(Position pos, int hx, int hy)
public void fillCenteredBox(Position pos, int hx, int hy)
public void drawFixedSizeLine(double x, double y, java.awt.Color c, int idx, int idy, int wfac)
public void drawText(java.lang.String s, double x, double y)
public void drawLineOffsetText(java.lang.String s, double x, double y, int dx, int dy)
public void drawString(java.lang.String s, int x, int y)
public void drawCenteredString(java.lang.String s, int x, int y)
public void drawLabel(java.lang.String s, double x, double y, java.awt.Color c)
public void drawUpLabel(java.lang.String s, double x, double y, java.awt.Color c)
public void drawUpLabel(java.lang.String s, double x, double y)
public void drawLabel(java.lang.String s, double x, double y)
public void drawCenteredLabel(java.lang.String s, double x, double y)
public void drawXCenteredYTopAlignedLabel(java.lang.String s, double x, double y)
public void drawLeftAlignedLabel(java.lang.String s, double x, double y)
public void drawRightAlignedLabel(java.lang.String s, double x, double y)
public void drawXCenteredYBottomAlignedLabel(java.lang.String s, double x, double y)
public void fillCenteredRectangle(double x, double y, double rx, double ry)
public void drawCircle(double x, double y, double r)
public void fillCircle(double x, double y, double r)
public void fillIntCircle(double x, double y, int r)
public void drawIntCircle(double x, double y, int r)
public void fillCenteredOval(double cx, double cy, double rx, double ry, java.awt.Color cfill)
public void fillCenteredOval(Position pos, int ir)
public void drawCenteredOval(double cx, double cy, double rx, double ry, java.awt.Color clin, double width, boolean widthIsPixels)
public void drawCenteredOval(double cx, double cy, int hx, int hy)
public void drawCenteredOval(Position pos, int hx, int hy)
public void drawFilledOval(double cx, double cy, double rx, double ry, java.awt.Color cfill, java.awt.Color cborder, double width, boolean widthIsPixels)
public void drawFilledRectangle(double cx, double cy, int w, int h, java.awt.Color cfill)
public void drawFilledRectangle(double cx, double cy, double rx, double ry, java.awt.Color cfill, java.awt.Color cborder, double width, boolean widthIsPixels)
public void drawRectangle(double cx, double cy, double rx, double ry, java.awt.Color cborder, double width, boolean widthIsPixels)
public void drawRectangle(int[] xyxy)
public void drawDashedRectangle(double cx, double cy, double rx, double ry)
public void drawOval(double cx, double cy, double rx, double ry, java.awt.Color cborder, double width, boolean widthIsPixels)
public void drawCarrotSides(double xa, double ya, double ra, double xb, double yb, double rb)
public int getLabelPoint(double[] xpts, double[] ypts)
public void drawOffsetCenteredLabel(java.lang.String s, double x, double y)
public void drawLabelAt(java.lang.String s, int ix, int iy)
public int stringWidth(java.lang.String s)
public void drawFilledTriangle(double x0, double y0, double x1, double y1, double x2, double y2, java.awt.Color fillColor, java.awt.Color color, double width, boolean b)
public void drawCircle(Position position, double radius)
public void fillCircle(Position position, double radius)
public void paintTrash()
public void paintTrash(boolean live)
public void paintLiveTrash()
public void fillBackground(java.awt.Color c)
public void fillIntRectangle(int x, int y, int cw, int ch, java.awt.Color color)
public void drawCenteredPixelLine(double x, double y, int[] xpts, int[] ypts)
public void setIntColor(int icol)
public final void drawHalfCable(double x0, double y0, double dx0, double dy0, double x1, double y1, int n)
public void setColorRange(double ca, double cb)
public void setColorTable(java.awt.Color[] ct)
public void setDefaultColorTable()
public void drawColoredCells(double[][][] mesh, double[] dat)
public void drawColoredCells(double[][][] mesh, double[] dat, boolean[] mask)
public void paintLegend(int ileg, java.lang.String s)
public double getXProj(double[] c)
public double getYProj(double[] c)
public double getZProj(double[] c)
public double getXProj(float[] c)
public double getYProj(float[] c)
public double getZProj(float[] c)
public double getZProj(double x, double y, double z)
public int getXProjPixel(double x, double y, double z)
public int getYProjPixel(double x, double y, double z)
double xProj(double x, double y, double z)
double yProj(double x, double y, double z)
private double zProj(double x, double y, double z)
public final void draw3DPoint(double x, double y, double z)
public final void fill3DOval(double x, double y, double z, int hw, int hh)
public final void draw3DCircle(double x, double y, double z, double r)
public final void fill3DCircle(double x, double y, double z, double r)
public final void draw3DMark(double x, double y, double z, int ityp, int isize)
public final void draw3DZOffsetLine(double xa, double ya, double za, double xb, double yb, double zb, double z0, double dpdz)
final void drawOutline(double xa, double ya, double ra, double xb, double yb, double rb)
final void drawSides(double xa, double ya, double ra, double xb, double yb, double rb)
final void fillOutline(double xa, double ya, double ra, double xb, double yb, double rb)
public final void draw3DLine(double xa, double ya, double za, double xb, double yb, double zb)
public final void draw3DOutline(double xa, double ya, double za, double ra, double xb, double yb, double zb, double rb)
public final void fill3DSegment(double xa, double ya, double za, double ra, double xb, double yb, double zb, double rb)
public final void draw3DCarrot(double xa, double ya, double za, double ra, double xb, double yb, double zb, double rb)
public final void draw3DSegment(double xa, double ya, double za, double ra, double xb, double yb, double zb, double rb)
public void drawString3D(double x, double y, double z, java.lang.String lbl)
public void drawString3DOffset(double x, double y, double z, java.lang.String lbl, int idx, int idy)
public final boolean visible3D(double x, double y, double z)
public void draw3DMarks(float[][] ca, int n)
public void drawSome3DMarks(float[][] ca, int n, double pas)
public void draw3DIntMarks(float[][] ca, int n, int w, int h)
public void draw3DAreaMarks(float[][] ca, int n, double diam)
public void drawUpperSome3DMarks(float[][] ca, int n, double pas, double zp, double zd)
public void drawUpper3DIntMarks(float[][] ca, int n, int w, int h, double zp, double zd)
public void drawUpper3DAreaMarks(float[][] ca, int n, double diam, double zp, double zd)
public void draw3DPolygon(double[][] da)
public void startBox()
public Box getBox()
public void push3D(double x, double y, double z)
public void push(double x, double y)
public void drawAxes()
public int screenDistance2(double x, double y, double z, int x2, int y2)
Copyright © 2013. All Rights Reserved.