[cairo] Transform update?

Blagoj Kupev bkupev at gmail.com
Sun Nov 27 12:05:21 PST 2011


Hello
I'm now in cairo and this might be already answered, but...

I'd like to create a image that will be then modified by translation 
using a functionality similar to the cairo_transform function where i'd 
like to define cairo_matrix_t for each pixel. The final idea is to 
modify the image that will be projected to a white ball and after 
reflection it will be a symmetric image.

I thought that i can do this using cairo_user_to_device function, but 
without any success. First, I'm not sure what is the usage of this 
function, so can anyone help me with the answers to the following questions:
1. How to set different cairo_matrix_t for each pixel during the 
translation, the CTM is one for complete image.
2. What is the purpose of cairo_to_device function?

If there's no functionality to define translation using different matrix 
for each pixel, i'd like to add this functionality in cairo...

So, after i compile the cairo and make new libraries what to do to use 
them? I've succeeded in building the libraries and installing them (i 
can see new library files are copied to /usr/local/lib and other 
places), but i'm not sure if they are really used since modification do 
not seem to be used in the new application.

The procedure that i'm doing is:
- modify the cairo_translate function by adding while(1) or other line 
to see if it affects the library.
- the code is compiled (i know this since if i put invalid line, error 
is reported)
- sudo make install, to install the libraries
- i'm recompiling the application that is calling cairo_translate 
function, but the new code is not executed. I'm using the following line 
to compile the application:
gcc -o transform transform.c `pkg-config --libs --cflags gtk+-2.0`

What should i do to have new library used? How to debug code in libraries?

Thanks,
Blagoj


More information about the cairo mailing list