def set_dashes(self, dash_offset, dash_list):
     GraphicsContextBase.set_dashes(self, dash_offset, dash_list)
     # dash_list is a list with numbers denoting the number of points
     # in a dash and if it is on or off.
     if dash_list is not None:
         self.line['dash_list'] = dash_list
     if dash_offset is not None:
         self.line['dash_offset'] = int(dash_offset)
Пример #2
0
 def set_dashes(self, dash_offset, dash_list):
     GraphicsContextBase.set_dashes(self, dash_offset, dash_list)
     # dash_list is a list with numbers denoting the number of points
     # in a dash and if it is on or off.
     if dash_list is not None:
         self.line['dash_list'] = dash_list
     if dash_offset is not None:
         self.line['dash_offset'] = int(dash_offset)
Пример #3
0
 def set_dashes(self, dash_offset, dash_list):
     GraphicsContextBase.set_dashes(self, dash_offset, dash_list)
     if dash_list == None:
         self.gdkGC.line_style = gdk.LINE_SOLID
     else:
         pixels = self.renderer.points_to_pixels(npy.asarray(dash_list))
         dl = [max(1, int(round(val))) for val in pixels]
         self.gdkGC.set_dashes(dash_offset, dl)
         self.gdkGC.line_style = gdk.LINE_ON_OFF_DASH
Пример #4
0
    def set_dashes(self, dash_offset, dash_list):
        GraphicsContextBase.set_dashes(self, dash_offset, dash_list)

        if dash_list == None:
            self.gdkGC.line_style = gdk.LINE_SOLID
        else:
            pixels = self.renderer.points_to_pixels(npy.asarray(dash_list))
            dl = [max(1, int(round(val))) for val in pixels]
            self.gdkGC.set_dashes(dash_offset, dl)
            self.gdkGC.line_style = gdk.LINE_ON_OFF_DASH