python类LINE_CAP_BUTT的实例源码

xdot.py 文件源码 项目:autoinjection 作者: ChengWiLL 项目源码 文件源码 阅读 25 收藏 0 点赞 0 评论 0
def draw(self, cr, highlight_items=None):
        if highlight_items is None:
            highlight_items = ()
        cr.set_source_rgba(0.0, 0.0, 0.0, 1.0)

        cr.set_line_cap(cairo.LINE_CAP_BUTT)
        cr.set_line_join(cairo.LINE_JOIN_MITER)

        for shape in self.shapes:
            shape.draw(cr)
        for edge in self.edges:
            edge.draw(cr, highlight=(edge in highlight_items))
        for node in self.nodes:
            node.draw(cr, highlight=(node in highlight_items))
xdot.py 文件源码 项目:bokken 作者: thestr4ng3r 项目源码 文件源码 阅读 25 收藏 0 点赞 0 评论 0
def draw(self, cr, highlight_items=None):
        if highlight_items is None:
            highlight_items = ()
        cr.set_source_rgba(0.0, 0.0, 0.0, 1.0)

        cr.set_line_cap(cairo.LINE_CAP_BUTT)
        cr.set_line_join(cairo.LINE_JOIN_MITER)

        for shape in self.shapes:
            shape.draw(cr)
        for edge in self.edges:
            edge.draw(cr, highlight=(edge in highlight_items))
        for node in self.nodes:
            node.draw(cr, highlight=(node in highlight_items))
xdot.py 文件源码 项目:Eagle 作者: magerx 项目源码 文件源码 阅读 24 收藏 0 点赞 0 评论 0
def draw(self, cr, highlight_items=None):
        if highlight_items is None:
            highlight_items = ()
        cr.set_source_rgba(0.0, 0.0, 0.0, 1.0)

        cr.set_line_cap(cairo.LINE_CAP_BUTT)
        cr.set_line_join(cairo.LINE_JOIN_MITER)

        for shape in self.shapes:
            shape.draw(cr)
        for edge in self.edges:
            edge.draw(cr, highlight=(edge in highlight_items))
        for node in self.nodes:
            node.draw(cr, highlight=(node in highlight_items))
xdot.py 文件源码 项目:landport 作者: land-pack 项目源码 文件源码 阅读 24 收藏 0 点赞 0 评论 0
def draw(self, cr, highlight_items=None):
        if highlight_items is None:
            highlight_items = ()
        cr.set_source_rgba(0.0, 0.0, 0.0, 1.0)

        cr.set_line_cap(cairo.LINE_CAP_BUTT)
        cr.set_line_join(cairo.LINE_JOIN_MITER)

        for shape in self.shapes:
            shape.draw(cr)
        for edge in self.edges:
            edge.draw(cr, highlight=(edge in highlight_items))
        for node in self.nodes:
            node.draw(cr, highlight=(node in highlight_items))
xdot.py 文件源码 项目:Helix 作者: 3lackrush 项目源码 文件源码 阅读 22 收藏 0 点赞 0 评论 0
def draw(self, cr, highlight_items=None):
        if highlight_items is None:
            highlight_items = ()
        cr.set_source_rgba(0.0, 0.0, 0.0, 1.0)

        cr.set_line_cap(cairo.LINE_CAP_BUTT)
        cr.set_line_join(cairo.LINE_JOIN_MITER)

        for shape in self.shapes:
            shape.draw(cr)
        for edge in self.edges:
            edge.draw(cr, highlight=(edge in highlight_items))
        for node in self.nodes:
            node.draw(cr, highlight=(node in highlight_items))
xdot.py 文件源码 项目:autoscan 作者: b01u 项目源码 文件源码 阅读 28 收藏 0 点赞 0 评论 0
def draw(self, cr, highlight_items=None):
        if highlight_items is None:
            highlight_items = ()
        cr.set_source_rgba(0.0, 0.0, 0.0, 1.0)

        cr.set_line_cap(cairo.LINE_CAP_BUTT)
        cr.set_line_join(cairo.LINE_JOIN_MITER)

        for shape in self.shapes:
            shape.draw(cr)
        for edge in self.edges:
            edge.draw(cr, highlight=(edge in highlight_items))
        for node in self.nodes:
            node.draw(cr, highlight=(node in highlight_items))
drawing.py 文件源码 项目:neferset 作者: andburn 项目源码 文件源码 阅读 32 收藏 0 点赞 0 评论 0
def crosshair(ctx, x, y, length, color=None):
    if not color:
        color = (1, 0, 0)
    ctx.save()
    ctx.set_source_rgb(*color)
    ctx.set_line_width(2.0)
    ctx.set_line_cap(cairo.LINE_CAP_BUTT)
    ctx.new_path()
    ctx.move_to(x, y + length)
    ctx.line_to(x, y - length)
    ctx.move_to(x + length, y)
    ctx.line_to(x - length, y)
    ctx.stroke()
    ctx.restore()


问题


面经


文章

微信
公众号

扫码关注公众号