Hi Dan, I'm sorry I didn't authorize your post sooner, but I've been away.
On 22 Oct 2006, at 18:11, Dan White wrote: > Mac OS X 10.3.9, > gcc version 3.3 20030304 (Apple Computer, Inc. build 1666) > pngwriter 0.5.3 > > I cannot get a compile using plot_text. > > ------------------- > I say: > one.plot_text ( "woof", 10, 900, 1500, "foo", 65535, 65535, 65535 ) ; First thing that comes to mind: a) is "foo" a valid path to a font file? b) Does the pngwriter.h header or the manual allow the font path to be a const char? The manual says: void plot_text( char * face_path, int fontsize, int x_start, int y_start, double angle, char * text, double red, double green, double blue); void plot_text( char * face_path, int fontsize, int x_start, int y_start, double angle, char * text, int red, int green, int blue); and the same for double colour coefficients. I would expect const char text and a font paths to fail. > > and the compiler says: > error: no matching function for call to `pngwriter::plot_text(const > char[5], int, int, int, const char[4], int, int, int)' > ../src/pngwriter.h:443: error: candidates are: void > pngwriter::plot_text(char*, int, int, int, double, char*, double, > double, double) > ../src/pngwriter.h:444: error: void > pngwriter::plot_text(char*, int, int, int, double, char*, int, int, > int) > And the compiler confirms this. > -------------------- > > I try: > string ook ( "foo" ) ; > one.plot_text ( ook.c_str(), 10, 900, 1500, ptr2, 65535, 65535, > 65535 ) > ; > > and the compiler says: > error: no matching function for call to `pngwriter::plot_text( const > char*, int, int, int, char*&, int, int, int)' > ../src/pngwriter.h:443: error: candidates are: void > pngwriter::plot_text(char*, int, int, int, double, char*, double, > double, double) > ../src/pngwriter.h:444: error: void > pngwriter::plot_text(char*, int, int, int, double, char*, int, int, > int) > Again, no const version of plot_text exists. > ---------------------- > I try: > char* foo = "woof" ; > one.plot_text ( foo, 10, 900, 1500, foo, 65535, 65535, 65535 ) ; > > and the compiler says: > error: no matching function for call to `pngwriter::plot_text( char*&, > int, int, int, char*&, int, int, int)' > ../src/pngwriter.h:443: error: candidates are: void > pngwriter::plot_text(char*, int, int, int, double, char*, double, > double, double) > ../src/pngwriter.h:444: error: void > pngwriter::plot_text(char*, int, int, int, double, char*, int, int, > int) > > ---------------------- > > Other variations produce similar results. > > What the heck is happening here ? I'd recommend you compile the example given on the website and go from there, modifying as needed. Or take a look at my photo- watermarking implementation using PNGwriter on my blog: http://flightoftheplatypus.blogspot.com/2006/06/how-to-watermark-your- photos_16.html Best of luck. Paul ------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 _______________________________________________ http://pngwriter.sourceforge.net/ PNGwriter-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/pngwriter-users
