Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(21)  |  Call(16)  |  Derive(0)  |  Import(5)

src/f/l/Flappy-0.3.7/samples/parasprites.py   Flappy(Download)
from flappy.display import Sprite, Bitmap, BitmapData, Tilesheet
from flappy.events import Event, MouseEvent
from flappy.geom import Rectangle, Point
 
import math
                self.parasprites_ts.addTileRect(
                    Rectangle(twidth * j, theight * i, twidth, theight),
                        Point(twidth * 0.5, theight * 0.5))
 
        self.parasprites = [ ]

src/f/l/Flappy-0.3.7/flappy/display/displayobject.py   Flappy(Download)
from flappy._core import _DisplayObject
from flappy.events import EventDispatcher, Event, EventPhase
from flappy.geom import Transform, ColorTransform, Matrix, Rectangle, Point
from flappy.display import Graphics, BitmapData
 
        target_mat = obj.transform.concatenatedMatrix
 
        xpoint = Point(1.0, 0.0)
        ypoint = Point(0.0, 1.0)
 
    def rotateAroundPoint(self, x, y, deg):
        m = self.transform.matrix
        pt = Point(x, y)
        pt = m.transformPoint(pt)
        m.translate(-pt.x, -pt.y)

src/f/l/Flappy-0.3.7/flappy/geom/matrix.py   Flappy(Download)
import math
 
from flappy.geom import Point
 
class Matrix(object):
    def deltaTransformPoint(self, p):
        return Point(p.x * self.a + p.y * self.c, p.x * self.b, p.y * self.d)
 
    def identity(self):
        self.a = 1.0
    def transformPoint(self, p):
        return Point(p.x * self.a + p.y * self.c + self.tx, 
                        p.x * self.b + p.y * self.d + self.ty)
 
    def translate(self, dx, dy):

src/f/l/Flappy-0.3.7/flappy/display/stage.py   Flappy(Download)
from flappy.events import Event, KeyboardEvent, MouseEvent, TouchEvent
from flappy.events import FocusEvent
from flappy.geom import Point
from flappy.display import DisplayObject, DisplayObjectContainer
 
 
        if self._drag_object != None:
            self._drag(Point(event.x, event.y))
 
        stack = []
            obj = stack[0]
            stack.reverse()
            local = obj.globalToLocal(Point(event.x, event.y))
            evt = MouseEvent._create(etype, event, local, obj)
            evt.delta = wheel
            if from_mouse:
                self._check_in_outs(evt, stack)
            obj._fire_event(evt)
        else:
            local = Point(event.x, event.y)
            obj = stack[0]
            stack.reverse()
            local = obj.globalToLocal(Point(event.x, event.y))
            evt = TouchEvent._create(etype, event, local, obj,
                                        event.sx, event.sy)

src/f/l/Flappy-0.3.7/flappy/geom/rectangle.py   Flappy(Download)
 
from flappy.geom import Point, Matrix
 
class Rectangle(object):
 
    def bottomRight(self):
        return Point(self.x + self.width, self.y + self.height)
 
    @bottomRight.setter
    def bottomRight(self, p):
    def size(self):
        return Point(self.width, self.height)
 
    @size.setter
    def size(self, p):
    def topLeft(self):
        return Point(self.x ,self.y)
 
    @topLeft.setter
    def topLeft(self, p):