Coder Social home page Coder Social logo

turtlecityframework's Introduction

TurtleCityFramework

Docs for a specific version of this framework can be found in the wiki tab of this repository

Quick Link: Wiki

Docs Latest Version (v1.3.2.4)

A framework to draw easier with turtle. To work with this module you have to:

  1. Download source or release archive(then unzip)
  2. Make a new file in the same dir
  3. Import this module in the file
  4. Make a scene in the Drawer class.
  5. Call a function from the function list

Example Code:

File Tree:
dir/
   /TurtleInTheCity.py
   /MyFile.py
# MyFile.py

import TurtleInTheCity

Scene = TurtleInTheCity.Drawer()

Scene.DrawRoofedHouse(50, 'peru', 'red')
Scene.RenderSVG('test')

Functions List:

  • DrawRoofedHouse(size, color(optional), roofcolor(optional), windowcolor(optional), doorcolor(optional))
  • DrawFlat(size, color(optional), windowcolor(optional))
  • DrawSun(size, innercolor(optional), outercolor(optional))
  • DrawTree(size, color(optional))
  • DrawCar(size, color(optional))
  • DrawClud(size, outerColor(optional), innerColor(optional))
  • DrawLine(distance)
  • DrawCircle(size, color(optional), fill(bool)(optional), fillcolor(optional))
  • DrawSquare(size, color(optional), fill(bool)(optional), fillcolor(optional))
  • DrawRectangle(size, color(optional), fill(bool)(optional), fillcolor(optional))
  • DrawLetterA(size, color)
  • DrawLetterB(size, color)
  • DrawLetterW(size, color)
  • DrawLetterY(size, color)
  • DrawLetterX(size, color)
  • DrawLetterZ(size, color)
  • Write(text, size, color)
  • TurnLeft(degrees)
  • TurnRight(degrees)
  • StopDrawing()
  • StartDrawing()
  • PenColor(color)
  • FillColor(color)
  • PenSize(size)
  • ChangeShape(shape)
  • RenderSVG(SceneName)
  • MoveUp(pixels)
  • MoveDown(pixels)
  • MoveRight(pixels)
  • MoveLeft(pixels)
  • SetSpeed(0-10)
  • ClearScreen()
  • Delay(seconds)

Examples

alt text alt text alt text

Render options

At this moment you can only render your canvas in a .svg file but soon you will be able to save it in a .png file!

turtlecityframework's People

Contributors

rafayelgardishyan avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.