I defined two additional functions as recommended by Paul/Ken to avoid direct call to SIMPLEPLOT_REDRAW@:
integer function new_data_cb()
CALL SELECT_GRAPHICS_OBJECT@(handle_pl)
call simpleplot_redraw@()
CALL select_font@('arial')
CALL bold_font@(1)
CALL size_in_points@(15,15)
CALL draw_characters@('Y_S-JTSK [m]',600,630,RGB@(255,0,255))
CALL rotate_font@(90.0d0)
CALL draw_characters@('X_S-JTSK [m]',90,400,RGB@(255,0,255))
CALL rotate_font@(0.0d0)
new_data_cb = 2
end function new_data_cb
Its contents was previously part of an integer call-back function within the %PL following the condition:
IF (cb_reason .eq. 'PLOT_ADJUST') THEN
...
i = COPY_GRAPHICS_REGION@(handle_internal_gr, 1, 1, gw, gh, handle_pl, 1, 1, gw, gh, 13369376)
END IF
Now, it looks as follows:
IF (cb_reason .eq. 'PLOT_ADJUST') THEN
i = new_data_cb()
i = COPY_GRAPHICS_REGION@(handle_internal_gr, 1, 1, gw, gh, handle_pl, 1, 1, gw, gh, 13369376)
END IF
Then, the 2nd new function to avoid direct SIMPLEPLOT_REDRAW@ call is:
integer function new_data_cb_simple_plot()
CALL SELECT_GRAPHICS_OBJECT@(handle_pl)
call simpleplot_redraw@()
new_data_cb_simple_plot = 2
end function new_data_cb_simple_plot
The above function replaces all direct SIMPLEPLOT_REDRAW@ calls (all those calls were removed) in the whole program.
When I zoom in/out the graph by pressing the corresponding buttons, it works, however as soon as I move the mouse cursor back over the graph, it automatically adjust the graph to its extents without pressing zoom in or zoom out button (what is not wanted).
Now, I do not know, whether this could be a problem with the new DLLs
or the problem is embedded in my code?
And to be honest, I do not quite understand, what it is advantage of blocking direct calls to SIMPLEPLOT_REDRAW@ function (which worked problem free) and using an user defined function instead? At present, I have some problems with this approach.
Martin