本文整理汇总了Python中goocanvas.Ellipse方法的典型用法代码示例。如果您正苦于以下问题:Python goocanvas.Ellipse方法的具体用法?Python goocanvas.Ellipse怎么用?Python goocanvas.Ellipse使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类goocanvas
的用法示例。
在下文中一共展示了goocanvas.Ellipse方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
# 需要导入模块: import goocanvas [as 别名]
# 或者: from goocanvas import Ellipse [as 别名]
def __init__(self, visualizer, node_index):
super(Node, self).__init__()
self.visualizer = visualizer
self.node_index = node_index
self.canvas_item = goocanvas.Ellipse()
self.canvas_item.set_data("pyviz-object", self)
self.links = []
self._has_mobility = None
self._selected = False
self._highlighted = False
self._color = 0x808080ff
self._size = DEFAULT_NODE_SIZE
self.canvas_item.connect("enter-notify-event", self.on_enter_notify_event)
self.canvas_item.connect("leave-notify-event", self.on_leave_notify_event)
self.menu = None
self.svg_item = None
self.svg_align_x = None
self.svg_align_y = None
self._label = None
self._label_canvas_item = None
self._update_appearance() # call this last
示例2: __init__
# 需要导入模块: import goocanvas [as 别名]
# 或者: from goocanvas import Ellipse [as 别名]
def __init__(self, channel):
"""!
Initializer function.
@param self: class object.
@param channel: channel.
@return none
"""
self.channel = channel
self.canvas_item = goocanvas.Ellipse(radius_x=30, radius_y=30,
fill_color="white",
stroke_color="grey", line_width=2.0,
line_dash=goocanvas.LineDash([10.0, 10.0 ]),
visibility=goocanvas.ITEM_VISIBLE)
self.canvas_item.set_data("pyviz-object", self)
self.links = []