Revision history for KeyPgWindow


Revision [23509]

Last edited on 2019-09-19 05:57:50 by fxm [formatting for .chm]
Additions:
'' - As the viewport coordinates get smaller, the figure appears larger on the screen, until parts of it are finally clipped,
'' because they lie outside the window.
Deletions:
'' - As the viewport coordinates get smaller, the figure appears larger on the screen, until parts of it are finally clipped because they lie outside the window.


Revision [21189]

Edited on 2016-03-13 11:55:21 by fxm [Formatting]
Additions:



Revision [20602]

Edited on 2016-02-10 16:11:00 by DkLwikki [Update link format]
Additions:
""FreeBASIC's"" current behavior is to keep track of the corners of the ##**Window**##, rather than a specific coordinate mapping. This means that the coordinate mapping can change after calls to ##[[KeyPgViewgraphics|View]]##.
When there is no ##**Window**## in effect, there is no coordinate mapping in effect, so the effective coordinate system is constant, independent of image buffer sizes or ##[[KeyPgViewgraphics|View]]## coordinates (if any).
- ##[[KeyPgScreengraphics|Screen (Graphics)]]##
- ##[[KeyPgViewgraphics|View (Graphics)]]##
- ##[[KeyPgPmap|PMap]]##
Deletions:
""FreeBASIC's"" current behavior is to keep track of the corners of the ##**Window**##, rather than a specific coordinate mapping. This means that the coordinate mapping can change after calls to ##[[KeyPgViewgraphics View]]##.
When there is no ##**Window**## in effect, there is no coordinate mapping in effect, so the effective coordinate system is constant, independent of image buffer sizes or ##[[KeyPgViewgraphics View]]## coordinates (if any).
- ##[[KeyPgScreengraphics Screen (Graphics)]]##
- ##[[KeyPgViewgraphics View (Graphics)]]##
- ##[[KeyPgPmap PMap]]##


Revision [17838]

Edited on 2015-10-24 07:54:58 by FxMwikki [Added example of zooming in and out, by changing coordinates system with keyword 'Window']
Additions:
{{fbdoc item="filename" value="examples/manual/gfx/window2.bas"}}%%(freebasic)
'' The program shows how changing the view coordinates mapping for the current viewport changes the size of a figure drawn on the screen.
'' The effect is one of zooming in and out:
'' - As the viewport coordinates get smaller, the figure appears larger on the screen, until parts of it are finally clipped because they lie outside the window.
'' - As the viewport coordinates get larger, the figure appears smaller on the screen.
Declare Sub Zoom (Byval X As Integer)
Dim As Integer X = 500, Xdelta = 50
Screen 12
Do
Do While X < 525 And X > 50
X += Xdelta '' Change window size.
Zoom(X)
If Inkey <> "" Then Exit Do, Do '' Stop if key pressed.
Sleep 100
Loop
X -= Xdelta
Xdelta *= -1 '' Reverse size change.
Loop
Sub Zoom (Byval X As Integer)
Window (-X,-X)-(X,X) '' Define new window.
Screenlock
Cls
Circle (0,0), 60, 11, , , 0.5, F '' Draw ellipse with x-radius 60.
Screenunlock
End Sub


Revision [17837]

Edited on 2015-10-23 09:00:59 by FxMwikki [To remove clipping area, 'View' is sufficient (instead of 'View Screen' not documented)]
Additions:
window
view
Deletions:
window
view screen


Revision [16878]

Edited on 2013-06-25 23:21:28 by CountingPine [Typo]
Additions:
The ##**Window**## corners are also currently taken into account when working on image buffers, so when a ##**Window**## is in effect, the coordinate mapping will be different from image to image.
Deletions:
The ##**Window**## corners are also currently taken into account when working on image buffers, so when a ##**Window**## is in effect, the cooridnate mapping will be different from image to image.


Revision [14075]

Edited on 2009-01-06 04:18:14 by CountingPine [Significant behavior differences between FB and QB]
Additions:
**Window** [ [**Screen**] ( //x1//, //y1// )-( //x2//, //y2// ) ]
##**Screen**##
New floating point values corresponding to the opposite corners of the current viewport. If omitted, the ##**Window**## coordinate mapping is removed.
##**Window**## is used to define a new coordinates system. ##(//x1//, //y1//)## and ##(//x2//, //y2//)## are the new coordinates to be mapped to the opposite corners of the current viewport; all future coordinates passed to graphics primitive statements will be affected by this new mapping. If ##**Screen**## is omitted, the new coordinates system will be Cartesian, that is, with y coordinates increasing from bottom to top. Call ##**Window**## with no argument to disable the coordinates transformation.
""FreeBASIC's"" current behavior is to keep track of the corners of the ##**Window**##, rather than a specific coordinate mapping. This means that the coordinate mapping can change after calls to ##[[KeyPgViewgraphics View]]##.
The ##**Window**## corners are also currently taken into account when working on image buffers, so when a ##**Window**## is in effect, the cooridnate mapping will be different from image to image.
When there is no ##**Window**## in effect, there is no coordinate mapping in effect, so the effective coordinate system is constant, independent of image buffer sizes or ##[[KeyPgViewgraphics View]]## coordinates (if any).
- QBASIC preserves the coordinate mapping after subsequent calls to VIEW.
- ""FreeBASIC's"" current behavior is to preserve the WINDOW coordinates after calls to VIEW, or when working on images, meaning that the coordinate mapping may undergo scaling/translations. (If a WINDOW hasn't been set, there is no coordinate mapping, and so it doesn't change after calls to VIEW.) The behavior may change in future, but consistent behavior can be be assured over inconstent viewport coordinates by re-calling WINDOW when you change the VIEW.
Deletions:
**Window** [ [SCREEN] ( //x1//, //y1// )-( //x2//, //y2// ) ]
##SCREEN##
New floating point values corresponding to the opposite corners of the current viewport.
##**Window**## is used to define a new coordinates system. ##(//x1//,//y1//)## and ##(//x2//,//y2//)## are the new coordinates to be mapped to the opposite corners of the current viewport; all future coordinates passed to graphics primitive statements will be affected by this new mapping. If ##SCREEN## is omitted, the new coordinates system will be Cartesian, that is, with y coordinates increasing from bottom to top. Call ##**Window**## with no argument to disable the coordinates transformation.
- None


Revision [13512]

The oldest known version of this page was created on 2008-07-15 21:23:03 by CountingPine [Significant behavior differences between FB and QB]
Valid XHTML :: Valid CSS: :: Powered by WikkaWiki



sf.net phatcode