Forums > Dev

JGraphics API bug – jgraphics_image_surface_draw_fast()


Mar 20 2010 | 11:02 pm

Hi there (Tim),

The function jgraphics_image_surface_draw_fast() is not exported from the kernel, although its prototype appears in jgraphics.h. It would be great to have it working for the next revision of the SDK as it’s quite useful to draw surfaces efficiently.

Cheers.

– Luigi

Mar 21 2010 | 8:13 pm

Use layers. That’s what it uses internally.

Mar 28 2010 | 5:17 am

Hi again,

thanks Joshua for the suggestion, however I have come across another linking error with the function jgraphics_image_surface_writepng(). Ultimately I need that to accomplish what I want.

Any chance that you guys can export these two functions for the next version of the SDK ?

Many thanks.

– Luigi

May 27 2010 | 7:41 pm

I get the same problem – good to know not just me – frustrating however. I was able to create some PNG’s (mysteriously) while debugging but can’t seem to get back to them (I compiled over my code cause I thought it didn’t work-the PNG’s showed up but the file names were weird like "K*". What I was doing was:

(first fill the surface with your drawing…)
____________CODE____________
jgraphics_write_image_surface_to_filedata(my_surface, JGRAPHICS_FILEFORMAT_PNG, &data, &size);

an_err = path_frompathname(name, &path, filename);
t_filehandle fh;
err = path_createsysfile(filename, path, ‘PNG ‘, &fh);
err = sysfile_write(fh, &size, data);
sysfile_close(fh);
____________CODE____________

(Need to release the data when done but I think I was crashing Max because I was releasing it too soon??)

At this point I am not sure if the ‘PNG ‘ part was correct as I was playing with this and the filenames. If anyone can get this method to work I would appreciate the help.

Regards,
a

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

Forums > Dev