Well, my test run of finishing the tool is mostly done. Essentially, I wanted to show people how easy it is to build a very small but semi-useful tool.
I wanted to make the tool before I did the second video.
But I'm left with some minor features I'd like to add.
I noticed that the WINDOWPROP functions seem to treat the window border itself as part of the window height.
I read that one may simply use the window itself as the graphics stream so I suppose that makes sense.
Question 1
What I'd really like to do is work in terms of the inner canvas geometry.
Are there any functions to work with geometry according to the inside geometry of the window?
I can, of course, do the necessary arithmetic taking borders into account if need be.
Question 2
As you can see in the HARRY-PLOTTER window I cheated and used mostly positive coordinates.
I think it's technically correct but I'd really like to move the origin of drawing to the center.
This of course takes knowing the inner height and width. I could then generate a better range of numbers with negative indices.
I read that you can set the current position in the drawing stream but after fussing around a bit I didn't get it moved.
I will provide both functions I've created.
(CL:DEFUN GENPTS (&OPTIONAL (NUM-PTS 128))
"MAKE A DUMMY LIST OF (X . Y) PAIRS FOR TESTING."
(FOR I FROM 0 TO NUM-PTS
COLLECT (CONS (RAND 0 100)
(RAND 0 100))))
(CL:DEFUN HARRY-PLOTTER (XYPAIRS)
"GIVEN A LIST OF (X . Y) PAIRS, PLOT THEM TO A NEW WINDOW."
(LET ((W (CREATEW (CREATEREGION 128 128 256 256) "HARRY PLOTTER")))
(CL:LOOP FOR (X . Y) IN XYPAIRS DO (DRAWPOINT X Y '(ROUND 3) W 'PAINT))
W))
An image update:
