|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.reprap.utilities.RrGraphics
public class RrGraphics
Class to plot images of geometrical structures for debugging.
Nested Class Summary | |
---|---|
(package private) class |
RrGraphics.MyComponent
Canvas to paint on |
(package private) class |
RrGraphics.myKB
|
(package private) class |
RrGraphics.myMouse
Clicking the mouse magnifies |
Field Summary | |
---|---|
(package private) static java.awt.Color |
background
|
private BooleanGrid |
bg
|
(package private) static java.awt.Color |
boxes
|
private boolean |
csgSolid
|
private int |
frame
Pixels |
private int |
frameHeight
|
private int |
frameWidth
|
private static java.awt.Graphics2D |
g2d
|
(package private) static java.awt.Color |
hatch0
|
(package private) static java.awt.Color |
hatch1
|
private java.util.List<RrHalfPlane> |
hp
|
(package private) static java.awt.Color |
infill
|
private boolean |
initialised
|
private static javax.swing.JFrame |
jframe
|
private RrRectangle |
originalBox
|
private Rr2Point |
p_0
|
private RrPolygonList |
p_list
|
private boolean |
plot_box
|
(package private) static java.awt.Color |
polygon0
|
(package private) static java.awt.Color |
polygon1
|
private Rr2Point |
pos
|
private double |
scale
|
private RrRectangle |
scaledBox
|
private java.lang.String |
title
|
Constructor Summary | |
---|---|
RrGraphics(RrRectangle b,
java.lang.String t)
Constructor for just a box - add stuff later |
|
RrGraphics(java.lang.String t)
Constructor for nothing - add stuff later |
Method Summary | |
---|---|
void |
add(BooleanGrid b)
|
void |
add(RrPolygonList pl)
|
void |
cleanPolygons()
|
private void |
fillBG(BooleanGrid b)
Recursively fill a Boolean Grid where it's solid. |
void |
init(RrRectangle b,
boolean waitTillDone)
|
boolean |
isInitialised()
|
private Rr2Point |
iTransform(int x,
int y)
Pixels to real-world coordinates |
private void |
move(Rr2Point p)
Move invisibly to a point |
private void |
plot()
Master plot function - draw everything |
private void |
plot(Rr2Point p)
Draw a straight line to a point |
private void |
plot(RrLine a,
RrInterval i)
Plot a section of parametric line |
private void |
plot(RrPolygon p)
Plot a polygon |
private void |
plot(RrRectangle b)
Plot a box |
private void |
setColour(Attributes at)
Set the colour from a RepRap attribute |
private void |
setScales(RrRectangle b)
|
private Rr2Point |
transform(Rr2Point p)
Real-world coordinates to pixels |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
static final java.awt.Color background
static final java.awt.Color boxes
static final java.awt.Color polygon1
static final java.awt.Color polygon0
static final java.awt.Color infill
static final java.awt.Color hatch1
static final java.awt.Color hatch0
private final int frame
private int frameWidth
private int frameHeight
private RrPolygonList p_list
private BooleanGrid bg
private boolean csgSolid
private java.util.List<RrHalfPlane> hp
private double scale
private Rr2Point p_0
private Rr2Point pos
private RrRectangle scaledBox
private RrRectangle originalBox
private static java.awt.Graphics2D g2d
private static javax.swing.JFrame jframe
private boolean plot_box
private java.lang.String title
private boolean initialised
Constructor Detail |
---|
public RrGraphics(RrRectangle b, java.lang.String t)
b
- pb
- public RrGraphics(java.lang.String t)
b
- pb
- Method Detail |
---|
public void cleanPolygons()
private void setScales(RrRectangle b)
public void init(RrRectangle b, boolean waitTillDone)
b
- public boolean isInitialised()
public void add(RrPolygonList pl)
pl
- public void add(BooleanGrid b)
private Rr2Point transform(Rr2Point p)
p
-
private Rr2Point iTransform(int x, int y)
p
-
private void move(Rr2Point p)
p
- private void plot(Rr2Point p)
p
- private void plot(RrRectangle b)
b
- private void setColour(Attributes at)
at
- private void plot(RrPolygon p)
p
- private void plot(RrLine a, RrInterval i)
a
- i
- private void fillBG(BooleanGrid b)
q
- private void plot()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |