FLTK logo

Re: [fltk.general] Read in SVG and render using cairo

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 ]

Re: Read in SVG and render using cairo janezz55 Nov 24, 2020  
 
Check this out, maybe it will help you, should be portable ..., but I only tested under linux, does not need svg or cairo support linked into the library:

https://github.com/user1095108/cairowidget

On Saturday, November 7, 2020 at 4:52:38 AM UTC+1 anmol....@gmail.com wrote:
In the docs we need to create Cairo context using fltk APIs then use Cairo commands.
However there is also cairo_cc. can I accept Cairo context created outside fltk and assign to local window using cairo_cc?

On Saturday, November 7, 2020 at 4:10:56 AM UTC+5:30 Ian MacArthur wrote:


> On 6 Nov 2020, at 12:47, anmol.mishra wrote:
>
> Looking at Fl::cairo_cc(cairo_t *), can I draw into a cairo context with 2D vector primitives, and then pass it to fltk ? Will the drawn cairo operations be recognized by fltk ?

The easiest thing might be to create a Fl_Cairo_Window as shown in cairo_test.cxx and then render the scene just using Cairo primitives.


That said, although Cairo does a nice job, I found it to be quite slow, so I ended up rendering the window content in GL instead 
Cairo has a gl backend as well 

--
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/9918aa16-e5d9-4cb5-88ff-a895422fdc57n%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'.