mirror of
https://github.com/phooky/Apple-410.git
synced 2024-05-31 12:41:28 +00:00
quick cut of xt/yt, needs to handle styles
This commit is contained in:
parent
cda0694f04
commit
0e13833b85
|
@ -168,6 +168,42 @@ class CairoPlotter:
|
||||||
p=self.context.get_current_point()
|
p=self.context.get_current_point()
|
||||||
self.context.arc(p[0],p[1],r,0.0,math.pi*2)
|
self.context.arc(p[0],p[1],r,0.0,math.pi*2)
|
||||||
|
|
||||||
|
def yt(self, params):
|
||||||
|
l=coordlist(params,5)
|
||||||
|
left = l[3]
|
||||||
|
right = l[4]
|
||||||
|
num = int(l[2])
|
||||||
|
if l[0]:
|
||||||
|
dist = l[1]
|
||||||
|
tw = dist/num
|
||||||
|
else:
|
||||||
|
dist = l[1]*num
|
||||||
|
tw = l[1]
|
||||||
|
(x,y) = self.context.get_current_point()
|
||||||
|
self.context.line_to(x,y+dist)
|
||||||
|
for i in range(num):
|
||||||
|
y1 = y + tw*(i+1)
|
||||||
|
self.context.move_to(x+left,y1)
|
||||||
|
self.context.line_to(x-right,y1)
|
||||||
|
|
||||||
|
def xt(self, params):
|
||||||
|
l=coordlist(params,5)
|
||||||
|
above = l[3]
|
||||||
|
below = l[4]
|
||||||
|
num = int(l[2])
|
||||||
|
if l[0]:
|
||||||
|
dist = l[1]
|
||||||
|
tw = dist/num
|
||||||
|
else:
|
||||||
|
dist = l[1]*num
|
||||||
|
tw = l[1]
|
||||||
|
(x,y) = self.context.get_current_point()
|
||||||
|
self.context.line_to(x+dist,y)
|
||||||
|
for i in range(num):
|
||||||
|
x1 = x + tw*(i+1)
|
||||||
|
self.context.move_to(x1,y+above)
|
||||||
|
self.context.line_to(x1,y-below)
|
||||||
|
|
||||||
def ac(self,params):
|
def ac(self,params):
|
||||||
l=coordlist(params)
|
l=coordlist(params)
|
||||||
r=l[0]
|
r=l[0]
|
||||||
|
|
Loading…
Reference in New Issue
Block a user