/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 graphcell.py

  • Committer: Scott James Remnant
  • Date: 2005-10-17 01:07:49 UTC
  • Revision ID: scott@netsplit.com-20051017010749-15fa95fc2cf09289
Commit the first version of bzrk.

Show diffs side-by-side

added added

removed removed

Lines of Context:
72
72
            metrics = pango_ctx.get_metrics(font_desc)
73
73
 
74
74
            ascent = pango.PIXELS(metrics.get_ascent())
75
 
            descent = pango.PIXELS(metrics.get_descent())
 
75
            descent = pango.PIXELS(metrics.get_ascent())
76
76
 
77
 
            self._box_size = ascent + descent + 6
 
77
            self._box_size = ascent + descent
78
78
            return self._box_size
79
79
 
80
80
    def set_colour(self, ctx, colour, bg, fg):
138
138
        ctx.rectangle(bg_area.x, bg_area.y, bg_area.width, bg_area.height)
139
139
        ctx.clip()
140
140
 
141
 
        box_size = self.box_size(widget)
142
 
 
143
 
        ctx.set_line_width(box_size / 8)
 
141
        ctx.set_line_width(2)
144
142
        ctx.set_line_cap(cairo.LINE_CAP_SQUARE)
145
143
 
 
144
        box_size = self.box_size(widget)
 
145
 
146
146
        # Draw lines into the cell
147
147
        for start, end, colour in self.in_lines:
148
148
            ctx.move_to(cell_area.x + box_size * start + box_size / 2,
188
188
        (column, colour) = self.node
189
189
        ctx.arc(cell_area.x + box_size * column + box_size / 2,
190
190
                cell_area.y + cell_area.height / 2,
191
 
                box_size / 4, 0, 2 * math.pi)
 
191
                box_size / 5, 0, 2 * math.pi)
192
192
 
193
193
        self.set_colour(ctx, colour, 0.0, 0.5)
194
194
        ctx.stroke_preserve()