Ejemplo n.º 1
0
 def bezier(self):
     return Bezier(
         (self.a.x, self.a.y),
         (self.b.x - self.a.x, self.b.y - self.a.y),
         (self.ac.x - self.a.x, self.ac.y - self.a.y),
         (self.bc.x - self.a.x, self.bc.y - self.a.y),
     )
Ejemplo n.º 2
0
import sys
import os
sys.path.insert(0, os.path.join(os.path.dirname(__file__), '..'))

import cocos
from cocos.path import Bezier

curva = Bezier((100, 100), (449, 290), (5, 287), (438, 27))
curva2 = Bezier((587, 587), (-454, -591), (-470, -124), (-49, -584))
new = Bezier((100, 100), (200, 200), (108, 268), (438, 27))
new174332 = Bezier((100, 100), (200, 200), (108, 268), (438, 27))
new228555 = Bezier((100, 100), (422, 291), (353, 255), (438, 27))
circulo = Bezier((7, 7), (0, 1), (630, 237), (630, -234))

if __name__ == '__main__':
    print 'this file is part of demo_sprites.py'
Ejemplo n.º 3
0
"""example target for path_draw.py"""
from __future__ import division, print_function, unicode_literals

from cocos.path import Bezier

curva = Bezier((297, 33), (13, 286), (-192, 272), (89, 84))
Ejemplo n.º 4
0
 def new_path(self):
     self.paths.append(
         PathView("new" + str(random.randint(1, 1000000)),
                  Bezier((297, 297), (13, 286), (-192, 272), (89, 84))))
     self.pathp = len(self.paths) - 1
Ejemplo n.º 5
0
 def new_path(self):
     self.paths.append(
         PathView("new" + str(random.randint(1, 1000000)),
                  Bezier((100, 100), (200, 200), (108, 268), (438, 27))))
     self.pathp = len(self.paths) - 1
Ejemplo n.º 6
0
from __future__ import division, print_function, unicode_literals

import cocos
from cocos.path import Bezier

path = Bezier((100, 100), (449, 290), (5, 287), (438, 27))