FLTK logo

Re: [fltk.general] Problem displaying recorded cairo image

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: Problem displaying recorded cairo image imm Oct 26, 2020  
 
On Mon, 26 Oct 2020 at 15:15, david allen wrote:
>
> ## Background and Project Objective
> I am developing a program for mathematical modeling. The program creates cairo images showing aspects of models fit to data. The bounding boxes of the images are not known in advance. Hence the image is written to an unbounded surface to be measured later. Code to setup a recording surface is
>
>     cairo_surface_t* record =
>         cairo_recording_surface_create(CAIRO_CONTENT_COLOR_ALPHA, NULL);

Hmm, I wonder if you need to "flatten" this surface before you render it?
That is, I wonder if the rendering into the Fl_Box is getting confused
by the alpha channel here? It's possible that the target at that point
is only RGB, not RGBA...

That is pure speculation however...

FWIW, I ran the code (on Ubuntu) and the first time worked fine, no
background corruption. Every subsequent time, I saw some corruption
however.

Also: From your description I had expected the fltk render to be sized
to fit the star (as the PDF is) but that did not seem to be the case,
the star was rendered in the top left corner of the window. Is that as
expected?

-- 
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/CAGFM6dbi_3LZhgKJsM%3Doou88Kwb7B5B67E4cpZJNcjWPDX%3Drpg%40mail.gmail.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'.