|
|
## 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); cairo_t* cr = cairo_create(record);
The image code goes here. The image is *measured* by
cairo_rectangle_t rect; cairo_recording_surface_ink_extents(record, &rect.x, &rect.y, &rect.width, &rect.height);
The surface can then be painted to any other type of surface. In my program, it is first shown on the screen and then, if satisfactory, exported to pdf.
## The Problem I have attached a demo program. The recording phase and the export to pdf portions seem to work perfectly. The *display on screen* portion shows the image but with a corrupted background. I am using recent cairo and Linux Mint distributions. FLTK version is 1.4.0. I have not tried Mac or Windows. Hints for resolving this problem would be much appreciated.
--
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/bbf746b7-af22-4c52-8564-becfa93a41cfn%40googlegroups.com.
[ Direct Link to Message ] | |
|
| |