Skip to content

Instantly share code, notes, and snippets.

@thillmann50
thillmann50 / Image Effects.py
Created September 19, 2014 20:57
Image Effects.py
# Image Effects
# Demonstrates some effects using different modules
# from the Python Imaging Library (PIL).
#
# Tip: You can touch and hold an image in the output
# to copy it to the clipboard or save it to your
# camera roll.
import Image, ImageOps, ImageFilter
from Image import BILINEAR
@thillmann50
thillmann50 / ColorMixer.py
Created September 19, 2014 20:57
ColorMixer.py
# ColorMixer
# A simple RGB color mixer with three sliders.
import ui
import clipboard
from random import random
from console import hud_alert
def slider_action(sender):
# Get the root view:
@thillmann50
thillmann50 / Clock.py
Created September 19, 2014 20:56
Clock.py
# Clock
#
# An analog clock that demonstrates drawing basic
# shapes with the scene module.
from scene import *
from time import localtime
ipad = False #will be set in the setup method
@thillmann50
thillmann50 / Cascade.py
Created September 19, 2014 20:56
Cascade.py
# Cascade Game
#
# This is a complete game that demonstrates drawing images
# and text, handling touch events and combining simple drawing
# with layer animations.
#
# The game is also known as "Same Game".
# It may appear simple at first, but getting a good score
# actually requires some strategy.
@thillmann50
thillmann50 / Cards.py
Created September 19, 2014 20:55
Cards.py
# Card Game
#
# In this game, you have to find matching pairs of cards.
# This scene consists entirely of layers and demonstrates some
# interesting animation techniques.
from scene import *
from random import shuffle
from functools import partial
import sound
@thillmann50
thillmann50 / Calculator.py
Created September 19, 2014 20:27
Calculator.py
# coding: utf-8
# Calculator
from __future__ import division
import ui
import clipboard
from console import hud_alert
shows_result = False