SoftRenderSurface< uintX > Class Template Reference

#include <SoftRenderSurface.h>

Inheritance diagram for SoftRenderSurface< uintX >:

BaseSoftRenderSurface RenderSurface List of all members.

Public Member Functions

 SoftRenderSurface (SDL_Surface *)
 SoftRenderSurface (int w, int h, uint8 *buf)
 SoftRenderSurface (int w, int h)
virtual void Fill8 (uint8 index, sint32 sx, sint32 sy, sint32 w, sint32 h)
virtual void Fill32 (uint32 rgb, sint32 sx, sint32 sy, sint32 w, sint32 h)
virtual void FillAlpha (uint8 alpha, sint32 sx, sint32 sy, sint32 w, sint32 h)
virtual void Paint (Shape *s, uint32 frame, sint32 x, sint32 y, bool untformed_pal=false)
virtual void PaintNoClip (Shape *s, uint32 frame, sint32 x, sint32 y, bool untformed_pal=false)
virtual void PaintTranslucent (Shape *s, uint32 frame, sint32 x, sint32 y, bool untformed_pal=false)
virtual void PaintMirrored (Shape *s, uint32 frame, sint32 x, sint32 y, bool trans=false, bool untformed_pal=false)
virtual void PaintInvisible (Shape *s, uint32 frame, sint32 x, sint32 y, bool trans, bool mirrored, bool untformed_pal=false)
virtual void PaintHighlight (Shape *s, uint32 frame, sint32 x, sint32 y, bool trans, bool mirrored, uint32 col32, bool untformed_pal=false)
virtual void PaintHighlightInvis (Shape *s, uint32 frame, sint32 x, sint32 y, bool trans, bool mirrored, uint32 col32, bool untformed_pal=false)
virtual void PaintMasked (Shape *s, uint32 framenum, sint32 x, sint32 y, bool trans, bool mirrored, uint32 col32=0, bool untformed_pal=false)
virtual void DrawLine32 (uint32 rgb, sint32 sx, sint32 sy, sint32 ex, sint32 ey)
virtual void PrintTextFixed (FixedWidthFont *, const char *text, int x, int y)
virtual void PrintCharFixed (FixedWidthFont *, int character, int x, int y)
virtual void Blit (Texture *, sint32 sx, sint32 sy, sint32 w, sint32 h, sint32 dx, sint32 dy, bool alpha_blend=false)
virtual void FadedBlit (Texture *, sint32 sx, sint32 sy, sint32 w, sint32 h, sint32 dx, sint32 dy, uint32 col32, bool alpha_blend=false)
virtual void MaskedBlit (Texture *, sint32 sx, sint32 sy, sint32 w, sint32 h, sint32 dx, sint32 dy, uint32 col32, bool alpha_blend=false)
virtual void StretchBlit (Texture *, sint32 sx, sint32 sy, sint32 sw, sint32 sh, sint32 dx, sint32 dy, sint32 dw, sint32 dh, bool bilinear=false, bool clampedges=false)
virtual bool ScalerBlit (Texture *, sint32 sx, sint32 sy, sint32 sw, sint32 sh, sint32 dx, sint32 dy, sint32 dw, sint32 dh, const Pentagram::Scaler *, bool clampedges=false)
template<>
void Fill32 (uint32 rgb, sint32 sx, sint32 sy, sint32 w, sint32 h)
template<>
void Fill32 (uint32 rgb, sint32 sx, sint32 sy, sint32 w, sint32 h)

Protected Member Functions

 SoftRenderSurface (int w, int h, int bpp, int rsft, int gsft, int bsft, int asft)

Detailed Description

template<class uintX>
class SoftRenderSurface< uintX >

Definition at line 31 of file SoftRenderSurface.h.


Constructor & Destructor Documentation

template<class uintX>
SoftRenderSurface< uintX >::SoftRenderSurface ( int  w,
int  h,
int  bpp,
int  rsft,
int  gsft,
int  bsft,
int  asft 
) [protected]

