Graphic
= type {
...added methods below... }
Method signature | Return type |
---|---|
addToCanvas(
canvas:
DrawingCanvas)
|
Done
|
Add this object to the given canvas. | |
color
|
Color
|
return the color of this object | |
color:=(
c:
Color)
|
Done
|
set the color of this object to c | |
contains(
location:
Point)
|
Boolean
|
Whether the given location is inside this object. | |
isVisible
|
Boolean
|
Whether this object is currently set to be visible on the canvas. | |
location
|
Point
|
The location of this object from the top-left corner of the screen. | |
moveBy(
dx:
Number,
dy:
Number)
|
Done
|
Move this object by the given distances on the canvas. | |
moveTo(
location:
Point)
|
Done
|
Move this object to the given point on the canvas. | |
overlaps(
graphic:
Graphic2D)
|
Boolean
|
Whether any point in the given graphic is inside this object. | |
removeFromCanvas
|
Done
|
Remove this object from its canvas. | |
sendBackward
|
Done
|
send this object down one layer on the screen | |
sendForward
|
Done
|
Send this object up one layer on the screen | |
sendToBack
|
Done
|
send this object to the bottom layer on the screen | |
sendToFront
|
Done
|
send this object to the top layer on the screen | |
visible:=(
value:
Boolean)
|
Done
|
Set whether this object is currently visible on the canvas. | |
x
|
Number
|
The horizontal location of this object from the top-left corner of the screen. | |
y
|
Number
|
The vertical location of this object from the top-left corner of the screen. |