* src/docgen/PSDrawDoc.py: remove draw_wedge from BaseDoc

* src/ReportBase/_ReportUtils.py: remove draw_wedge from BaseDoc
* src/plugins/FanChart.py: remove draw_wedge from BaseDoc
* src/BaseDoc.py: remove draw_wedge from BaseDoc

svn: r8121
This commit is contained in:
Brian Matherly
2007-02-15 04:07:53 +00:00
parent 5b457e10bd
commit d5077d219a
5 changed files with 63 additions and 108 deletions

View File

@@ -223,58 +223,6 @@ class PSDrawDoc(BaseDoc.BaseDoc):
self.f.write(fdef)
self.f.write('(%s) show grestore\n' % text)
def draw_wedge(self, style, centerx, centery, radius, start_angle,
end_angle, short_radius=0):
while end_angle < start_angle:
end_angle += 360
p = []
degreestoradians = pi/180.0
radiansdelta = degreestoradians/2
sangle = start_angle*degreestoradians
eangle = end_angle*degreestoradians
while eangle<sangle:
eangle = eangle+2*pi
angle = sangle
if short_radius == 0:
if (end_angle - start_angle) != 360:
p.append((centerx,centery))
else:
origx = (centerx + cos(angle)*short_radius)
origy = (centery + sin(angle)*short_radius)
p.append((origx, origy))
while angle<eangle:
x = centerx + cos(angle)*radius
y = centery + sin(angle)*radius
p.append((x,y))
angle = angle+radiansdelta
x = centerx + cos(eangle)*radius
y = centery + sin(eangle)*radius
p.append((x,y))
if short_radius:
x = centerx + cos(eangle)*short_radius
y = centery + sin(eangle)*short_radius
p.append((x,y))
angle = eangle
while angle>=sangle:
x = centerx + cos(angle)*short_radius
y = centery + sin(angle)*short_radius
p.append((x,y))
angle = angle-radiansdelta
self.draw_path(style,p)
delta = (eangle - sangle)/2.0
rad = short_radius + (radius-short_radius)/2.0
return ( (centerx + cos(sangle+delta) * rad),
(centery + sin(sangle+delta) * rad))
def rotate_text(self,style,text,x,y,angle):
x += self.lmargin