Richard Boegli's CnC_Generals_Zero_Hour Fork WIP
This is documentation of Richard Boegil's Zero Hour Fork
 
Loading...
Searching...
No Matches
Surface Class Referenceabstract

#include <Surface.h>

Inherited by XSurface.

Public Member Functions

 Surface (int width, int height)
 
virtual ~Surface (void)
 
virtual bool Blit_From (Rect const &dcliprect, Rect const &destrect, Surface const &source, Rect const &scliprect, Rect const &sourcerect, bool trans=false)=0
 
virtual bool Blit_From (Rect const &destrect, Surface const &source, Rect const &sourcerect, bool trans=false)=0
 
virtual bool Blit_From (Surface const &source, bool trans=false)=0
 
virtual bool Fill_Rect (Rect const &rect, int color)=0
 
virtual bool Fill_Rect (Rect const &cliprect, Rect const &fillrect, int color)=0
 
virtual bool Fill (int color)=0
 
virtual bool Put_Pixel (Point2D const &point, int color)=0
 
virtual int Get_Pixel (Point2D const &point) const =0
 
virtual bool Draw_Line (Point2D const &startpoint, Point2D const &endpoint, int color)=0
 
virtual bool Draw_Line (Rect const &cliprect, Point2D const &startpoint, Point2D const &endpoint, int color)=0
 
virtual bool Draw_Rect (Rect const &rect, int color)=0
 
virtual bool Draw_Rect (Rect const &cliprect, Rect const &rect, int color)=0
 
virtual void * Lock (Point2D point=Point2D(0, 0)) const =0
 
virtual bool Unlock (void) const =0
 
virtual bool Is_Locked (void) const =0
 
virtual int Bytes_Per_Pixel (void) const =0
 
virtual int Stride (void) const =0
 
virtual Rect Get_Rect (void) const
 
virtual int Get_Width (void) const
 
virtual int Get_Height (void) const
 
virtual bool Is_Direct_Draw (void) const
 

Protected Attributes

int Width
 
int Height
 

Detailed Description

Definition at line 52 of file Surface.h.

Constructor & Destructor Documentation

◆ Surface()

Surface::Surface ( int width,
int height )
inline

Definition at line 55 of file Surface.h.

◆ ~Surface()

virtual Surface::~Surface ( void )
inlinevirtual

Definition at line 56 of file Surface.h.

Member Function Documentation

◆ Blit_From() [1/3]

virtual bool Surface::Blit_From ( Rect const & dcliprect,
Rect const & destrect,
Surface const & source,
Rect const & scliprect,
Rect const & sourcerect,
bool trans = false )
pure virtual

Implemented in DSurface, and XSurface.

◆ Blit_From() [2/3]

virtual bool Surface::Blit_From ( Rect const & destrect,
Surface const & source,
Rect const & sourcerect,
bool trans = false )
pure virtual

Implemented in DSurface, and XSurface.

◆ Blit_From() [3/3]

virtual bool Surface::Blit_From ( Surface const & source,
bool trans = false )
pure virtual

Implemented in DSurface, and XSurface.

◆ Bytes_Per_Pixel()

virtual int Surface::Bytes_Per_Pixel ( void ) const
pure virtual

Implemented in BSurface, DSurface, and XSurface.

◆ Draw_Line() [1/2]

virtual bool Surface::Draw_Line ( Point2D const & startpoint,
Point2D const & endpoint,
int color )
pure virtual

Implemented in XSurface.

◆ Draw_Line() [2/2]

virtual bool Surface::Draw_Line ( Rect const & cliprect,
Point2D const & startpoint,
Point2D const & endpoint,
int color )
pure virtual

Implemented in XSurface.

◆ Draw_Rect() [1/2]

virtual bool Surface::Draw_Rect ( Rect const & cliprect,
Rect const & rect,
int color )
pure virtual

Implemented in XSurface.

◆ Draw_Rect() [2/2]

virtual bool Surface::Draw_Rect ( Rect const & rect,
int color )
pure virtual

Implemented in XSurface.

◆ Fill()

virtual bool Surface::Fill ( int color)
pure virtual

Implemented in XSurface.

◆ Fill_Rect() [1/2]

virtual bool Surface::Fill_Rect ( Rect const & cliprect,
Rect const & fillrect,
int color )
pure virtual

Implemented in DSurface, and XSurface.

◆ Fill_Rect() [2/2]

virtual bool Surface::Fill_Rect ( Rect const & rect,
int color )
pure virtual

Implemented in DSurface, and XSurface.

◆ Get_Height()

virtual int Surface::Get_Height ( void ) const
inlinevirtual

Definition at line 104 of file Surface.h.

◆ Get_Pixel()

virtual int Surface::Get_Pixel ( Point2D const & point) const
pure virtual

Implemented in XSurface.

◆ Get_Rect()

virtual Rect Surface::Get_Rect ( void ) const
inlinevirtual

Definition at line 102 of file Surface.h.

◆ Get_Width()

virtual int Surface::Get_Width ( void ) const
inlinevirtual

Definition at line 103 of file Surface.h.

◆ Is_Direct_Draw()

virtual bool Surface::Is_Direct_Draw ( void ) const
inlinevirtual

Reimplemented in DSurface, and XSurface.

Definition at line 111 of file Surface.h.

◆ Is_Locked()

virtual bool Surface::Is_Locked ( void ) const
pure virtual

Implemented in XSurface.

◆ Lock()

virtual void * Surface::Lock ( Point2D point = Point2D(0, 0)) const
pure virtual

Implemented in BSurface, DSurface, and XSurface.

◆ Put_Pixel()

virtual bool Surface::Put_Pixel ( Point2D const & point,
int color )
pure virtual

Implemented in XSurface.

◆ Stride()

virtual int Surface::Stride ( void ) const
pure virtual

Implemented in BSurface, DSurface, and XSurface.

◆ Unlock()

virtual bool Surface::Unlock ( void ) const
pure virtual

Implemented in DSurface, and XSurface.

Member Data Documentation

◆ Height

int Surface::Height
protected

Definition at line 119 of file Surface.h.

◆ Width

int Surface::Width
protected

Definition at line 118 of file Surface.h.


The documentation for this class was generated from the following file: