| 1 |
import cairo |
| 2 |
|
| 3 |
|
| 4 |
def draw(cr, width, height): |
| 5 |
cr.scale(width, height) |
| 6 |
cr.set_line_width(0.04) |
| 7 |
|
| 8 |
cr.set_line_width(0.12) |
| 9 |
cr.set_line_cap(cairo.LINE_CAP_BUTT) |
| 10 |
cr.move_to(0.25, 0.2) |
| 11 |
cr.line_to(0.25, 0.8) |
| 12 |
cr.stroke() |
| 13 |
cr.set_line_cap(cairo.LINE_CAP_ROUND) |
| 14 |
cr.move_to(0.5, 0.2) |
| 15 |
cr.line_to(0.5, 0.8) |
| 16 |
cr.stroke() |
| 17 |
cr.set_line_cap(cairo.LINE_CAP_SQUARE) |
| 18 |
cr.move_to(0.75, 0.2) |
| 19 |
cr.line_to(0.75, 0.8) |
| 20 |
cr.stroke() |
| 21 |
|
| 22 |
|
| 23 |
cr.set_source_rgb(1, 0.2, 0.2) |
| 24 |
cr.set_line_width(0.01) |
| 25 |
cr.move_to(0.25, 0.2) |
| 26 |
cr.line_to(0.25, 0.8) |
| 27 |
cr.move_to(0.5, 0.2) |
| 28 |
cr.line_to(0.5, 0.8) |
| 29 |
cr.move_to(0.75, 0.2) |
| 30 |
cr.line_to(0.75, 0.8) |
| 31 |
cr.stroke() |