class MASKING_DLL_DECLSPEC PageFlipping

The Page Flipping screen update driver.

Inheritance:

PageFlipping - ScreenUpdate


Public Methods

[more]Error Create()
Creates two video pages and shows one on screen while the other is available for drawing
[more]void Destroy()
Destroys the video pages
[more]void Redraw()
Shows the active page on screen and flips the pages
[more]BITMAP* GetCanvas()
Returns a pointer to the currently active page which is the page that is available for drawing
[more]void AcquireCanvas()
Acquires the currently active page.
[more]void ReleaseCanvas()
Releases the currently active page.
[more]bool RequiresFullRedraw()
Page flipping requires full redraw so this function returns true

Protected Fields

[more]BITMAP* page1
Video page 1
[more]BITMAP* page2
Video page 2
[more]BITMAP* activePage
Currently active page.


Documentation

The Page Flipping screen update driver. It imlpements double buffering by creating two video pages. It exposes one page to the user so he can draw to it while the other page is shown on the screen. When drawing a frame is finished the pages are flipped - the one the user was drawing on gets shown on screen and the other one becomes available for drawing. Page flipping is very fast but not all systems support it.
oBITMAP* page1
Video page 1

oBITMAP* page2
Video page 2

oBITMAP* activePage
Currently active page. Page1 and page2 are the two video pages used for page flipping and activePage is a pointer which at any given time points either to page1 or page2. The active page is available for drawing and is exposed to the user through GetCanvas() while the other page is being displayed on the screen.

oError Create()
Creates two video pages and shows one on screen while the other is available for drawing

ovoid Destroy()
Destroys the video pages

ovoid Redraw()
Shows the active page on screen and flips the pages

oBITMAP* GetCanvas()
Returns a pointer to the currently active page which is the page that is available for drawing

ovoid AcquireCanvas()
Acquires the currently active page. This is important because the pages are video bitmaps which need to be acquired prior to drawing on them on some platforms to ensure optimal performance.

ovoid ReleaseCanvas()
Releases the currently active page. This is important because the pages are video bitmaps which need to be acquired prior to drawing on them on some platforms to ensure optimal performance.

obool RequiresFullRedraw()
Page flipping requires full redraw so this function returns true


Direct child classes:
TripleBuffer

Alphabetic index Hierarchy of classes


Back to front page   |   page generated with DOC++