Table of Contents
Example Description
The example demonstrates the various graphical effects in the Python - Brightness, color, fisheye, ghost, mosaic, pixelated, and whirl.

Code

sprite = Sprite('Tobi')
import time

effect = "COLOR"
# effect = "FISHEYE"
# effect = "WHIRL"
# effect = "PIXELATE"
# effect = "MOSAIC"
# effect = "BRIGHTNESS"
# effect = "GHOST"

sprite.gotoxy(0, 0)
sprite.setsize(200)
sprite.cleareffects()
sprite.seteffect(effect, 0)

while True:
  for i in range(10):
    sprite.changeeffect(effect, 5)
    time.sleep(0.1)
  for i in range(10):
    sprite.changeeffect(effect, -5)
    time.sleep(0.1)

Color

Fisheye

Ghost

 

Mosaic

Brightness

 

Pixelate

Whirl