[cairo] Cairo metafile

Jost Boekemeier jost2345 at yahoo.de
Thu Aug 12 09:12:22 PDT 2004


I am currently writing such a API:

  cairo_shape_t *shape = cairo_shape_create(10000, 10000);
  cairo_shape_viewport_t *view = cairo_shape_viewport_create(shape);
  cairo_shape_t *shape2 = cairo_shape_create(30, 50);

  ctx = cairo_shape_get_drawing_context(shape2);
  ctx->rectangle(ctx, 10, 10, 10, 20);
  ctx->move_to(ctx, 1, 1);
  ctx->line_to(ctx, 30, 50);
  ctx->stroke(ctx);
  cairo_shape_set_parent(shape2, shape);

[...]
  if (xev.xkey.keycode == left_keycode)
	  cairo_shape_translate(shape, -10, 0);
[...]

  cairo_shape_viewport_show_x11(view, dpy, d, x, y, width, height);


If it is what you need, drop me a line, I will send you the code.


Jost




More information about the cairo mailing list