Main Page   Namespace List   Class Hierarchy   Compound List   File List   Compound Members   File Members  

CL_Target Class Reference

#include <target.h>

Inheritance diagram for CL_Target:

Inheritance graph
[legend]
Collaboration diagram for CL_Target:

Collaboration graph
[legend]
List of all members.

Public Methods

 CL_Target ()
virtual ~CL_Target ()
virtual bool is_video () const
virtual void lock ()=0
 retval: True if stored in video memory, false otherwise.

virtual void unlock ()=0
virtual void* get_data () const=0
virtual unsigned int get_num_frames () const=0
 retval: A pointer that points to the beginning of the target pixel data.

virtual unsigned int get_width () const=0
virtual unsigned int get_height () const=0
virtual unsigned int get_pitch () const=0
virtual unsigned int get_depth () const
virtual unsigned int get_bytes_per_pixel () const
virtual bool is_indexed () const=0
virtual unsigned int get_red_mask () const=0
virtual unsigned int get_green_mask () const=0
virtual unsigned int get_blue_mask () const=0
virtual unsigned int get_alpha_mask () const=0
virtual CL_Paletteget_palette () const=0
virtual void push_clip_rect ()
virtual void push_clip_rect (const CL_ClipRect &rect)
virtual CL_ClipRect get_clip_rect ()
 param: rect - The new clipping rectangle to be clipped with the current cliprect and then used.

virtual void set_clip_rect (const CL_ClipRect &rect)
 retval: The current clipping rectangle.

virtual void pop_clip_rect ()
virtual void push_translate_offset ()
virtual void push_translate_offset (int x, int y)
virtual int get_translate_offset_x () const
virtual int get_translate_offset_y () const
virtual void set_translate_offset (int x, int y)
virtual void pop_translate_offset ()
void draw_pixel (int x1, int y1, int color)
virtual void draw_pixel (int x, int y, float r, float g, float b, float a=1.0)
virtual void get_pixel (int x, int y, float *r, float *g, float *b, float *a)
virtual int get_pixel (int x, int y)
void flip_vertical ()
void flip_horizontal ()
virtual void fill_rect (int x1, int y1, int x2, int y2, float r, float g, float b, float a=1.0)
virtual void draw_rect (int x1, int y1, int x2, int y2, float r, float g, float b, float a=1.0)
 param: x1 - Leftmost x-coordinate.param: y1 - Upper y-coordinate.param: x2 - Rightmost x-coordinate.param: y2 - Lower y-coordinate.param: r - Red component of the filled color.param: g - Green component of the filled color.param: b - Blue component of the filled color.param: a - Alpha component of the filled color.

virtual void draw_line (int x1, int y1, int x2, int y2, float r, float g, float b, float a=1.0)
 param: x1 - Leftmost x-coordinate.param: y1 - Upper y-coordinate.param: x2 - Rightmost x-coordinate.param: y2 - Lower y-coordinate.param: r - Red component of the filled color.param: g - Green component of the filled color.param: b - Blue component of the filled color.param: a - Alpha component of the filled color.


Private Types

typedef std::pair<int,int> TranslationOffset

Private Attributes

std::stack<CL_ClipRectclip_stack
 param: x1 - Leftmost x-coordinate. //FIXMEparam: y1 - Upper y-coordinate.param: x2 - Rightmost x-coordinate.param: y2 - Lower y-coordinate.param: r - Red component of the filled color.param: g - Green component of the filled color.param: b - Blue component of the filled color.param: a - Alpha component of the filled color.

std::stack<TranslationOffsetm_translation_stack

Member Typedef Documentation

typedef std::pair<int,int> CL_Target::TranslationOffset [private]
 

Definition at line 228 of file target.h.

Referenced by CL_Target().


Constructor & Destructor Documentation

CL_Target::CL_Target ( ) [inline]
 

Definition at line 55 of file target.h.

CL_Target::~CL_Target ( ) [inline, virtual]
 

Definition at line 56 of file target.h.


Member Function Documentation

void CL_Target::draw_line ( int x1,
int y1,
int x2,
int y2,
float r,
float g,
float b,
float a = 1.0 ) [virtual]
 

param: x1 - Leftmost x-coordinate.param: y1 - Upper y-coordinate.param: x2 - Rightmost x-coordinate.param: y2 - Lower y-coordinate.param: r - Red component of the filled color.param: g - Green component of the filled color.param: b - Blue component of the filled color.param: a - Alpha component of the filled color.

Referenced by toluaI_CL_Target_draw_line0().

void CL_Target::draw_pixel ( int x,
int y,
float r,
float g,
float b,
float a = 1.0 ) [inline, virtual]
 

Definition at line 179 of file target.h.

void CL_Target::draw_pixel ( int x1,
int y1,
int color )
 

Referenced by draw_pixel().

void CL_Target::draw_rect ( int x1,
int y1,
int x2,
int y2,
float r,
float g,
float b,
float a = 1.0 ) [virtual]
 

param: x1 - Leftmost x-coordinate.param: y1 - Upper y-coordinate.param: x2 - Rightmost x-coordinate.param: y2 - Lower y-coordinate.param: r - Red component of the filled color.param: g - Green component of the filled color.param: b - Blue component of the filled color.param: a - Alpha component of the filled color.

virtual void CL_Target::fill_rect ( int x1,
int y1,
int x2,
int y2,
float r,
float g,
float b,
float a = 1.0 ) [virtual]
 

Referenced by toluaI_CL_Target_fill_rect0().

void CL_Target::flip_horizontal ( )
 

void CL_Target::flip_vertical ( )
 

virtual unsigned int CL_Target::get_alpha_mask ( ) const [pure virtual]
 

Reimplemented in CL_Canvas, CL_BMPProvider, CL_PCXProvider, CL_TargaProvider, CL_SpriteProvider, CL_Sprite2Provider, CL_SpriteSubarrayProvider, CL_SpriteSubsectionProvider, CL_JPEGProvider, CL_PNGProvider, CL_Target_Be, CL_Target_DX, CL_MaskTranscolProvider, CL_SurfaceProvider_32bpp, and CL_Target_System.

Referenced by CL_ColorMap::CL_ColorMap(), CL_PixelData::CL_PixelData(), fast_memmove(), get_depth(), and toluaI_CL_Target_get_alpha_mask0().

virtual unsigned int CL_Target::get_blue_mask ( ) const [pure virtual]
 

Reimplemented in CL_Canvas, CL_BMPProvider, CL_PCXProvider, CL_TargaProvider, CL_SpriteProvider, CL_Sprite2Provider, CL_SpriteSubarrayProvider, CL_SpriteSubsectionProvider, CL_JPEGProvider, CL_PNGProvider, CL_Target_Be, CL_Target_DX, CL_MaskTranscolProvider, CL_SurfaceProvider_32bpp, and CL_Target_System.

Referenced by CL_ColorMap::CL_ColorMap(), CL_PixelData::CL_PixelData(), CLVideoDrv::GetBlueMask(), fast_memmove(), get_depth(), PixelConstructor_AlphaMask::save_pixel(), and toluaI_CL_Target_get_blue_mask0().

unsigned int CL_Target::get_bytes_per_pixel ( ) const [inline, virtual]
 

Definition at line 106 of file target.h.

Referenced by CL_Canvas::CL_Canvas(), CLVideoDrv::GetBytesPerPixel(), cl_fill_rect_opaque(), and toluaI_CL_Target_get_bytes_per_pixel0().

CL_ClipRect CL_Target::get_clip_rect ( ) [virtual]
 

param: rect - The new clipping rectangle to be clipped with the current cliprect and then used.

Referenced by cl_fill_rect_opaque(), and toluaI_CL_Target_get_clip_rect0().

virtual void* CL_Target::get_data ( ) const [pure virtual]
 