Definition at line 59 of file SoftRenderSurface.cpp.

template<class uintX>
SoftRenderSurface< uintX >::SoftRenderSurface ( SDL_Surface *   ) 

Definition at line 48 of file SoftRenderSurface.cpp.

template<class uintX>
SoftRenderSurface< uintX >::SoftRenderSurface ( int  w,
int  h,
uint8 buf 
)

Definition at line 70 of file SoftRenderSurface.cpp.

template<class uintX>
SoftRenderSurface< uintX >::SoftRenderSurface ( int  w,
int  h 
)

Definition at line 81 of file SoftRenderSurface.cpp.


Member Function Documentation

template<class uintX>
void SoftRenderSurface< uintX >::Blit ( Texture ,
sint32  sx,
sint32  sy,
sint32  w,
sint32  h,
sint32  dx,
sint32  dy,
bool  alpha_blend = false 
) [virtual]

Blit a region from a Texture (Alpha == 0 -> skipped).

Implements RenderSurface.

Definition at line 311 of file SoftRenderSurface.cpp.

References BlendPreModFast(), Texture::buffer, BaseSoftRenderSurface::clip_window, Texture::format, Texture::height, Pentagram::Rect::IntersectOther(), line_end, BaseSoftRenderSurface::pitch, BaseSoftRenderSurface::pixels, TEX_FMT_NATIVE, TEX_FMT_STANDARD, and Texture::width.

Referenced by SoftRenderSurface< uintX >::PrintCharFixed(), SoftRenderSurface< uintX >::PrintTextFixed(), SoftRenderSurface< uintX >::ScalerBlit(), and SoftRenderSurface< uintX >::StretchBlit().

template<class uintX>
void SoftRenderSurface< uintX >::DrawLine32 ( uint32  rgb,
sint32  sx,
sint32  sy,
sint32  ex,
sint32  ey 
) [virtual]

Implements RenderSurface.

Definition at line 253 of file SoftRenderSurface.cpp.

References SoftRenderSurface< uintX >::Fill32(), x, and y.

template<class uintX>
void SoftRenderSurface< uintX >::FadedBlit ( Texture ,
sint32  sx,
sint32  sy,
sint32  w,
sint32  h,
sint32  dx,
sint32  dy,
uint32  col32,
bool  alpha_blend = false 
) [virtual]

Blit a region from a Texture with a Colour blend (AlphaTex == 0 -> skipped. AlphaCol32 -> Blend Factors).

Implements RenderSurface.

Definition at line 476 of file SoftRenderSurface.cpp.

References BlendHighlight(), Texture::buffer, BaseSoftRenderSurface::clip_window, Texture::format, Texture::height, Pentagram::Rect::IntersectOther(), line_end, BaseSoftRenderSurface::pitch, BaseSoftRenderSurface::pixels, TEX_FMT_NATIVE, TEX_FMT_STANDARD, and Texture::width.

template<>
void SoftRenderSurface< uint32 >::Fill32 ( uint32  rgb,
sint32  sx,
sint32  sy,
sint32  w,
sint32  h 
) [virtual]

Fill buffer (using a RGB colour).

Implements RenderSurface.

Definition at line 162 of file SoftRenderSurface.cpp.

References BaseSoftRenderSurface::clip_window, Pentagram::Rect::IntersectOther(), Pentagram::memset_32(), BaseSoftRenderSurface::pitch, and BaseSoftRenderSurface::pixels.

template<>
void SoftRenderSurface< uint16 >::Fill32 ( uint32  rgb,
sint32  sx,
sint32  sy,
sint32  w,
sint32  h 
) [virtual]

Fill buffer (using a RGB colour).

Implements RenderSurface.

Definition at line 137 of file SoftRenderSurface.cpp.

References BaseSoftRenderSurface::clip_window, Pentagram::Rect::IntersectOther(), Pentagram::memset_16(), BaseSoftRenderSurface::pitch, and BaseSoftRenderSurface::pixels.

