diff --git a/CHANGELOG.md b/CHANGELOG.md index 202a7659..02981660 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -19,6 +19,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - #> (the pictured numeric output string buffer) now uses its own buffer, separate from HERE. - Do not print "ok" while compiling. Makes it easier to re-enter multi-line word definitions in interpreter. - Moved tests to a separate disk (tests.d64). + - gfx: Renamed ERASE to PEN. ### Removed - GETC, 100/ ### Fixed diff --git a/forth/gfx.fs b/forth/gfx.fs index d4b31f69..c71eeeaa 100644 --- a/forth/gfx.fs +++ b/forth/gfx.fs @@ -286,7 +286,7 @@ over negate err +! then repeat 2drop kernal-in ; -: erase if +: pen if 4d ['] xor else d ['] or then ['] blitop @ ! ['] blitop 2+ @ c! ; diff --git a/forth/gfxdemo.fs b/forth/gfxdemo.fs index 011aebda..61bfd708 100644 --- a/forth/gfxdemo.fs +++ b/forth/gfxdemo.fs @@ -101,14 +101,14 @@ dup 0 swap plot dup 13f swap line a0 64 plot dup 64 swap *cos a0 + over 64 swap *sin 64 + line -1- repeat 1 erase loop -0 erase ; +1- repeat 1 pen loop +0 pen ; hires erasecirc key drop lores .( rotsqr..) : rotsqr hires 16 clrcol -8 d020 c! 1 erase +8 d020 c! 1 pen 2 0 do fa begin ?dup while dup dup *cos a0 + over dup *sin 64 + 2dup plot plot @@ -120,7 +120,7 @@ dup dup *sin a0 + over dup *cos 64 swap - line dup dup *cos a0 + over dup *sin 64 + line -5 - repeat loop 0 erase ; +5 - repeat loop 0 pen ; hires rotsqr key drop lores .( seascape..) diff --git a/manual/gfx.adoc b/manual/gfx.adoc index 31df2270..5d582f49 100644 --- a/manual/gfx.adoc +++ b/manual/gfx.adoc @@ -31,8 +31,8 @@ E.g. `15 clrcol` clears the screen with green background, white foreground. ((peek)) _( x y -- p )_ :: Get the pixel at _x_, _y_. ((line)) _( x y -- )_ :: Draw a line to _x_, _y_. ((circle)) _( x y r -- )_ :: Draw a circle with radius _r_ around _x_, _y_. -((erase)) _( mode -- )_ :: Change blit method for line drawing. -`1 erase` uses `xor` for line drawing, `0 erase` switches back to `or`. +((pen)) _( mode -- )_ :: Change line drawing method. +`1 pen` inverts color, `0 pen` switches back to normal mode. ((paint)) _( x y -- )_ :: Paint the area at _x_, _y_. ((text)) _( column row str strlen -- )_ :: Draw a text string at the given position. E.g. `10 8 parse-name hallo text` draws the message `hallo` at column 16, row 8.