// // "$Id$" // // Simple example of how to use an SVG image in an FLTK program. // Assumes fltk was built with --enable-nanosvg. // // Copyright 1998-2010 by Bill Spitzak and others. // // This library is free software. Distribution and use rights are outlined in // the file "COPYING" which should have been included with this file. If this // file is missing or damaged, see the license at: // // http://www.fltk.org/COPYING.php // // Please report all bugs and problems on the following page: // // http://www.fltk.org/str.php // #include /* needed only to detect FLTK_USE_NANOSVG */ #include #include #include #include #include #include /* svg logo */ const char *svg_logo = "\n" "\n" "\n" "\n" "\n" "\n"; int main(int argc, char **argv) { #ifndef FLTK_USE_NANOSVG fl_message("You need to build fltk with --enable-nanosvg to use this example."); return(1); #else Fl_SVG_Image *svg = new Fl_SVG_Image(NULL, svg_logo); Fl_Window *win = new Fl_Window(720, 486, "svg test"); Fl_Box *box = new Fl_Box(10,10,720-20,486-20); box->image(svg); win->end(); win->show(argc,argv); return(Fl::run()); #endif } // // End of "$Id$". //