Exemple #1
0
 def __init__(self):
     PluginCairo.__init__(self)
     self.content = None
     self.imgw = 0
     self.imgh = 0
     self.imgscale = 0
     self.imgxpos = 0
Exemple #2
0
    def __init__(self, *args, **kwargs):
        PluginCairo.__init__(self, *args, **kwargs)

        self.font = PluginCairo.create_font(self.cr, size=16)

        self.ethernet = {}
        self.transport = {}
Exemple #3
0
 def __init__(self):
     PluginCairo.__init__(self)
     self.content = None
     self.imgw = 0
     self.imgh = 0
     self.imgscale = 0
     self.imgxpos = 0
Exemple #4
0
 def on_resize(self, size):
     PluginCairo.on_resize(self, size)
     if self.auto is not None:
         self.samples('auto/%f' % self.auto)
     elif self.n_samples > size[0]:
         print >> sys.stderr, 'Warning: graph samplerate (%d) is greater than horizontal resolution (%d), it is a waste of CPU and GPU and yields subpar rendering (i.e moire patterns). Either lower the samplerate or preferably use "auto".' % (
             self.n_samples, size[0])
Exemple #5
0
    def __init__(self, *args, **kwargs):
        PluginCairo.__init__(self, *args, **kwargs)

        self.font = PluginCairo.create_font(self.cr, size=16)

        self.ethernet = {}
        self.transport = {}
Exemple #6
0
    def __init__(self):
        PluginCairo.__init__(self)

        self.font_a = PluginCairo.create_font(self.cr, size=16)
        self.font_b = PluginCairo.create_font(self.cr, size=12)

        self.title = None
        self.header = None
        self.content = []
        self.dataset = []

        self.area = self.pango.create_layout()
        self.area.set_font_description(self.font_b)
        self.area.set_width(int(self.size[0] * pango.SCALE))
Exemple #7
0
    def __init__(self):
        PluginCairo.__init__(self)

        self.font_a = PluginCairo.create_font(self.cr, size=16)
        self.font_b = PluginCairo.create_font(self.cr, size=12)

        self.title = None
        self.header = None
        self.content = []
        self.dataset = []

        self.area = self.pango.create_layout()
        self.area.set_font_description(self.font_b)
        self.area.set_width(int(self.size[0] * pango.SCALE))
Exemple #8
0
    def __init__(self):
        PluginCairo.__init__(self)
        self.title = None
        self.font_a = PluginCairo.create_font(self.cr, size=16)
        self.font_b = PluginCairo.create_font(self.cr, size=12)
        self.font_label = PluginCairo.create_font(self.cr, size=10)
        self.dataset = []
        self.data = numpy.array([0] * 100, numpy.float)
        self.n_samples = 100
        self.pos = 0
        self.value_range = None
        self.num_bins = 1
        self.fill_color = (1, 1, 1, 1)

        # chart margins
        self.margin = [30, 5, 60, 30]  # top right bottom left
Exemple #9
0
    def __init__(self):
        PluginCairo.__init__(self)
        self._title = '<Unnamed graph>'
        self.font_a = PluginCairo.create_font(self.cr, size=16)
        self.font_b = PluginCairo.create_font(self.cr, size=12)
        self.font_label = PluginCairo.create_font(self.cr, size=10)
        self.dataset = []
        self.data = numpy.array([0]*100, numpy.float)
        self.n_samples = 100
        self.pos = 0
        self._range_x = (-100,0)
        self._range_y = [-100, 100]
        self.offset = None
        self._xtitle= ''
        self._ytitle= ''
        self.auto = None
        self._xlines = []
        self._ylines = []
        self._barchart = False

        # chart margins
        self.margin = [30, 5, 20, 30] # top right bottom left
Exemple #10
0
    def __init__(self):
        PluginCairo.__init__(self)
        self._title = '<Unnamed graph>'
        self.font_a = PluginCairo.create_font(self.cr, size=16)
        self.font_b = PluginCairo.create_font(self.cr, size=12)
        self.font_label = PluginCairo.create_font(self.cr, size=10)
        self.dataset = []
        self.data = numpy.array([0] * 100, numpy.float)
        self.n_samples = 100
        self.pos = 0
        self._range_x = (-100, 0)
        self._range_y = [-100, 100]
        self.offset = None
        self._xtitle = ''
        self._ytitle = ''
        self.auto = None
        self._xlines = []
        self._ylines = []
        self._barchart = False

        # chart margins
        self.margin = [30, 5, 20, 30]  # top right bottom left
Exemple #11
0
 def on_resize(self, size):
     PluginCairo.on_resize(self, size)
     self.area.set_width(int(self.size[0] * pango.SCALE))
Exemple #12
0
 def __init__(self):
     PluginCairo.__init__(self)
Exemple #13
0
 def on_resize(self, size):
     PluginCairo.on_resize(self, size)
     self.area.set_width(int(self.size[0] * pango.SCALE))
Exemple #14
0
 def on_resize(self, size):
     PluginCairo.on_resize(self, size)
     if self.auto is not None:
         self.samples('auto/%f' % self.auto)
     elif self.n_samples > size[0]:
         print >> sys.stderr, 'Warning: graph samplerate (%d) is greater than horizontal resolution (%d), it is a waste of CPU and GPU and yields subpar rendering (i.e moire patterns). Either lower the samplerate or preferably use "auto".' % (self.n_samples, size[0])
Exemple #15
0
 def on_resize(self, size):
     PluginCairo.on_resize(self, size)
     if self.content is not None:
         self.imgscale=0.75*self.size[0]/self.imgw
         self.imgxpos=(self.size[0]-self.imgw*self.imgscale)*0.5
Exemple #16
0
 def on_resize(self, size):
     PluginCairo.on_resize(self, size)
     self.middle = (size[0]*0.5, size[1]*0.5)
     self.radius = size[1] * 0.40
Exemple #17
0
 def __init__(self):
     PluginCairo.__init__(self)
     self.font = PluginCairo.create_font(self.cr, size=16)
     self.middle = (0,0)
     self.radius = 1
Exemple #18
0
 def __init__(self):
     PluginCairo.__init__(self)
     self.content = ''
     self.text_font = self.create_font(self.cr, size=16)
Exemple #19
0
 def __init__(self):
     PluginCairo.__init__(self)
Exemple #20
0
 def on_resize(self, size):
     PluginCairo.on_resize(self, size)
     if self.content is not None:
         self.imgscale = 0.75 * self.size[0] / self.imgw
         self.imgxpos = (self.size[0] - self.imgw * self.imgscale) * 0.5
Exemple #21
0
 def on_resize(self, size):
     PluginCairo.on_resize(self, size)
     self.middle = (size[0] * 0.5, size[1] * 0.5)
     self.radius = size[1] * 0.40
Exemple #22
0
 def __init__(self):
     PluginCairo.__init__(self)
     self.content = ''
     self.text_font = self.create_font(self.cr, size=16)
Exemple #23
0
 def __init__(self):
     PluginCairo.__init__(self)
     self.font = PluginCairo.create_font(self.cr, size=16)
     self.middle = (0, 0)
     self.radius = 1