![]() |
||
| Home | SwiftForth Archive | SwiftX Archive | |

Thanks Mike.
That's almost exactly what I was looking for. Is it hard to make the lines
persistent? They disappear if you move the window off screen and then bring
it back. Is that asking a lot?
Charley.
-----Original Message-----
From: sftalk-bounce_at_forth.com [mailto:sftalk-bounce_at_forth.com] On Behalf Of
Mike Ghan
Sent: Monday, April 09, 2007 6:27 PM
To: sftalk_at_forth.com
Subject: [sftalk] Re: simple line drawing
Hi Charley,
Windows does takes a bit to get used to. Try the following:
-----------------------------------------------
CANVAS BUILDS MY-CANVAS
HWND GetDC ( console hDC ) MY-CANVAS ATTACH
10 100 200 300 MY-CANVAS Line
20 120 S" Hello" MY-CANVAS Text
MY-CANVAS HDC $0000FF SetTextColor DROP
20 150 S" World" MY-CANVAS Text
-----------------------------------------------
Mike
-----Original Message-----
From: sftalk-bounce_at_forth.com [mailto:sftalk-bounce_at_forth.com] On Behalf
Of Charley Shattuck
Sent: Monday, April 09, 2007 3:45 PM
To: sftalk_at_forth.com
Subject: [sftalk] simple line drawing
I'm fairly new to SwiftForth and windows, not to Forth. I want to be
able to draw a graph, sort of like an oscilloscope trace, continuously
as data is produced by a simulation. I see a class called CANVAS which
has such methods as MoveTo, LineTo, Line, and SetPixel. A also see the
Windows functions called LineTo, MoveToEx, and SetPixel in the source
file for CANVAS. It looks as though I could draw a line in the console
window if I only knew the HDC of that window. Am I on the right track?
Can anyone show me how to use CANVAS and/or learn what the HDC of the
console window is?
Thanks,
Charley.
----------------------------------------------------------------------
sftalk_at_forth.com The SwiftForth programming discussion email list
To unsubscribe, send subject "unsubscribe" to sftalk-request_at_forth.com
For list command help, send subject "help" to sftalk-request_at_forth.com
Message archives are located at http://www.forth.com/archive/sftalk
----------------------------------------------------------------------
This list is a forum for SwiftForth users. For product support and bug
reports, please send email to support_at_forth.com
----------------------------------------------------------------------
----------------------------------------------------------------------
sftalk_at_forth.com The SwiftForth programming discussion email list
To unsubscribe, send subject "unsubscribe" to sftalk-request_at_forth.com
For list command help, send subject "help" to sftalk-request_at_forth.com
Message archives are located at http://www.forth.com/archive/sftalk
----------------------------------------------------------------------
This list is a forum for SwiftForth users. For product support and
bug reports, please send email to support_at_forth.com
----------------------------------------------------------------------
----------------------------------------------------------------------
sftalk_at_forth.com The SwiftForth programming discussion email list
To unsubscribe, send subject "unsubscribe" to sftalk-request_at_forth.com
For list command help, send subject "help" to sftalk-request_at_forth.com
Message archives are located at http://www.forth.com/archive/sftalk
----------------------------------------------------------------------
This list is a forum for SwiftForth users. For product support and
bug reports, please send email to support_at_forth.com
----------------------------------------------------------------------
Received on Mon Apr 09 2007 - 20:42:49 PDT
This archive was generated by hypermail 2.2.0 : Tue Dec 02 2008 - 03:04:42 PST