<div dir="ltr"><div><div><div>Hi,<br><br>I'm using erlycairo to draw on a 2D canvas.<br></div>There are several functions that leak atoms:<br>erlycairo_server:write_to_png/2<br>erlycairo_server:show_text/2<br>erlycairo_server:text_extents/2<br>
erlycairo_server:surface_create_from_png/2<br><br>I tried to pass a binary to the C node and use (char *)ERL_BIN_PTR(file) but I'm getting another char at the end of the binary.<br><a href="https://code.google.com/p/erlycairo/source/browse/trunk/src/erlycairo/erlycairo_server.erl#143">https://code.google.com/p/erlycairo/source/browse/trunk/src/erlycairo/erlycairo_server.erl#143</a><br>
<a href="https://code.google.com/p/erlycairo/source/browse/trunk/c_src/erlycairo.c#337">https://code.google.com/p/erlycairo/source/browse/trunk/c_src/erlycairo.c#337</a><br><br></div>What is the correct way to use binaries or lists instead of atoms for the write_to_png function?<br>
<br></div>Thanks<br></div>