|
From: James R. V. Z. <jr...@co...> - 2009-07-21 10:29:04
|
> Tatsuro MATSUOKA <tma...@ya...> writes:
>
>> I have built wgnuplot with wxt on the cvs trees
>> 2009-07-18 Ethan A Merritt <merritt@u.washington.edu>
>>
>> * src/wxterminal/wxt_gui.cpp src/wxterminal/wxt_gui.h:
>> Pass through mouse wheel events from the wxt terminal, so that the new
>> pan and zoom works for wxt as well as x11.
>
> I have confirmed that pan and zoom using work on wxt but does not work on windows terminal.
Thanks for checking this out.
In the mean time I've found a simpler approach:
if (modifier_mask & Mod_Shift) {
/* scroll left */
xmin = AXIS_DE_LOG_VALUE(FIRST_X_AXIS,1.1*axis_array[FIRST_X_AXIS].min
-.1*axis_array[FIRST_X_AXIS].max);
ymin = AXIS_DE_LOG_VALUE(FIRST_Y_AXIS,axis_array[FIRST_Y_AXIS].min);
x2min = AXIS_DE_LOG_VALUE(SECOND_X_AXIS,1.1*axis_array[SECOND_X_AXIS].min
-.1*axis_array[SECOND_X_AXIS].max);
y2min = AXIS_DE_LOG_VALUE(SECOND_Y_AXIS,axis_array[SECOND_Y_AXIS].min);
xmax = AXIS_DE_LOG_VALUE(FIRST_X_AXIS,.1*axis_array[FIRST_X_AXIS].min
+.9*axis_array[FIRST_X_AXIS].max);
ymax = AXIS_DE_LOG_VALUE(FIRST_Y_AXIS,axis_array[FIRST_Y_AXIS].max);
x2max = AXIS_DE_LOG_VALUE(SECOND_X_AXIS,.1*axis_array[SECOND_X_AXIS].min
+.9*axis_array[SECOND_X_AXIS].max);
y2max = AXIS_DE_LOG_VALUE(SECOND_Y_AXIS,axis_array[SECOND_Y_AXIS].max);
do_zoom(xmin, ymin, x2min, y2min, xmax, ymax, x2max, y2max);
if (display_ipc_commands()) {
fprintf(stderr, "scroll left.\n");
}
}
Since this doesn't involve MousePosToGraphPosReal(), it works even for
splot. I don't know whether this change would affect the other terminals.
I haven't checked in this change because I found a bug: If I plot a
function defined only for certain values of Y, and set logscale Y, and
scroll past the defined region, then it breaks. E.g.
set logscale y;set xrange [0:5];set yrange [.01:10];
splot sqrt(1.02-(1- x)**2 - (1-y)**2)
I haven't diagnosed that problem yet.
- Jim Van Zandt
|