how can I save the pixels of a line, and draw the line with the pixels laterly.

View: New views
2 Messages — Rating Filter:   Alert me  

how can I save the pixels of a line, and draw the line with the pixels laterly.

by 王旭光 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Hello everyone!
     I want to do the following 3 steps:
         1  save the pixels of the line (x1,y1)-- (x2, y2) in the cairo_t
         2  draw the line using a special color
         3  sometime later, draw the line using the pixels saved in step1. (the same as erasing the line).
    But I don't know how to finish the step1 and step3.
    Help me, thanks a lot.



09年新晋3D主流网游《天下贰》,网易六年亿资打造

_______________________________________________
cairo mailing list
cairo@...
http://lists.cairographics.org/mailman/listinfo/cairo

Re: how can I save the pixels of a line, and draw the line with the pixels laterly.

by M Joonas Pihlaja :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Hi,

Cairo doesn't have any special magic for copying pixels under a line,
so you'll need to copy the pixels under the line yourself.  The
simplest way of course is to make a copy of the destination surface
before drawing, or you can get fancy and only copy the parts of the
destination under the line.

Cheers,

Joonas
_______________________________________________
cairo mailing list
cairo@...
http://lists.cairographics.org/mailman/listinfo/cairo