Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
34
Task/Draw-a-pixel/M2000-Interpreter/draw-a-pixel.m2000
Normal file
34
Task/Draw-a-pixel/M2000-Interpreter/draw-a-pixel.m2000
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
Module CheckIt {
|
||||
Module PlotPixel (a as single, b as single) {
|
||||
Move a*TwipsX, b*TwipsX
|
||||
Draw TwipsX, TwipsY
|
||||
}
|
||||
Cls 5,0 \\ clear console with Magenta (5) and set split screen from 0 (no split screen)
|
||||
Pen #55FF77 {
|
||||
PlotPixel 1000, 200
|
||||
}
|
||||
Wait 1000
|
||||
Title "", 1
|
||||
Declare DrawPixelForm Form
|
||||
With DrawPixelForm, "Title", "Draw a Pixel at 100,100"
|
||||
Layer DrawPixelForm {
|
||||
\\ 12 for 12pt fonts
|
||||
\\ use ; to center window
|
||||
Window 12, 320*twipsx, 240*twipsy;
|
||||
Cls #333333
|
||||
Pen Color(255,0,0) {
|
||||
PlotPixel 100, 100
|
||||
}
|
||||
}
|
||||
\\ code to show/hide console clicking form
|
||||
\\ console shown behind form
|
||||
k=0
|
||||
Function DrawPixelForm.Click {
|
||||
Title "Rosetta Code Example", abs(k)
|
||||
if k then show
|
||||
k~
|
||||
}
|
||||
Method DrawPixelForm, "Show", 1
|
||||
Declare DrawPixelForm Nothing
|
||||
}
|
||||
CheckIt
|
||||
Loading…
Add table
Add a link
Reference in a new issue