本文整理匯總了Python中goocanvas.LineDash方法的典型用法代碼示例。如果您正苦於以下問題:Python goocanvas.LineDash方法的具體用法?Python goocanvas.LineDash怎麽用?Python goocanvas.LineDash使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類goocanvas
的用法示例。
在下文中一共展示了goocanvas.LineDash方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: __init__
# 需要導入模塊: import goocanvas [as 別名]
# 或者: from goocanvas import LineDash [as 別名]
def __init__(self, parent_canvas_item, sta, dev):
self.node1 = sta
self.dev = dev
self.node2 = None # ap
self.canvas_item = goocanvas.Group(parent=parent_canvas_item)
self.invisible_line = goocanvas.Polyline(parent=self.canvas_item,
line_width=25.0,
visibility=goocanvas.ITEM_HIDDEN)
self.visible_line = goocanvas.Polyline(parent=self.canvas_item,
line_width=1.0,
stroke_color_rgba=0xC00000FF,
line_dash=goocanvas.LineDash([2.0, 2.0 ]))
self.invisible_line.props.pointer_events = (goocanvas.EVENTS_STROKE_MASK
|goocanvas.EVENTS_FILL_MASK
|goocanvas.EVENTS_PAINTED_MASK)
self.canvas_item.set_data("pyviz-object", self)
self.canvas_item.lower(None)
self.set_ap(None)
示例2: __init__
# 需要導入模塊: import goocanvas [as 別名]
# 或者: from goocanvas import LineDash [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 = []
示例3: __init__
# 需要導入模塊: import goocanvas [as 別名]
# 或者: from goocanvas import LineDash [as 別名]
def __init__(self, parent_canvas_item, sta, dev):
"""! Initialize function.
@param self The object pointer.
@param parent_canvas_item: parent canvas
@param sta The STA node
@param dev The dev
"""
self.node1 = sta
self.dev = dev
self.node2 = None # ap
self.canvas_item = goocanvas.Group(parent=parent_canvas_item)
self.invisible_line = goocanvas.Polyline(parent=self.canvas_item,
line_width=25.0,
visibility=goocanvas.ITEM_HIDDEN)
self.visible_line = goocanvas.Polyline(parent=self.canvas_item,
line_width=1.0,
stroke_color_rgba=0xC00000FF,
line_dash=goocanvas.LineDash([2.0, 2.0 ]))
self.invisible_line.props.pointer_events = (goocanvas.EVENTS_STROKE_MASK
|goocanvas.EVENTS_FILL_MASK
|goocanvas.EVENTS_PAINTED_MASK)
self.canvas_item.set_data("pyviz-object", self)
self.canvas_item.lower(None)
self.set_ap(None)
示例4: __init__
# 需要導入模塊: import goocanvas [as 別名]
# 或者: from goocanvas import LineDash [as 別名]
def __init__(self, channel):
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 = []