When doing graphics it could be important to know from inside a program the width and height values as they could be added to a shortcut as switches -W and -H. The simplest solution would be to just set them as constants into the program. But this fails, if there is only the switch -F (without -W and -H) which initializes FMSLogo to the full display. How can this problem be solved? Is there any way to set or at least read it programmatically? And how does SETACTIVEAREA react, if its values are set outside the limits given by -W and -H?
By the way: We have started to recommend FMSLogo as school software for an age of 12 to 16 years and to develop courseware for this purpose - as far as we can afford resources under Corona conditions. Nevertheless, I promise nothing. There are also efforts to use Logo especially for younger children, but we are not involved in them.
Yes. You can read the width/height of the drawable surface with MACHINE.
It looks like SETACTIVEAREA lets you set values outside the limits and then weird stuff happens later when you try to print/save the image. That's probably a bug. I'd expect SETACTIVEAREA to limit the selected area the width/height of the drawable surface or throw an error if it's out-of-range.
Although you didn't ask about setting these values programmatically, I'll answer that, too. There is currently no way to set the width/height other than the command line. It's possible for one instance of FMSLogo to start another instance of FMSLogo passing -W and -H parameters and then exit, but that's very clumsy. Doing it within FMSLogo is Feature Request 112.
Related
Feature Requests: #112
Wonderful - many thanks!
It's in the manual, but I didn't notice it so far. And MACHINE can do even more - yield a whole bunch of useful information.
As to setting it programmatically - switches W and H are something special and one more powerful feature of FMSLogo, which even famous languages don't have implemented. It is okay to add them to the shortcut. The only disadvantage is that you have to use absulute paths in the work-folder and cannot easily shift it - say to a USB-stick.
Using W and H I have been able to program DIN-A-4-documents ("intelligent" and designed) with high print resolution (600 dpi), double page and with a ZOOM of 1:5 to watch them on the display, while a batch-job was running - the same batch job needed one night 8 years ago and needs 10 minutes now.
It doesn't do any good if the information is not where you're looking. I plan to add a note to documentation for
-W,-H, and-Fthat you can get the width/height with MACHINE and add an explicit example for this to MACHINE.If you have FMSLogo start another FMSLogo, you don't need to create a shortcut. See the attached program for an example (copied below for reference):
You should be able to double-click on hire-program.lgo. In a sense, the program acts as its own shortcut.