Easy Draw Module
  • About the Project
  • Student Developed Art
  • 🐍Python
    • Setup and Install
    • Starter Template
    • Example Code
    • Style Guide
    • Module Reference
      • The Drawing Canvas
      • Colors
      • Drawing Shapes
      • Text and Images
      • Property Getting and Setting
      • Object Methods
      • Event Handling
      • Saving Your Drawing
    • Power Users
    • Issues and Features Coming Soon...
  • Python Curriculum
    • Unit 1: Drawing Basics
    • Unit 2: Drawing Algorithms
    • Unit 3: Functions and Events
  • ☕Java
  • Coming Soon...
  • Java Curriculum
    • Unit 1: Using Easy Draw Objects
    • Unit 2: If Statements and Drawings
    • Unit 3: Iteration and Drawings
    • Unit 4: Methods and Classes to Abstract Drawings
    • Tabs
Powered by GitBook
On this page
  • .rotate(angle)
  • .erase()
  • .to_string()
  • Others

Was this helpful?

Export as PDF
  1. Python
  2. Module Reference

Object Methods

.rotate(angle)

Rotates an Easy Draw object by a specified amount of degrees.

Positive numbers rotate the shape clockwise (to the right). Negative numbers rotate the shape counter-clockwise (to the left).

Example:

rect1.rotate(45)

Unsupported objects: Image

.erase()

Deletes the object from the canvas. Once erased, an object can no longer be referenced.

Example:

rect1.erase()

Unsupported objects: None

.to_string()

Returns the string representation of the object. The string will include the object type and ID number used by Easy Draw.

Example:

print(rect1.to_string())

Unsupported objects: None

Others

For information on the .set_property() method see:

For information on the .event_setup() method see:

PreviousProperty Getting and SettingNextEvent Handling

Last updated 4 years ago

Was this helpful?

🐍
Property Getting and Setting
Event Handling