[LIBART] newbie silly question



Hi, This is a very silly question, but I couldn't find my answer in the
tutorial. I guess after this everything will be easier:

Suppouse that I modify the code in art-display.c like this:
  buffer = art_new (art_u8, WIDTH*HEIGHT*BYTES_PER_PIXEL);
  art_rgb_run_alpha (buffer, 0xFF, 0xFF, 0xFF, 0xFF, WIDTH*HEIGHT);

  path = make_path ();
  art_rgb_svp_aa (path, 0, 0, WIDTH, HEIGHT, 0xFF0000, 0xFFFFFF,
                  buffer, ROWSTRIDE, NULL);

  path = make_path2 ();
  art_rgb_svp_aa (path, 0, 0, WIDTH, HEIGHT, 0xFF0000, 0xFFFFFF,
                  buffer, ROWSTRIDE, NULL);


What I found is that the second rectangle, generated by make_path2(), will
redraw the entire buffer, erasing what I did with make_path(). Can you
tell me what I'm missing, please?

Another example:
To draw a line I tried:
  vec = art_new (ArtVpath, 10);
  vec[0].code = ART_MOVETO;
  vec[0].x = 0;
  vec[0].y = 0;
  vec[1].code = ART_LINETO;
  vec[1].x = 0;
  vec[1].y = 10;
  vec[2].code = ART_END;

But what I get is a red strip from (0,0) to (WIDTH,10) (????). I simply
don't get the logic, I'm sorry for my dumbness.

Besides, what is ArtUta, extensively used in gnome_canvas?

Thanks a lot!!!
<ADRIAN>







[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]