JGraphics API bug – jgraphics_image_surface_draw_fast()

Mar 20, 2010 at 11:02pm

JGraphics API bug – jgraphics_image_surface_draw_fast()

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

#49258
Mar 21, 2010 at 8:13pm

Use layers. That’s what it uses internally.

#176993
Mar 28, 2010 at 5:17am

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

#176994
May 27, 2010 at 7:41pm

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

#176995

You must be logged in to reply to this topic.