Reimplemented in CL_Canvas, CL_BMPProvider, CL_DynamicProvider, CL_PCXProvider, CL_TargaProvider, CL_SpriteProvider, CL_Sprite2Provider, CL_SpriteSubarrayProvider, CL_SpriteSubsectionProvider, CL_JPEGProvider, CL_PNGProvider, CL_Target_Be, CL_DisplayCard_DirectDraw::CL_FrontbufferTarget_DX, CL_Target_DX, CL_MaskTranscolProvider, CL_SurfaceProvider_32bpp, and CL_Target_System.

Referenced by CL_SurfaceProvider_32bpp::CL_SurfaceProvider_32bpp(), CLVideoDrv::GetPixels(), cl_fill_rect_opaque(), CL_PixelData::get_line_pixel_to_dest(), and toluaI_CL_Target_get_data0().

unsigned int CL_Target::get_depth ( ) const [inline, virtual]
 

Reimplemented in CL_BMPProvider, CL_PCXProvider, CL_TargaProvider, CL_SpriteProvider, CL_Sprite2Provider, CL_SpriteSubarrayProvider, CL_SpriteSubsectionProvider, CL_PNGProvider, CL_Target_Be, CL_Target_DX, CL_MaskTranscolProvider, CL_SurfaceProvider_32bpp, and CL_Target_System.

Definition at line 87 of file target.h.

Referenced by CLVideoDrv::BitsPerPixel(), CL_Canvas::CL_Canvas(), CL_PixelData::CL_PixelData(), CL_SurfaceProvider_32bpp::CL_SurfaceProvider_32bpp(), get_bytes_per_pixel(), CL_Target_DX::is_indexed(), and toluaI_CL_Target_get_depth0().

virtual unsigned int CL_Target::get_green_mask ( ) const [pure virtual]
 

Reimplemented in CL_Canvas, CL_BMPProvider, CL_PCXProvider, CL_TargaProvider, CL_SpriteProvider, CL_Sprite2Provider, CL_SpriteSubarrayProvider, CL_SpriteSubsectionProvider, CL_JPEGProvider, CL_PNGProvider, CL_Target_Be, CL_Target_DX, CL_MaskTranscolProvider, CL_SurfaceProvider_32bpp, and CL_Target_System.

Referenced by CL_ColorMap::CL_ColorMap(), CL_PixelData::CL_PixelData(), CLVideoDrv::GetGreenMask(), fast_memmove(), get_depth(), PixelConstructor_AlphaMask::save_pixel(), and toluaI_CL_Target_get_green_mask0().

virtual unsigned int CL_Target::get_height ( ) const [pure virtual]
 

Reimplemented in CL_Canvas, CL_BMPProvider, CL_DynamicProvider, CL_PCXProvider, CL_TargaProvider, CL_SpriteProvider, CL_Sprite2Provider, CL_SpriteSubarrayProvider, CL_SpriteSubsectionProvider, CL_JPEGProvider, CL_PNGProvider, CL_Target_Be, CL_DisplayCard_DirectDraw::CL_FrontbufferTarget_DX, CL_Target_DX, CL_MaskTranscolProvider, CL_SurfaceProvider_32bpp, and CL_Target_System.

Referenced by CL_SurfaceProvider_32bpp::CL_SurfaceProvider_32bpp(), CL_PixelData::dump_assert_info(), CL_Surface_Generic::ensure_surface_prepared(), fast_memmove(), CL_PixelData::get_height(), CL_PixelData::get_line_pixel_to_dest(), and toluaI_CL_Target_get_height0().

unsigned int CL_Target::get_num_frames ( ) const [pure virtual]
 

retval: A pointer that points to the beginning of the target pixel data.

Reimplemented in CL_Canvas, CL_BMPProvider, CL_PCXProvider, CL_TargaProvider, CL_SpriteProvider, CL_Sprite2Provider, CL_SpriteSubarrayProvider, CL_SpriteSubsectionProvider, CL_JPEGProvider, CL_PNGProvider, CL_Target_Be, CL_Target_DX, CL_MaskTranscolProvider, CL_SurfaceProvider_32bpp, and CL_Target_System.

