4179b7f166ba980ed226cdbe52984965f1b335c4,enthought/chaco/tools/toolbars/plot_toolbar.py,PlotToolbar,overlay,#PlotToolbar#,133
Before Change
gc.arc_to(x, y + height,
x, y,
self.end_radius)
gc.arc_to(x, y,
x + self.width + self.end_radius,
y, self.end_radius)
if self.location in ["top","bottom"]:
gc.linear_gradient(x, y, x, y+100,
numpy.array([starting_color, ending_color]),
After Change
y = self.y
height = self.height
with gc:
gc.begin_path()
gc.move_to(x + self.end_radius, y)
gc.arc_to(x + self.width, y,
x + self.width,
y + self.end_radius, self.end_radius)
gc.arc_to(x + self.width,
y + height,
x + self.width - self.end_radius,
y + height, self.end_radius)
gc.arc_to(x, y + height,
x, y,
self.end_radius)
gc.arc_to(x, y,
x + self.width + self.end_radius,
y, self.end_radius)
if self.location in ["top","bottom"]:
gc.linear_gradient(x, y, x, y+100,
numpy.array([starting_color, ending_color]),
"")
else:
gc.linear_gradient(x, y, x+100, y,
numpy.array([starting_color, ending_color]),
"")
gc.draw_path()
if not self.hiding:
for button in self.components:
button.draw(gc)
def is_in(self, x, y):
if (x >= self.x and x <= self.x2) and (y >= self.y and y <= self.y2):
return True
return False
In pattern: SUPERPATTERN
Frequency: 4
Non-data size: 3
Instances
Project Name: enthought/chaco
Commit Name: 4179b7f166ba980ed226cdbe52984965f1b335c4
Time: 2010-12-19
Author: warren.weckesser@651a555e-23ca-0310-84fe-ca9f7c59d2ea
File Name: enthought/chaco/tools/toolbars/plot_toolbar.py
Class Name: PlotToolbar
Method Name: overlay
Project Name: enthought/chaco
Commit Name: 4179b7f166ba980ed226cdbe52984965f1b335c4
Time: 2010-12-19
Author: warren.weckesser@651a555e-23ca-0310-84fe-ca9f7c59d2ea
File Name: enthought/chaco/tools/toolbars/plot_toolbar.py
Class Name: PlotToolbar
Method Name: overlay