Hi,
Create true graphical constants with eFORTH web.
Listing here: https://github.com/MPETREMANN11/uEforth/blob/main/web/TESTS/GRAPHIC_CONSTANTS.html
The newPath2D: word is used to create a word which then functions as a FORTH constant. Example:
s" ...svg commands..." newPath2D: myDraw
To display myDraw it must be preceded by the position x y in canvas. Example:
10 10 myDraw
Le mercredi 10 mai 2023 à 23:12:19 UTC+2, Marc Petremann a écrit :That is pretty cool ! I’ve not done much on the graphical side of things… but looks like a promising path to test and experiments.
Hi,New article: https://eforth.arduino-forth.com/article/installation_web_graphic_graphicConstants
Create true graphical constants with eFORTH web.
Listing here: https://github.com/MPETREMANN11/uEforth/blob/main/web/TESTS/GRAPHIC_CONSTANTS.html
The newPath2D: word is used to create a word which then functions as a FORTH constant. Example:
s" ...svg commands..." newPath2D: myDraw
To display myDraw it must be preceded by the position x y in canvas. Example:
10 10 myDraw
For example, how drawing a logic AND GATE:
s" M 0 8 h 10 Z
M 0 20 h 10 Z
M 10 0 v 28 h 24
a 16 -14 0 0 0 0 -28
h -24 Z
M 50 14 h 10 Z " newPath2D: GATE_AND
10 10 GATE_AND
10 50 GATE_AND
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 475 |
Nodes: | 16 (2 / 14) |
Uptime: | 20:00:31 |
Calls: | 9,487 |
Calls today: | 6 |
Files: | 13,617 |
Messages: | 6,121,093 |