Module Reference
Everything you can do with the Java version of Easy Draw (EasyDraw.java).
Everything in Easy Draw is inside the EasyDraw class:
Methods are called on the class, like
EasyDraw.loadCanvas().Shapes are made with
new EasyDraw.ShapeName(...)and the required values in order, likenew EasyDraw.Circle(centerX, centerY, radius).Optional properties use setters and getters, like
setColor("red")andgetRadius().
Coming from the Python version?
The Java version can do everything the Python version can. Here is how they differ:
easy_draw.load_canvas()
EasyDraw.loadCanvas()
easy_draw.Circle(center_xy = (300, 300), radius = 50)
new EasyDraw.Circle(300, 300, 50)
color = "red" or color = (255, 0, 0)
setColor("red") or setColor(255, 0, 0)
circle.radius
circle.getRadius()
circle.set_property(radius = 80)
circle.setRadius(80)
circle.set_property(center_xy = (100, 200))
circle.setCenter(100, 200)
points_list = [100, 100, 200, 200]
new EasyDraw.Line(100, 100, 200, 200)
dashes = None / border_color = None
setDashes(0) / setBorderColor(null)
def handler(event): and event_setup("<Button-1>", handler)
eventSetup("<Button-1>", event -> { ... })
event.char
event.character
EasyDrawError
EasyDraw.EasyDrawException
Files are found next to your program
Files are found in the folder you run your program from
The canvas, colors, and event names are the same in both versions.
Was this helpful?