/b-gtk/fix-viz

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/b-gtk/fix-viz

« back to all changes in this revision

Viewing changes to branchview/graphcell.py

  • Committer: Jelmer Vernooij
  • Date: 2011-03-14 20:12:19 UTC
  • Revision ID: jelmer@samba.org-20110314201219-wo692nzwywu6mevh
Fix formatting, imports.

Show diffs side-by-side

added added

removed removed

Lines of Context:
30
30
      in_lines          (start, end, colour) tuple list to draw inward lines,
31
31
      out_lines         (start, end, colour) tuple list to draw outward lines.
32
32
    """
33
 
    
 
33
 
34
34
    columns_len = 0
35
35
 
36
36
    __gproperties__ = {
51
51
                          gobject.PARAM_WRITABLE
52
52
                        ),
53
53
        }
54
 
    
 
54
 
55
55
    def do_set_property(self, property, value):
56
56
        """Set properties from GObject properties."""
57
57
        if property.name == "node":
181
181
        ctx.fill()
182
182
 
183
183
        self.render_tags(ctx, widget.create_pango_context(), cell_area, box_size)
184
 
    
 
184
 
185
185
    def render_line(self, ctx, cell_area, box_size, mid, height, start, end, colour, flags):
186
186
        if start is None:
187
187
            ctx.set_line_cap(cairo.LINE_CAP_ROUND)
190
190
            ctx.line_to(x, mid + height / 3)
191
191
            ctx.move_to(x, mid + height / 6)
192
192
            ctx.line_to(x, mid + height / 6)
193
 
            
 
193
 
194
194
        elif end is None:
195
195
            ctx.set_line_cap(cairo.LINE_CAP_ROUND)
196
196
            x = cell_area.x + box_size * start + box_size / 2
203
203
            ctx.set_line_cap(cairo.LINE_CAP_BUTT)
204
204
            startx = cell_area.x + box_size * start + box_size / 2
205
205
            endx = cell_area.x + box_size * end + box_size / 2
206
 
            
 
206
 
207
207
            ctx.move_to(startx, mid - height / 2)
208
 
            
 
208
 
209
209
            if start - end == 0 :
210
210
                ctx.line_to(endx, mid + height / 2 + 1)
211
211
            else: