コード例 #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),
     )
コード例 #2
0
ファイル: foo.py プロジェクト: yuvallanger/cocos2d
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'
コード例 #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))
コード例 #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
コード例 #5
0
ファイル: path_draw.py プロジェクト: yuvallanger/cocos2d
 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
コード例 #6
0
ファイル: bezier.py プロジェクト: zyzz19951230/cocos
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))