template<class uintX>
void SoftRenderSurface< uintX >::Fill32 ( uint32  rgb,
sint32  sx,
sint32  sy,
sint32  w,
sint32  h 
) [virtual]

Fill buffer (using a RGB colour).

Implements RenderSurface.

Definition at line 103 of file SoftRenderSurface.cpp.

References BaseSoftRenderSurface::clip_window, Pentagram::Rect::IntersectOther(), line_end, BaseSoftRenderSurface::pitch, and BaseSoftRenderSurface::pixels.

Referenced by GUIApp::CreateHWCursors(), and SoftRenderSurface< uintX >::DrawLine32().

template<class uintX>
void SoftRenderSurface< uintX >::Fill8 ( uint8  index,
sint32  sx,
sint32  sy,
sint32  w,
sint32  h 
) [virtual]

Fill buffer (using a palette index).

Implements RenderSurface.

Definition at line 92 of file SoftRenderSurface.cpp.

template<class uintX>
void SoftRenderSurface< uintX >::FillAlpha ( uint8  alpha,
sint32  sx,
sint32  sy,
sint32  w,
sint32  h 
) [virtual]

Fill alpha channel.

Implements RenderSurface.

Definition at line 195 of file SoftRenderSurface.cpp.

References BaseSoftRenderSurface::clip_window, RenderSurface::format, Pentagram::Rect::IntersectOther(), line_end, BaseSoftRenderSurface::pitch, and BaseSoftRenderSurface::pixels.

template<class uintX>
void SoftRenderSurface< uintX >::MaskedBlit ( Texture ,
sint32  sx,
sint32  sy,
sint32  w,
sint32  h,
sint32  dx,
sint32  dy,
uint32  col32,
bool  alpha_blend = false 
) [virtual]

Blit a region from a Texture with a Colour blend masked based on DestAlpha (AlphaTex == 0 || AlphaDest == 0 -> skipped. AlphaCol32 -> Blend Factors).

Implements RenderSurface.

Definition at line 598 of file SoftRenderSurface.cpp.

References BlendHighlight(), Texture::buffer, BaseSoftRenderSurface::clip_window, RenderSurface::format, Texture::format, Texture::height, Pentagram::Rect::IntersectOther(), line_end, BaseSoftRenderSurface::pitch, BaseSoftRenderSurface::pixels, TEX_FMT_NATIVE, TEX_FMT_STANDARD, and Texture::width.

template<class uintX>
void SoftRenderSurface< uintX >::Paint ( Shape s,
uint32  frame,
sint32  x,
sint32  y,
bool  untformed_pal = false 
) [virtual]

Paint a Shape.

Implements RenderSurface.

Definition at line 849 of file SoftRenderSurface.cpp.

Referenced by GUIApp::CreateHWCursors().

template<class uintX>
void SoftRenderSurface< uintX >::PaintHighlight ( Shape s,
uint32  frame,
sint32  x,
sint32  y,
bool  trans,
bool  mirrored,
uint32  col32,
bool  untformed_pal = false 
) [virtual]

Paint a Highlighted Shape of using the 32 Bit Colour col32 (0xAARRGGBB Alpha is blend level).

Implements RenderSurface.

Definition at line 930 of file SoftRenderSurface.cpp.

template<class uintX>
void SoftRenderSurface< uintX >::PaintHighlightInvis ( Shape s,
uint32  frame,
sint32  x,
sint32  y,
bool  trans,
bool  mirrored,
uint32  col32,
bool  untformed_pal = false 
) [virtual]

Paint a Invisible Highlighted Shape of using the 32 Bit Colour col32 (0xAARRGGBB Alpha is blend level).

Implements RenderSurface.

Definition at line 958 of file SoftRenderSurface.cpp.

