本文整理汇总了Python中goocanvas.Path方法的典型用法代码示例。如果您正苦于以下问题:Python goocanvas.Path方法的具体用法?Python goocanvas.Path怎么用?Python goocanvas.Path使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类goocanvas
的用法示例。
在下文中一共展示了goocanvas.Path方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
# 需要导入模块: import goocanvas [as 别名]
# 或者: from goocanvas import Path [as 别名]
def __init__(self, viz):
self.viz = viz
self.color = 0x8080C0FF
self.hlines = goocanvas.Path(parent=viz.canvas.get_root_item(), stroke_color_rgba=self.color)
self.hlines.lower(None)
self.vlines = goocanvas.Path(parent=viz.canvas.get_root_item(), stroke_color_rgba=self.color)
self.vlines.lower(None)
self.labels = []
hadj = self.viz.get_hadjustment()
vadj = self.viz.get_vadjustment()
def update(adj):
if self.visible:
self.update_view()
hadj.connect("value-changed", update)
vadj.connect("value-changed", update)
hadj.connect("changed", update)
vadj.connect("changed", update)
self.visible = True
self.update_view()
示例2: __init__
# 需要导入模块: import goocanvas [as 别名]
# 或者: from goocanvas import Path [as 别名]
def __init__(self, node1, node2):
"""!
Initializer function.
@param self: class object.
@param node1: class object.
@param node2: class object.
@return none
"""
assert isinstance(node1, Node)
assert isinstance(node2, (Node, Channel))
self.node1 = node1
self.node2 = node2
self.canvas_item = goocanvas.Path(line_width=1.0, stroke_color="black")
self.canvas_item.set_data("pyviz-object", self)
self.node1.links.append(self)
self.node2.links.append(self)
示例3: __init__
# 需要导入模块: import goocanvas [as 别名]
# 或者: from goocanvas import Path [as 别名]
def __init__(self, node1, node2):
assert isinstance(node1, Node)
assert isinstance(node2, (Node, Channel))
self.node1 = node1
self.node2 = node2
self.canvas_item = goocanvas.Path(line_width=1.0, stroke_color="black")
self.canvas_item.set_data("pyviz-object", self)
self.node1.links.append(self)
self.node2.links.append(self)
示例4: __init__
# 需要导入模块: import goocanvas [as 别名]
# 或者: from goocanvas import Path [as 别名]
def __init__(self, viz):
"""!
Initializer function
@param self: this object
@param viz: visualization object
@return none
"""
self.viz = viz
self.color = 0x8080C0FF
self.hlines = goocanvas.Path(parent=viz.canvas.get_root_item(), stroke_color_rgba=self.color)
self.hlines.lower(None)
self.vlines = goocanvas.Path(parent=viz.canvas.get_root_item(), stroke_color_rgba=self.color)
self.vlines.lower(None)
self.labels = []
hadj = self.viz.get_hadjustment()
vadj = self.viz.get_vadjustment()
def update(adj):
if self.visible:
self.update_view()
hadj.connect("value-changed", update)
vadj.connect("value-changed", update)
hadj.connect("changed", update)
vadj.connect("changed", update)
self.visible = True
self.update_view()