FLTK logo

[master] 7b34385 - Fix simple SVG example (howto-simple-svg)

FLTK matrix user chat room
(using Element browser app)   FLTK gitter user chat room   GitHub FLTK Project   FLTK News RSS Feed  
  FLTK Apps      FLTK Library      Forums      Links     Login 
 All Forums  |  Back to fltk.commit  ]
 
Previous Message ]Next Message ]

[master] 7b34385 - Fix simple SVG example (howto-simple-svg) "Albrecht Schlosser" Aug 13, 2020  
 
commit 7b34385511f35a23da8782fa7d5676468aaa8155
Author:     Albrecht Schlosser <albrechts.fltk@online.de>
AuthorDate: Thu Aug 13 20:22:59 2020 +0200
Commit:     Albrecht Schlosser <albrechts.fltk@online.de>
CommitDate: Thu Aug 13 20:25:03 2020 +0200

    Fix simple SVG example (howto-simple-svg)

 examples/howto-simple-svg.cxx | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git examples/howto-simple-svg.cxx examples/howto-simple-svg.cxx
index d70f040..c3875e4 100644
--- examples/howto-simple-svg.cxx
+++ examples/howto-simple-svg.cxx
@@ -14,7 +14,7 @@
 //
 //     https://www.fltk.org/bugs.php
 //
-#include <config.h>     /* needed only to detect FLTK_USE_NANOSVG */
+#include <config.h>     /* needed only to detect FLTK_USE_SVG */
 #include <FL/Fl.H>
 #include <FL/Fl_Window.H>
 #include <FL/Fl_Box.H>
@@ -53,12 +53,14 @@ const char *svg_logo =
     "</svg>\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.");
+#ifndef FLTK_USE_SVG
+    fl_message("You need to build FLTK with 'configure --enable-svg'\n"
+               "or CMake option 'OPTION_USE_SVG'\n"
+               "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_Window    *win = new Fl_Window(720, 486, "howto-simple-svg");
     Fl_Box       *box = new Fl_Box(10,10,720-20,486-20);
     box->image(svg);
     win->end();
Direct Link to Message ]
 
     
Previous Message ]Next Message ]
 
 

Comments are owned by the poster. All other content is copyright 1998-2024 by Bill Spitzak and others. This project is hosted by The FLTK Team. Please report site problems to 'erco@seriss.com'.