Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 70bc3e8

Browse files
committed
added rotation arg to draw_arc method everywhere it was missing
svn path=/trunk/matplotlib/; revision=2779
1 parent e8ad856 commit 70bc3e8

8 files changed

Lines changed: 9 additions & 11 deletions

File tree

lib/matplotlib/backends/backend_agg2.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ def draw_lines(self, gc, x, y, trans):
8787
def draw_markers(self, gc, path, rgbFace, xt, yt, trans):
8888
pass
8989

90-
def draw_arc(self, gcEdge, rgbFace, x, y, width, height, angle1, angle2):
90+
def draw_arc(self, gcEdge, rgbFace, x, y, width, height, angle1, angle2, rotation):
9191
pass
9292

9393
def draw_image(self, x, y, im, origin, bbox):

lib/matplotlib/backends/backend_emf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ def __init__(self, outfile, width, height, dpi):
151151
def save(self):
152152
self.emf.save(self.outfile)
153153

154-
def draw_arc(self, gcEdge, rgbFace, x, y, width, height, angle1, angle2):
154+
def draw_arc(self, gcEdge, rgbFace, x, y, width, height, angle1, angle2, rotation):
155155
"""
156156
Draw an arc using GraphicsContext instance gcEdge, centered at x,y,
157157
with width and height and angles from 0.0 to 360.0

lib/matplotlib/backends/backend_gd.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ def flipy(self):
8686
return True
8787

8888

89-
def draw_arc(self, gc, rgbFace, x, y, width, height, angle1, angle2):
89+
def draw_arc(self, gc, rgbFace, x, y, width, height, angle1, angle2, rotation):
9090
"""
9191
Draw an arc centered at x,y with width and height and angles
9292
from 0.0 to 360.0

lib/matplotlib/backends/backend_gdk.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -86,18 +86,18 @@ def set_width_height (self, width, height):
8686
"""
8787
self.width, self.height = width, height
8888

89-
def draw_arc(self, gc, rgbFace, x, y, width, height, angle1, angle2):
89+
def draw_arc(self, gc, rgbFace, x, y, width, height, angle1, angle2, rotation):
9090
x, y = int(x-0.5*width), self.height-int(y+0.5*height)
9191
w, h = int(width)+1, int(height)+1
9292
a1, a2 = int(angle1*64), int(angle2*64)
9393

9494
if rgbFace:
9595
saveColor = gc.gdkGC.foreground
9696
gc.gdkGC.foreground = gc.rgb_to_gdk_color(rgbFace)
97-
self.gdkDrawable.draw_arc(gc.gdkGC, True, x, y, w, h, a1, a2)
97+
self.gdkDrawable.draw_arc(gc.gdkGC, True, x, y, w, h, a1, a2, rotation)
9898
gc.gdkGC.foreground = saveColor
9999
if gc.gdkGC.line_width > 0:
100-
self.gdkDrawable.draw_arc(gc.gdkGC, False, x, y, w, h, a1, a2)
100+
self.gdkDrawable.draw_arc(gc.gdkGC, False, x, y, w, h, a1, a2, rotation)
101101

102102

103103
def draw_image(self, x, y, im, bbox):

lib/matplotlib/backends/backend_paint.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ def get_paint_color(self, rgb):
120120
r,g,b = rgb
121121
return paint.rgb(int(r*255),int(g*255),int(b*255))
122122

123-
def draw_arc(self, gcEdge, rgbFace, x, y, width, height, angle1, angle2):
123+
def draw_arc(self, gcEdge, rgbFace, x, y, width, height, angle1, angle2, rotation):
124124
"""
125125
Draw an arc centered at x,y with width and height and angles
126126
from 0.0 to 360.0.

lib/matplotlib/backends/backend_svg.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ def draw_lines(self, gc, x, y, transform=None):
185185

186186
def draw_point(self, gc, x, y):
187187
# result seems to have a hole in it...
188-
self.draw_arc(gc, gc.get_rgb(), x, y, 1, 0, 0, 0)
188+
self.draw_arc(gc, gc.get_rgb(), x, y, 1, 0, 0, 0, 0)
189189

190190
def draw_polygon(self, gc, rgbFace, points):
191191
details = 'points = "%s"' % ' '.join(['%f,%f'%(x,self.height-y)

lib/matplotlib/backends/backend_wx.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,7 @@ def get_canvas_width_height(self):
275275
return self.width, self.height
276276

277277

278-
def draw_arc(self, gc, rgbFace, x, y, width, height, angle1, angle2):
278+
def draw_arc(self, gc, rgbFace, x, y, width, height, angle1, angle2, rotation):
279279
"""
280280
Draw an arc centered at x,y with width and height and angles
281281
from 0.0 to 360.0.

lib/matplotlib/text.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -353,8 +353,6 @@ def draw(self, renderer):
353353
#print 'xy', self._x, self._y, info
354354
for line, wh, x, y in info:
355355
x, y = self._transform.xy_tup((x, y))
356-
#renderer.draw_arc(gc, (1,0,0),
357-
# x, y, 2, 2, 0.0, 360.0)
358356

359357
if renderer.flipy():
360358
canvasw, canvash = renderer.get_canvas_width_height()

0 commit comments

Comments
 (0)