public class Tube extends DrawShape
Modifier and Type | Field and Description |
---|---|
private int |
radius
The radius of the initial circle
|
Constructor and Description |
---|
Tube(Paint paint,
double[] tl,
double[] br)
Create a Tube
|
Tube(Paint paint,
int x,
int y,
int r)
Create a Tube
|
Modifier and Type | Method and Description |
---|---|
void |
draw(javafx.scene.canvas.GraphicsContext graphics,
boolean fill)
Draws this shape
Some shapes (like Tube) may ignore the fill parameter |
private void |
drawInset(javafx.scene.canvas.GraphicsContext graphics,
int inset,
int width)
Recursively draws the inset circles of the shape
|
public Tube(Paint paint, int x, int y, int r)
paint
- the main class of the programx
- the x-coordinate of the center of the first circley
- the y-coordinate of the center of the first circler
- the radius of the first circlepublic Tube(Paint paint, double[] tl, double[] br)
paint
- the main class of the programtl
- the top left corner of the first circlebr
- the bottom right corner of the first circlepublic void draw(javafx.scene.canvas.GraphicsContext graphics, boolean fill)
DrawShape
private void drawInset(javafx.scene.canvas.GraphicsContext graphics, int inset, int width)
graphics
- the GraphicsContext on which to drawinset
- the inset distance from the previous circlewidth
- the width of the new circle