#include <ximage.h>
Inheritance diagram for Ars::XImage:


Public Member Functions | |
| XImage (void) | |
| ~XImage (void) | |
| Standard destructor. | |
| virtual void | Init (icstring &aStr) |
| virtual const bool | SetupWindow (const Message &msg) |
| Initialize the XImage. | |
| void | ChangeImage (const string &aFilename) |
| void | ChangeImage (const string &aSection, const string &aId, string aFilename="") |
| void | SetImageId (const int aId) |
| const int | GetImageId (void) const |
| virtual void | Draw (void) |
| Draws the XImage. | |
Protected Attributes | |
| int | id |
| int | fade |
| string | sct |
| string | key |
| string | fname |
|
|
Constructs a new XImage
Definition at line 6 of file ximage.cpp.
|
|
|
Standard destructor.
Definition at line 11 of file ximage.cpp.
00012 {
00013 }
|
|
||||||||||||||||
|
Definition at line 55 of file ximage.cpp. References Ars::Window::clientRect, id, Ars::Thing::SetDirty(), and Ars::Window::UpdateWindow().
00056 {
00057 int previd = id;
00058 id = Graf::LoadImg( aSection , aId , aFilename );
00059 Graf::Img( id , static_cast<XRect *>( this ) );
00060 clientRect = *this;
00061 if( previd != id )
00062 SetDirty();
00063 UpdateWindow();
00064 }
|
|
|
Definition at line 44 of file ximage.cpp. References Ars::Window::clientRect, id, Ars::Thing::SetDirty(), and Ars::Window::UpdateWindow().
00045 {
00046 int previd = id;
00047 id = Graf::LoadImg( aFilename );
00048 Graf::Img( id , static_cast<XRect *>( this ) );
00049 clientRect = *this;
00050 if( previd != id )
00051 SetDirty();
00052 UpdateWindow();
00053 }
|
|
|
Draws the XImage.
Reimplemented from Ars::XBox. Definition at line 79 of file ximage.cpp. References fade, Ars::HPaint::GetGDI(), Ars::Thing::GetWindowRect(), and id.
00080 {
00081 XBox::Draw();
00082 XRect dst( GetWindowRect() );
00083 SDL_Surface *sfc = Graf::Img( id );
00084 if( sfc )
00085 {
00086 SDL_SetAlpha( sfc , SDL_SRCALPHA , fade );
00087 Graf::SDL_StretchBlt( sfc , 0 , GetGDI() , &dst , false );
00088 // SDL_BlitSurface( sfc , 0 , GetGDI() , &dst );
00089 }
00090 }
|
|
|
Definition at line 36 of file ximage.h. References id.
00036 { return id; }
|
|
|
Initialize the thing object via a string the CAR identifiers used are: cfg: "section" "key" "fname" NB if fname starts with @ the string is the key of associated with afilename in the global Cfg file Reimplemented from Ars::Window. Reimplemented in Ars::XMPEG. Definition at line 15 of file ximage.cpp. References fade, fname, icstring, key, and sct.
|
|
|
Definition at line 66 of file ximage.cpp. References Ars::Window::clientRect, id, Ars::Thing::SetDirty(), and Ars::Window::UpdateWindow().
00067 {
00068 int previd = id;
00069 id = aId;
00070
00071 Graf::Img( id , static_cast<XRect *>( this ) );
00072 clientRect = *this;
00073
00074 if( previd != id )
00075 SetDirty();
00076 UpdateWindow();
00077 }
|
|
|
Initialize the XImage.
Reimplemented from Ars::Window. Reimplemented in Ars::XMPEG. Definition at line 28 of file ximage.cpp. References Ars::Window::clientRect, fname, id, key, and sct.
00029 {
00030 XBox::SetupWindow( msg );
00031
00032 if( id == -1 )
00033 if( key.empty() )
00034 id = Graf::LoadImg( fname.empty() ? sct : fname );
00035 else
00036 id = Graf::LoadImg( sct , key , fname );
00037
00038 // If the width and height are not specified, they are assigned to the loaded image
00039 Graf::Img( id , static_cast<XRect *>( this ) );
00040 clientRect = *this;
00041 return true;
00042 }
|
|
|
|
|
|
Reimplemented in Ars::XMPEG. Definition at line 10 of file ximage.h. Referenced by Init(), and SetupWindow(). |
|
|
Definition at line 8 of file ximage.h. Referenced by ChangeImage(), Draw(), GetImageId(), SetImageId(), and SetupWindow(). |
|
|
Reimplemented in Ars::XMPEG. Definition at line 10 of file ximage.h. Referenced by Init(), and SetupWindow(). |
|
|
Reimplemented in Ars::XMPEG. Definition at line 10 of file ximage.h. Referenced by Init(), and SetupWindow(). |
1.3.3