template<class uintX>
void SoftRenderSurface< uintX >::PaintInvisible ( Shape s,
uint32  frame,
sint32  x,
sint32  y,
bool  trans,
bool  mirrored,
bool  untformed_pal = false 
) [virtual]

Paint an Invisible Shape.

Implements RenderSurface.

Definition at line 906 of file SoftRenderSurface.cpp.

template<class uintX>
void SoftRenderSurface< uintX >::PaintMasked ( Shape s,
uint32  framenum,
sint32  x,
sint32  y,
bool  trans,
bool  mirrored,
uint32  col32 = 0,
bool  untformed_pal = false 
) [virtual]

Paint a shape masked against destination alpha.

Implements RenderSurface.

Definition at line 986 of file SoftRenderSurface.cpp.

template<class uintX>
void SoftRenderSurface< uintX >::PaintMirrored ( Shape s,
uint32  frame,
sint32  x,
sint32  y,
bool  trans = false,
bool  untformed_pal = false 
) [virtual]

Paint a Mirrored Shape.

Implements RenderSurface.

Definition at line 886 of file SoftRenderSurface.cpp.

template<class uintX>
void SoftRenderSurface< uintX >::PaintNoClip ( Shape s,
uint32  frame,
sint32  x,
sint32  y,
bool  untformed_pal = false 
) [virtual]

Paint a Shape without clipping.

Implements RenderSurface.

Definition at line 860 of file SoftRenderSurface.cpp.

template<class uintX>
void SoftRenderSurface< uintX >::PaintTranslucent ( Shape s,
uint32  frame,
sint32  x,
sint32  y,
bool  untformed_pal = false 
) [virtual]

Paint a Translucent Shape.

Implements RenderSurface.

Definition at line 873 of file SoftRenderSurface.cpp.

template<class uintX>
void SoftRenderSurface< uintX >::PrintCharFixed ( FixedWidthFont ,
int  character,
int  x,
int  y 
) [virtual]

Draw a fixed width character from a FixedWidthFont.

Implements RenderSurface.

Definition at line 784 of file SoftRenderSurface.cpp.

References SoftRenderSurface< uintX >::Blit(), and font.

template<class uintX>
void SoftRenderSurface< uintX >::PrintTextFixed ( FixedWidthFont ,
const char *  text,
int  x,
int  y 
) [virtual]

Draw FixedWidthFont.

Implements RenderSurface.

Definition at line 814 of file SoftRenderSurface.cpp.

References SoftRenderSurface< uintX >::Blit(), and font.

template<class uintX>
bool SoftRenderSurface< uintX >::ScalerBlit ( Texture ,
sint32  sx,
sint32  sy,
sint32  sw,
sint32  sh,
sint32  dx,
sint32  dy,
sint32  dw,
sint32  dh,
const Pentagram::Scaler ,
bool  clampedges = false 
) [virtual]

Blit a region from a Texture using a scaler.

Implements RenderSurface.

Definition at line 762 of file SoftRenderSurface.cpp.

References SoftRenderSurface< uintX >::Blit(), BaseSoftRenderSurface::pitch, BaseSoftRenderSurface::pixels, and Pentagram::Scaler::Scale().

template<class uintX>
void SoftRenderSurface< uintX >::StretchBlit ( Texture ,
sint32  sx,
sint32  sy,
sint32  sw,
sint32  sh,
sint32  dx,
sint32  dy,
sint32  dw,
sint32  dh,
bool  bilinear = false,
bool  clampedges = false 
) [virtual]

Blit a stretched region from a Texture (Alpha == 0 -> skipped???).

Implements RenderSurface.

Definition at line 729 of file SoftRenderSurface.cpp.

References Pentagram::bilinear_scaler, SoftRenderSurface< uintX >::Blit(), BaseSoftRenderSurface::pitch, BaseSoftRenderSurface::pixels, and Pentagram::point_scaler.


The documentation for this class was generated from the following files:
Generated on Fri Jul 27 22:29:57 2007 for pentagram by  doxygen 1.4.7