|
|
Hi Gonzalo,
From a quick visual inspection, nothing obvious comes to mind.
I wonder if the parameters to the matrix need to be normalized or something?
Anyway, do you have (or can you make) a little standalone sample that uses that code, and I'll give it a spin once I'm near a real computer again!
Cheers, -- Ian From my Fairphone FP3 On Sun, 21 May 2023, 13:26 Gonzalo Garramuño wrote:
This piece of code (drawing on an HSV color wheel):
imaging::Color4f hsv = color::rgb::to_hsv(color);
int W = diameter / 2;
int H = diameter / 2;
fl_push_matrix();
// Position at center of circle
fl_translate(x() + W, y() + H);
// Rotate base on hue
fl_rotate(15.0 + hsv.r * 360.0f);
// Scale based on saturation
fl_scale(hsv.g * 0.375f, hsv.g * 0.375);
fl_color(r, g, b);
fl_begin_points();
fl_vertex(0, diameter);
fl_end_points();
fl_pop_matrix();
returns:
error in cairo_matrix_invert
on Linux.
On Windows, it draws just fine and previously (before Cairo was the
default drawing method for fltk1.4 it was also ok). Any ideas how to
further debug it or what might be wrong?
--
Gonzalo Garramuño
--
You received this message because you are subscribed to the Google Groups "fltk.coredev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fltkcoredev+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/fltkcoredev/CAGFM6da_N3X5_%2BebY3jo1Bv0PEps4VH5PtTqtcdu9NCi5A-yPA%40mail.gmail.com.
[ Direct Link to Message ] | |
|
| |