|
|
El 21/5/23 a las 16:07, Manolo escribió:
The example program calls function fl_scale(double x, double y) with
null x and y.
Correct, as a side effect of not initializing the values.
These values are not in the range of meaningful values for a scaling
operation.
I see that other platforms accept that in the context of the example
program,
but I see that as a happy border effect an FLTK app should not rely on.
Why does the example program call fl_scale(0, 0) in the first place?
The example program is a (simplified) vectorscope, which measures the
color saturation in a wheel. Black, grays and white are in the 0,0
coordinate, while all other hues are rotated and scaled based on their
saturation level (closer to the outbound squares).
About how the Cairo backend of FLTK draw points :
it draws a filled rectangle of size 1 unit as shown by this code fragment
void Fl_Cairo_Graphics_Driver::point(int x, int y) {
rectf(x, y, 1, 1);
}
Right, but that 1,1 gets transformed by the matrix so it never draws one
pixel.
I've switched to calculate the matrix transform myself instead of
calling the cairo transformations and then calling rectf(x,y,1,1); with
the calculated positions.
--
Gonzalo Garramuño
ggarra13@gmail.com
--
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/311845bb-71a3-509c-9469-e51b66446a19%40gmail.com.
[ Direct Link to Message ] | |
|
| |