#include <pgimage.h>
Inheritance diagram for PG_Image:

Public Member Functions | |
| PG_Image (PG_Widget *parent, const PG_Point &p, const std::string &filename, PG_Draw::BkMode drawmode=PG_Draw::TILE, const std::string &style="ThemeWidget") | |
| Contructor of the PG_Image class (loading from file). | |
| PG_Image (PG_Widget *parent, const PG_Point &p, SDL_Surface *image, bool freeimage=true, PG_Draw::BkMode drawmode=PG_Draw::TILE, const std::string &style="ThemeWidget") | |
| Contructor of the PG_Image class (image from surface). | |
| PG_Image (PG_Widget *parent, const PG_Point &p, const std::string &filename, Uint32 colorkey, PG_Draw::BkMode drawmode=PG_Draw::TILE, const std::string &style="ThemeWidget") | |
| Contructor of the PG_Image class (loading from file). | |
| void | SetColorKey (const PG_Color &key) |
| Set the colorkey of the image. | |
| void | SetDrawMode (PG_Draw::BkMode mode) |
| @ Set mode of drawing (BKMODE_TILE | BKMODE_STRETCH | BKMODE_3TILEH | BKMODE_3TILEV | BKMODE_9TILE) | |
| Uint8 | GetDrawMode () |
| bool | LoadImage (const std::string &filename) |
| Display an image in the widget. | |
| bool | LoadImage (const std::string &filename, const PG_Color &key) |
| Display an image in the widget using a colorkey. | |
| bool | SetImage (SDL_Surface *image, bool bFreeImage=true) |
| Display an image in the widget. | |
| ~PG_Image () | |
Protected Member Functions | |
| void | eventDraw (SDL_Surface *surface, const PG_Rect &rect) |
| overridable eventhandler to draw the object surface | |
| void | eventBlit (SDL_Surface *surface, const PG_Rect &src, const PG_Rect &dst) |
| overridable eventhandler to blit the widget contents to the screen | |
Protected Attributes | |
| SDL_Surface * | my_cachedSrf |
| PG_Draw::BkMode | my_DrawMode |
Definition at line 44 of file pgimage.h.
|
||||||||||||||||||||||||
|
Contructor of the PG_Image class (loading from file). Creates the widget and loads the image from a file
Definition at line 49 of file pgimage.cpp. References LoadImage(), PG_ThemeWidget::my_image, PG_Widget::SizeWidget(), and PG_Draw::TILE. |
|
||||||||||||||||||||||||||||
|
Contructor of the PG_Image class (image from surface). Creates the widget and loads the image from an SDL_Surface
Definition at line 59 of file pgimage.cpp. References PG_ThemeWidget::my_image, SetImage(), PG_Widget::SizeWidget(), and PG_Draw::TILE. |
|
||||||||||||||||||||||||||||
|
Contructor of the PG_Image class (loading from file). Creates the widget and loads the image from a file using a colorkey
Definition at line 41 of file pgimage.cpp. References LoadImage(), PG_ThemeWidget::my_image, PG_Widget::SizeWidget(), and PG_Draw::TILE. |
|
|
Definition at line 67 of file pgimage.cpp. References PG_ThemeWidget::DeleteThemedSurface(), and my_cachedSrf. |
|
||||||||||||||||
|
overridable eventhandler to blit the widget contents to the screen
Reimplemented from PG_ThemeWidget. Definition at line 73 of file pgimage.cpp. References PG_ThemeWidget::CreateThemedSurface(), PG_Draw::DrawThemedSurface(), PG_Widget::eventBlit(), PG_Widget::GetClipRects(), PG_ThemeWidget::my_background, PG_ThemeWidget::my_blendLevel, my_cachedSrf, my_DrawMode, PG_Rect::my_height, PG_ThemeWidget::my_image, PG_Rect::my_width, PG_Rect::PG_Rect(), and PG_Draw::STRETCH. |
|
||||||||||||
|
overridable eventhandler to draw the object surface
Reimplemented from PG_ThemeWidget. Definition at line 71 of file pgimage.cpp. |
|
|
|
|
||||||||||||
|
Display an image in the widget using a colorkey.
Reimplemented from PG_ThemeWidget. Definition at line 131 of file pgimage.cpp. References PG_ThemeWidget::DeleteThemedSurface(), PG_ThemeWidget::LoadImage(), and my_cachedSrf. |
|
|
Display an image in the widget.
Reimplemented from PG_ThemeWidget. Definition at line 120 of file pgimage.cpp. References PG_ThemeWidget::DeleteThemedSurface(), PG_ThemeWidget::LoadImage(), and my_cachedSrf. Referenced by PG_Image(). |
|
|
Set the colorkey of the image.
Definition at line 106 of file pgimage.cpp. References PG_ThemeWidget::DeleteThemedSurface(), my_cachedSrf, and PG_ThemeWidget::my_image. |
|
|
@ Set mode of drawing (BKMODE_TILE | BKMODE_STRETCH | BKMODE_3TILEH | BKMODE_3TILEV | BKMODE_9TILE)
Definition at line 112 of file pgimage.cpp. References PG_ThemeWidget::DeleteThemedSurface(), my_cachedSrf, and my_DrawMode. Referenced by CargoDialog::CargoDialog(), and UnitInfoDialog::UnitInfoDialog(). |
|
||||||||||||
|
Display an image in the widget.
Reimplemented from PG_ThemeWidget. Definition at line 142 of file pgimage.cpp. References PG_ThemeWidget::DeleteThemedSurface(), my_cachedSrf, and PG_ThemeWidget::SetImage(). Referenced by CargoDialog::CargoDialog(), PG_Image(), and UnitInfoDialog::UnitInfoDialog(). |
|
|
Definition at line 116 of file pgimage.h. Referenced by eventBlit(), LoadImage(), SetColorKey(), SetDrawMode(), SetImage(), and ~PG_Image(). |
|
|
Definition at line 118 of file pgimage.h. Referenced by eventBlit(), and SetDrawMode(). |
1.4.2