|
1 | 1 | ...-----=======-----...
|
2 |
| - Cairo 0.5 Porting Guide |
| 2 | + Cairo 1.0 Porting Guide |
3 | 3 | ...-----=======-----...
|
4 | 4 |
|
5 | 5 | Here are some notes on more easily porting cairo_code from cairo 0.4
|
6 |
| -to cairo 0.5. It is sorted roughly in order of importance, (the items |
| 6 | +to cairo 1.0. It is sorted roughly in order of importance, (the items |
7 | 7 | near the top are expected to affect the most people).
|
8 | 8 |
|
9 | 9 | Automated API renamings
|
@@ -224,11 +224,19 @@ Was: cairo_set_rgb_color (cr, 0., 0., 0.);
|
224 | 224 | cairo_rectangle (cr, 0., 0., surface_width, surface_height);
|
225 | 225 | cairo_fill (cr);
|
226 | 226 |
|
| 227 | + or: cairo_set_rgb_color (cr, 0., 0., 0.); |
| 228 | + cairo_set_operator (cr, CAIRO_OPERATOR_CLEAR); |
| 229 | + cairo_rectangle (cr, 0., 0., surface_width, surface_height); |
| 230 | + cairo_fill (cr); |
| 231 | + |
227 | 232 | Now: cairo_set_source_rgba (cr, 0., 0., 0., 0.);
|
228 | 233 | cairo_set_operator (cr, CAIRO_OPERATOR_SOURCE);
|
229 | 234 | cairo_paint (cr);
|
230 | 235 |
|
231 |
| -NOTE: Using cairo_rectanlgle and fill would still work just fine. It's |
| 236 | + or: cairo_set_operator (cr, CAIRO_OPERATOR_CLEAR); |
| 237 | + cairo_paint (cr); |
| 238 | + |
| 239 | +NOTE: Using cairo_rectangle and fill would still work just fine. It's |
232 | 240 | just a lot more convenient to use cairo_paint now, (particularly
|
233 | 241 | as it doesn't require you to even know what the bounds of the
|
234 | 242 | target surface are).
|
|
0 commit comments