Hello all,
I'm new to plplot. While playing with examples I have found that x01
behaves strangely, in particular the "-locate" switch.
After reading some code, I've found that xcairo_get_cursor() in
drivers/cairo.c calls some X API to get a mouse event. But X uses a
coordinate system where origin is located in top-left corner and Y
axis goes down, while plplot uses a coordinate system with Y axis
going up.
Thus, plGetCursor() call works incorrectly, that is, it returns wrong
world coordinates, Y axis is inverted.
I have reduced x01 to a small testcase. Try clicking on the plot --
you'll get "plGetCursor() == 0". Try clicking on the black area
below, you'll get some coordinates.
I've verified that the bug exists in the latest trunk.
Regards,
Dmitri Gribenko
--
main(i,j){for(i=2;;i++){for(j=2;j<i;j++){if(!(i%j)){j=0;break;}}if
(j){printf("%d\n",i);}}} /*Dmitri Gribenko <gribozavr@...>*/
|