Python Graphics Library Turtle

Source: Internet
Author: User

Brush drawing State functions
Function Describe
Pendown () Drop Brush
Penup () Lift the brush to use with Pendown ()
Pensize (width) Sets the thickness of the brush line to the specified size
Brush Motion function
Function Describe
Forward () Advance the specified distance in the current direction
Backward () Backward in the current opposite direction specify the distance
Right (angle) Rotate angle angle to the right
Left (angle) Rotate angle angle to the left
Goto (x, y) Move to absolute coordinates (x, y)
SETX () Move the current x axis to the specified position
Sety () Moves the current y-axis to the specified position
Setheading (angle) Sets the current orientation to angle angle
Home () Sets the current brush position as the origin, facing right
Circle (STEP) Draws a specified radius, angle, and drawing steps
Dot (R,color) Draws the center of a specified radius and color
Undo () Undo the last move of a brush
Speed () Sets the drawing speed of the brush, with a parameter of 0-10
Functions to control brush color and font
Function Describe
Color () Set the color of a brush
Begin_fill () Call this method before populating the drawing
End_fill () Fill graphics end, use with Begin_fill ()
Filling () Returns the fill status, true for padding, false opposite
Clear () Clears the current window without changing the current brush position
Reset () Clears the current window and resets the position to the default value
ScreenSize () Set the length and width of the canvas
Hideturtle () Hide the turtle shape of a brush
Showturtle () Show the turtle shape of a brush
IsVisible () Returns True if Turtle is visible
Write (Str,font=none) String to output font font

Python Graphics Library Turtle

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.