class MASKING_DLL_DECLSPEC ScreenUpdate

The base of the screen update driver system.

Inheritance:

ScreenUpdate


Public Methods

[more]virtual Error Create()
Creates the canvas on which the user can draw.
[more]virtual void Destroy()
Destroy the canvas bitmap
[more]virtual void Redraw()
Shows the canvas on the screen.
[more]virtual BITMAP* GetCanvas()
Returns a pointer to the canvas BITMAP on which the user can draw
[more]virtual void AcquireCanvas()
Acquires the drawing canvas.
[more]virtual void ReleaseCanvas()
Releases the drawing canvas.
[more]virtual char* GetDescription()
Returns a string containing a short description of the driver
[more]virtual bool RequiresFullRedraw()
Returns true if the driver requires the entire screen to be redrawn every frame.
[more]virtual void InvalidateRect(const Rect &r)
Marks a rectangle dirty and schedules it for rerawing.
[more]virtual void InvalidateRect(int x, int y, int w, int h)
Like InvalidateRect(const Rect &r) except that it accepts individual coordinates

Protected Fields

[more]BITMAP* canvas
The canvas bitmap the user can draw to


Documentation

The base of the screen update driver system. This is the base class for the screen update driver system. All screen update drivers should inherit from this class and implement the relevant virtual functions. Although this isn't an abstract class with pure virtual functions it shouldn't really be used in most cases as it implements no special screen update functionality - it just exposes the global Allegro screen bitmap which means drawing with this driver will produce a lot of flicker.
oBITMAP* canvas
The canvas bitmap the user can draw to

ovirtual Error Create()
Creates the canvas on which the user can draw. This driver just makes a subbitmap of the global Allegro screen BITMAP. Should return an error code.

ovirtual void Destroy()
Destroy the canvas bitmap

ovirtual void Redraw()
Shows the canvas on the screen. In this driver this function is empty because the canvas IS the screen.

ovirtual BITMAP* GetCanvas()
Returns a pointer to the canvas BITMAP on which the user can draw

ovirtual void AcquireCanvas()
Acquires the drawing canvas. This is necessary on some platforms to get optimal performance.

ovirtual void ReleaseCanvas()
Releases the drawing canvas. This is necessary on some platforms to get optimal performance.

ovirtual char* GetDescription()
Returns a string containing a short description of the driver

ovirtual bool RequiresFullRedraw()
Returns true if the driver requires the entire screen to be redrawn every frame. All regular double buffering schemes do, but this driver of course doesn't.

ovirtual void InvalidateRect(const Rect &r)
Marks a rectangle dirty and schedules it for rerawing. All drivers except for the Dirty Rectangle System (DRS) driver ignore this.

ovirtual void InvalidateRect(int x, int y, int w, int h)
Like InvalidateRect(const Rect &r) except that it accepts individual coordinates


Direct child classes:
PageFlipping
GLDriver
DoubleBuffer

Alphabetic index Hierarchy of classes


Back to front page   |   page generated with DOC++