Referenced by CL_SurfaceProvider_32bpp::CL_SurfaceProvider_32bpp(), CL_PixelData::dump_assert_info(), CL_Surface_Generic::ensure_surface_prepared(), fast_memmove(), CL_PixelData::get_line_pixel_to_dest(), and toluaI_CL_Target_get_num_frames0().

virtual CL_Palette* CL_Target::get_palette ( ) const [pure virtual]
 

Reimplemented in CL_Canvas, CL_BMPProvider, CL_DynamicProvider, CL_PCXProvider, CL_TargaProvider, CL_SpriteProvider, CL_Sprite2Provider, CL_SpriteSubarrayProvider, CL_SpriteSubsectionProvider, CL_JPEGProvider, CL_PNGProvider, CL_Target_Be, CL_Target_DX, CL_MaskTranscolProvider, CL_SurfaceProvider_32bpp, and CL_Target_System.

Referenced by CL_SurfaceProvider_32bpp::CL_SurfaceProvider_32bpp(), and toluaI_CL_Target_get_palette0().

virtual unsigned int CL_Target::get_pitch ( ) const [pure virtual]
 

Reimplemented in CL_Canvas, CL_BMPProvider, CL_PCXProvider, CL_TargaProvider, CL_SpriteProvider, CL_Sprite2Provider, CL_SpriteSubarrayProvider, CL_SpriteSubsectionProvider, CL_JPEGProvider, CL_PNGProvider, CL_Target_Be, CL_Target_DX, CL_MaskTranscolProvider, CL_SurfaceProvider_32bpp, and CL_Target_System.

Referenced by CL_SurfaceProvider_32bpp::CL_SurfaceProvider_32bpp(), CLVideoDrv::GetPitch(), cl_fill_rect_opaque(), CL_PixelData::dump_assert_info(), CL_PixelData::get_line_pixel_to_dest(), and toluaI_CL_Target_get_pitch0().

virtual int CL_Target::get_pixel ( int x,
int y ) [virtual]
 

virtual void CL_Target::get_pixel ( int x,
int y,
float * r,
float * g,
float * b,
float * a ) [virtual]
 

virtual unsigned int CL_Target::get_red_mask ( ) const [pure virtual]
 

Reimplemented in CL_Canvas, CL_BMPProvider, CL_PCXProvider, CL_TargaProvider, CL_SpriteProvider, CL_Sprite2Provider, CL_SpriteSubarrayProvider, CL_SpriteSubsectionProvider, CL_JPEGProvider, CL_PNGProvider, CL_Target_Be, CL_Target_DX, CL_MaskTranscolProvider, CL_SurfaceProvider_32bpp, and CL_Target_System.

Referenced by CL_ColorMap::CL_ColorMap(), CL_PixelData::CL_PixelData(), CLVideoDrv::GetRedMask(), fast_memmove(), get_depth(), PixelConstructor_AlphaMask::save_pixel(), and toluaI_CL_Target_get_red_mask0().

virtual int CL_Target::get_translate_offset_x ( ) const [virtual]
 

virtual int CL_Target::get_translate_offset_y ( ) const [virtual]
 

virtual unsigned int CL_Target::get_width ( ) const [pure virtual]
 

Reimplemented in CL_Canvas, CL_BMPProvider, CL_DynamicProvider, CL_PCXProvider, CL_TargaProvider, CL_SpriteProvider, CL_Sprite2Provider, CL_SpriteSubarrayProvider, CL_SpriteSubsectionProvider, CL_JPEGProvider, CL_PNGProvider, CL_Target_Be, CL_DisplayCard_DirectDraw::CL_FrontbufferTarget_DX, CL_Target_DX, CL_MaskTranscolProvider, CL_SurfaceProvider_32bpp, and CL_Target_System.

Referenced by CL_SurfaceProvider_32bpp::CL_SurfaceProvider_32bpp(), CL_PixelData::dump_assert_info(), CL_Surface_Generic::ensure_surface_prepared(), fast_memmove(), CL_Canvas::get_pitch(), CL_PixelData::get_width(), and toluaI_CL_Target_get_width0().

