FLTK logo

[fltk.general] Scrollable 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.general  ]
 
Previous Message ]New Message | Reply ]Next Message ]

Scrollable SVG Damiano Rocchi Jun 08, 2022  
 
Hi,
I write a little program in C++ with fltk 1.4, and I don't succed to scroll a SVG image, larger the window. Can you help me ?


#include <FL/Fl.H>
#include <FL/Fl_Window.H>
#include <FL/Fl_Box.H>
#include <FL/Fl_SVG_Image.H>
#include <Fl/Fl_Scroll.H>
int main(int argc, char **argv) {
  Fl_Window *win = new Fl_Window(720, 486, "svg test");
  Fl_Scroll scroll(0, 0, 720, 486);
  Fl_Box    *box = new Fl_Box(0, 0, win->w(), win->h());
 
  const char *svgpath = "Imm.svg";
  Fl_SVG_Image *svg = new Fl_SVG_Image(svgpath);
  box->image(svg);
 
  win->end();
  win->show();
  return(Fl::run());
}

--
You received this message because you are subscribed to the Google Groups "fltk.general" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fltkgeneral+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/fltkgeneral/df0ba59f-4b9d-49bf-94f2-a6b45a15a13an%40googlegroups.com.
Direct Link to Message ]
 
     
Previous Message ]New Message | Reply ]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'.