elsie/box.py
def rect(self,
             color=None, bg_color=None,
             stroke_width=1, stroke_dasharray=None,
             rx=None, ry=None):
        """ Draw a rect around the box """

        def draw_rect(ctx, rect):
            xml = ctx.xml
            xml.element("rect")
            xml.set("x", rect.x)
            xml.set("y", rect.y)
            xml.set("width", rect.width)
            xml.set("height", rect.height)
            if rx:
                xml.set("rx", rx)
            if ry:
                xml.set("ry", ry)
            set_paint_style(xml, color, bg_color, stroke_width, stroke_dasharray)
            xml.close("rect")
        self.add_child(draw_rect)
 Draw a rect around the box 
Draw a rect around the box
Draw a rect around the box
def rect(self,
             color=None, bg_color=None,
             stroke_width=1, stroke_dasharray=None,
             rx=None, ry=None):
        def draw_rect(ctx, rect):
            xml = ctx.xml
            xml.element("rect")
            xml.set("x", rect.x)
            xml.set("y", rect.y)
            xml.set("width", rect.width)
            xml.set("height", rect.height)
            if rx:
                xml.set("rx", rx)
            if ry:
                xml.set("ry", ry)
            set_paint_style(xml, color, bg_color, stroke_width, stroke_dasharray)
            xml.close("rect")
        self.add_child(draw_rect)
def rect ( self , color = None , bg_color = None , stroke_width = 1 , stroke_dasharray = None , rx = None , ry = None ) : def draw_rect ( ctx , rect ) : xml = ctx . xml xml . element ( "rect" ) xml . set ( "x" , rect . x ) xml . set ( "y" , rect . y ) xml . set ( "width" , rect . width ) xml . set ( "height" , rect . height ) if rx : xml . set ( "rx" , rx ) if ry : xml . set ( "ry" , ry ) set_paint_style ( xml , color , bg_color , stroke_width , stroke_dasharray ) xml . close ( "rect" ) self . add_child ( draw_rect )
Draw a rect around the box
Draw a rect around the box
""" Draw a rect around the box """
self
color
bg_color
stroke_width
stroke_dasharray
rx
ry