Forums > Dev

jgraphics_transform(), jgraphics_setmatrix(), and jgraphics_pattern_set_matrix()

June 9, 2012 | 11:43 am

Hi,

there’s an interesting comment in the SDK docs of both Max 5 and Max 6 (Section 33.59.1 in Max 5 SDK and Section 34.59.1 in Max 6 SDK) saying that

The t_jmatrix is one way to represent a transformation. You can use the t_jmatrix in the call to jgraphics_transform(), jgraphics_setmatrix(), and jgraphics_pattern_set_matrix() for specifying transformations.

However, none of these functions are documented, and more, after checking the header file jgraphics.h I found the following comment before the declaration of these fuctions:

These functions are placeholders for Cairo functionality, but for which there is no direct JUCE implementation. They may or may not be implemented in the future.

So here are my two questions:
(1) Is there a way to get some documentation on these functions? (I found the uitester.c example, which is quite self-explanatory, however, it would be nice to have a de facto documentation for this.)
(2) Are developers allowed to safely use these functions, or (since the comment says that they ‘may not be implemented in the future’) should we stay away from these functions?

Thanks,
Ádám


June 9, 2012 | 5:22 pm

Hi Siska,

the following comment

These functions are placeholders for Cairo functionality, but for which there is no
direct JUCE implementation. They may or may not be implemented in the future.

only refers to the functions jgraphics_pattern_set_extend() and jgraphics_pattern_get_extend(), which are not implemented by the API.

The jgraphics_transform(), jgraphics_setmatrix(), and jgraphics_pattern_set_matrix() functions are pretty self-explanatory and work perfectly as expected. I use them all the time.

Hope this helps.

- Luigi


June 11, 2012 | 10:42 pm

Hi Castelli,

thanks a lot! Now everything’s clear. :-)

Cheers,
Ádám


Viewing 3 posts - 1 through 3 (of 3 total)