Here is the description at VIEW (graphics) page:
Here is what all of that describes:The first statement sets the viewport to encompass the entire screen, which is the default viewport for a new graphics screen.
The second and third statements both allow a new viewport to be defined. The corners of the viewport are specified by the x1, y1, x2 and y2 parameters. fill_color and border_color are both in the format accepted by Color. The indicated effects for each parameter only occur if that parameter is specified.
The second statement modifies the coordinate mapping of the graphics screen such that coordinates specified for drawing statements and procedures are relative to the top-left corner of the viewport.
The third statement modifies the coordinate mapping of the graphics screen such that coordinates specified for drawing statements and procedures are relative to the top-left corner of the screen.
So, what I find difficult here, is two things. What are "first", "second", and "third" statement exactly is a little difficult to remember when you really meet the keyword for the first time (or very rarely as I do). The second point is that this is not linear, things about the colors are in the middle of the things about coordinates. This all makes the reading difficult.Syntax
View
View ( x1, y1 )-( x2, y2 ) [ [, fill_color ] [, border_color ] ]
View Screen ( x1, y1 )-( x2, y2 ) [ [, fill_color ] [, border_color ] ]
As a matter of suggestion, what about something like, reducing difficulty in my opinion and adding some details (rectangular region, no scaling effect):
Second point, the VIEW PRINT page seems to be a mere copy of the VIEW (console) page. But where VIEW (console) mentions that VIEW PRINT concerns also graphics, VIEW PRINT seems to omit this point... I'm not exact, I mean it mentions it but just as an illustration. This was the right approach in VIEW (console), but at VIEW PRINT page, it all about this, so maybe it should be more visible?The first statement (View) sets the viewport to encompass the entire screen . This is the default viewport for a [just created] graphics screen.
The two others statements takes a rectangular region as argument. The corners of the region are specified in the application screen coordinates by the x1, y1, x2 and y2 parameters. Once specified, this region will be the new active viewport area. A viewport can also have some colors defined: fill_color and border_color are then to be specified in a format like what is used for the Color (<--link) keyword.
About coordinates change:
- The second statement (View "region") modifies the coordinate mapping of the graphics screen such that coordinates specified for drawing statements and procedures are relative to the top-left corner of the viewport rectangular region.
- The third statement (View Screen "region") modifies the coordinate mapping of the graphics screen such that coordinates specified for drawing statements and procedures remains relative to the top-left corner of the screen.
Remark: in both cases no new scale factor is applied (see WINDOW (<---link) for that).
Last point, again about VIEW (graphics), just a question I have right now. Are all the procedures and anything, compatible with VIEW? Or do some commands ignore it?
Thanks!