Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Flipper 6.0 Help File - <b>view_open()</b> c_exam02 http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
VIEW_OPEN()                                                         C_EXAM02
   Opens a new viewport and returns the viewport's handle.

   Syntax
         nViewHandle = VIEW_OPEN(nX1,nY1,nX2,nY2,nBg,nSave)

   Arguments
         nX1, nY1    Sets the upper left position.
         nX2, nY2    Sets the lower right position.
         nBg         Sets the background color.
         nSave       Saves underlying image. (0 - not saved, 1 - saved)

   Returns
         nViewHhandle Returns the view number.
         VIEW_WIDE()  Returns the width in pixels of the current viewport.
         VIEW_HIGH()  Returns the height in pixels of the current viewport.
         VIEW_XMIN()  Returns the left absolute pixel position of the current
                      viewport.
         VIEW_YMIN()  Returns the top absolute pixel position of the current
                      viewport.

   Description
         VIEW_OPEN() opens a new viewport and returns the viewport's handle.
         The newly opened viewport becomes the current viewport. All video
         output is directed to this viewport until VIEW_SWAP() is used to
         switch to another viewport, or OPEN_VIEW() is used again.

         The points (nX1,nY1) and (nX2,nY2) specify the viewport's area. The
         viewports are adjusted so they are byte aligned. The background is
         the viewport's color.

         A non-zero value for nSave will save the screen data below the new
         viewport, so it can be restored when the viewport is moved, hidden
         or closed. If nSave has a value of 0, then the underlying image
         is not saved, and when the viewport disappears, it is replaced by a
         patch of color the same as the background color.

         Because the underlying screen data is saved in memory, your program
         can quickly use large chunks of memory. It you need to save
         underlying images, using VW_FLOPEN() (creating a view file) is
         recommended.

See Also: IN_VIEW() VIEW_CLOSE() VIEW_CURR() VIEW_SWAP()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson