Hi guys, I have been working on the _WIN32 incarnation of gnudatalanguage (GDL), the overall project is in pretty good shape internally - it has most aspects of IDL pre-2000 implemented. For plotting it uses plplot; hence I've got a few lines to wingcc.c that should be useful, and one aspect of the newer (post-5.10.0) version that I want to argue against. I began to go through git but today I'm on a different computer and git usage was hitting roadblocks so I'm submitting this old-school.
plplot-5.10.0/drivers/wingcc.c is the only affected file.
In GDL, plpot is called from C++ via plstream. It does explicitly use the
wingcc_dev structure (defined in wingcc.c and copied in gdl code). So if
this structure is changed a user will forever have to distinguish between
pre-5.11 and post-5.10 plplots. In recent distribution there is an added
element in the structure, a pointer to a PLgraphicsIn structure. To date
there has been no use made of this new element, so I want to kill it before
somebody needs it. The PLGraphicsIn is instead implemented, here, as an
externally-based structure passed into the plD_esc function when PLESC_GETC
is to be invoked. XWIN.c already implements the gin cursor structure in
similar fashion to what I'm proposing.
The changes I made to Wingcc for better functionality:
- Added a DestroyWindow() system called to clean up the plstream object
destroyed.
I tried every which way to call this from the GDL code, nothing
worked until I put it here.
- Change SetForegroundWindow call to a BringWindowToTop call upon window
creation. That way the user is still typing productively.
- Invoke the PLESC_GETC to call Cursor_Cmd. The Gin cursor is defined
and passed
from the caller (NOT added to the device structure) as it is in xwin.c.
- routine GetCursorCmd
line 1004: GetCursorCmd( PLStream *pls, PLGraphicsIn *gin ) allows
options to be passed through setting flags in the passed gin. before it
returns it adjusts normal coordinates (line 1060) so that re-plotting an
"X" in normal coordinates comes back under the cursor. Then some system
calls are made to keep the plot window at front yet keep focus in the
console window.
GDL/IDLsessions can involve spur-of-the moment plot creations in multiple
windows, so the focus and cleanup issues were
immediately apparent and I hope these few changes do the trick. Relating
the cursor coordinates to the plot region is
yet a tricky matter; plotting via device coordinates does not reproduce the
reported cursor coordinates (the x-win cursor
does that ok). I was able to make a (mysterious) correction such that
normal coordinates are reproduced correctly. Another
remaining issue is with the backing store: the first plot benefits from
backing store but overlaid plots disappear upon movement.
plplot-5.10.0.patch.gz
Description: GNU Zip compressed data
------------------------------------------------------------------------------ Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer http://pubads.g.doubleclick.net/gampad/clk?id=154622311&iu=/4140/ostg.clktrk
_______________________________________________ Plplot-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/plplot-devel