virtual bool CL_Target::is_indexed ( ) const [pure virtual]
 

Reimplemented in CL_Canvas, CL_BMPProvider, CL_PCXProvider, CL_TargaProvider, CL_SpriteProvider, CL_Sprite2Provider, CL_SpriteSubarrayProvider, CL_SpriteSubsectionProvider, CL_JPEGProvider, CL_PNGProvider, CL_Target_Be, CL_Target_DX, CL_MaskTranscolProvider, CL_SurfaceProvider_32bpp, and CL_Target_System.

Referenced by toluaI_CL_Target_is_indexed0().

bool CL_Target::is_video ( ) const [inline, virtual]
 

Reimplemented in CL_Target_Be.

Definition at line 58 of file target.h.

Referenced by toluaI_CL_Target_is_video0().

void CL_Target::lock ( ) [pure virtual]
 

retval: True if stored in video memory, false otherwise.

Reimplemented in CL_Canvas, CL_SurfaceProvider_Generic, CL_JPEGProvider, CL_Target_Be, CL_Target_DX, CL_SurfaceProvider_32bpp, and CL_Target_System.

Referenced by CL_PixelData::CL_PixelData(), CL_SurfaceProvider_32bpp::CL_SurfaceProvider_32bpp(), CLVideoDrv::Lock(), cl_fill_rect_opaque(), CL_Surface_Generic::ensure_surface_prepared(), and toluaI_CL_Target_lock0().

virtual void CL_Target::pop_clip_rect ( ) [virtual]
 

Referenced by toluaI_CL_Target_pop_clip_rect0().

virtual void CL_Target::pop_translate_offset ( ) [virtual]
 

Referenced by CL_DisplayCard_Generic::pop_translate_offset().

virtual void CL_Target::push_clip_rect ( const CL_ClipRect & rect ) [virtual]
 

virtual void CL_Target::push_clip_rect ( ) [virtual]
 

Referenced by toluaI_CL_Target_push_clip_rect0(), and toluaI_CL_Target_push_clip_rect1().

virtual void CL_Target::push_translate_offset ( int x,
int y ) [virtual]
 

virtual void CL_Target::push_translate_offset ( ) [virtual]
 

Referenced by CL_DisplayCard_Generic::push_translate_offset().

void CL_Target::set_clip_rect ( const CL_ClipRect & rect ) [virtual]
 

retval: The current clipping rectangle.

Referenced by toluaI_CL_Target_set_clip_rect0().

virtual void CL_Target::set_translate_offset ( int x,
int y ) [virtual]
 

Referenced by CL_DisplayCard_Generic::set_translate_offset().

virtual void CL_Target::unlock ( ) [pure virtual]
 

Reimplemented in CL_Canvas, CL_SurfaceProvider_Generic, CL_JPEGProvider, CL_Target_Be, CL_Target_DX, CL_SurfaceProvider_32bpp, and CL_Target_System.

Referenced by CL_SurfaceProvider_32bpp::CL_SurfaceProvider_32bpp(), CLVideoDrv::Unlock(), cl_fill_rect_opaque(), CL_Surface_Generic::ensure_surface_prepared(), toluaI_CL_Target_unlock0(), and CL_PixelData::~CL_PixelData().


Member Data Documentation

std::stack< CL_ClipRect > CL_Target::clip_stack [private]
 

param: x1 - Leftmost x-coordinate. //FIXMEparam: y1 - Upper y-coordinate.param: x2 - Rightmost x-coordinate.param: y2 - Lower y-coordinate.param: r - Red component of the filled color.param: g - Green component of the filled color.param: b - Blue component of the filled color.param: a - Alpha component of the filled color.

Definition at line 227 of file target.h.

std::stack<TranslationOffset> CL_Target::m_translation_stack [private]
 

Definition at line 229 of file target.h.


The documentation for this class was generated from the following file:
Generated at Wed Apr 4 19:57:33 2001 for ClanLib by doxygen1.2.6 written by Dimitri van Heesch, © 1997-2001