#include "pgrect.h"
#include "pgcolor.h"
Include dependency graph for pgdraw.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.
Namespaces | |
| namespace | PG_Draw |
Defines | |
| #define | M_PI 3.14159265359 |
| The definition of the number PI. | |
Enumerations | |
| enum | BkMode { TILE, STRETCH, TILE3H, TILE3V, TILE9 } |
Functions | |
| DECLSPEC SDL_Surface * | RotoScaleSurface (SDL_Surface *src, double angle, double zoom, bool smooth=true) |
| Rotate and scale an SDL_Surface. | |
| DECLSPEC SDL_Surface * | ScaleSurface (SDL_Surface *src, double zoomx, double zoomy, bool smooth=true) |
| Scale an SDL_Surface. | |
| static SDL_Surface * | ScaleSurface (SDL_Surface *src, const PG_Rect &rect, bool smooth=true) |
| Scale an SDL_Surface. | |
| static SDL_Surface * | ScaleSurface (SDL_Surface *src, Uint16 newx, Uint16 newy, bool smooth=true) |
| Scale an SDL_Surface. | |
| DECLSPEC void | BlitScale (SDL_Surface *src, SDL_Surface *dst, bool smooth=true) |
| Scale and blit surface. | |
| DECLSPEC SDL_Surface * | CreateGradient (const PG_Rect &r, PG_Gradient &gradient) |
| Creates a surface filled with a gradient. | |
| DECLSPEC SDL_Surface * | CreateGradient (const PG_Rect &r, const PG_Color &ul, const PG_Color &ur, const PG_Color &dl, const PG_Color &dr) |
| Creates a surface filled with a gradient. | |
| DECLSPEC void | DrawGradient (SDL_Surface *surface, const PG_Rect &r, PG_Gradient &gradient) |
| Draw a gradient on a surface. | |
| DECLSPEC void | DrawGradient (SDL_Surface *surface, const PG_Rect &rect, const PG_Color &ul, const PG_Color &ur, const PG_Color &dl, const PG_Color &dr) |
| Draw a gradient on a surface. | |
| DECLSPEC SDL_Surface * | CreateRGBSurface (Uint16 w, Uint16 h, int flags=SDL_SWSURFACE) |
| Create a new SDL surface. | |
| DECLSPEC void | DrawThemedSurface (SDL_Surface *surface, const PG_Rect &r, PG_Gradient *gradient, SDL_Surface *background, BkMode bkmode, Uint8 blend) |
| Draw a 'themed' surface. | |
| DECLSPEC void | DrawLine (SDL_Surface *surface, Uint32 x0, Uint32 y0, Uint32 x1, Uint32 y1, const PG_Color &color, Uint8 width=1) |
| Draw a line. | |
| DECLSPEC void | SetPixel (int x, int y, const PG_Color &c, SDL_Surface *surface) |
| Set a pixel. | |
| void | BlitSurface (SDL_Surface *srf_src, const PG_Rect &rect_src, SDL_Surface *srf_dst, const PG_Rect &rect_dst) |
| replacement for SDL_BlitSurface | |
| DECLSPEC void | DrawTile (SDL_Surface *surface, const PG_Rect &ref, const PG_Rect &drawrect, SDL_Surface *tilemap) |
| Tiles a surface with a given image. | |
| DECLSPEC void | RectStretch (SDL_Surface *src_surface, int xs1, int ys1, int xs2, int ys2, SDL_Surface *dst_surface, int xd1, int yd1, int xd2, int yd2, Uint32 *voiLUT) |
| DECLSPEC void | CreateFilterLUT () |
| DECLSPEC void | PG_SmoothFast (SDL_Surface *src, SDL_Surface *dst) |
| DECLSPEC void | InterpolatePixel (SDL_Surface *src, SDL_Surface *dest) |
Definition in file pgdraw.h.
|
|
The definition of the number PI. Some platforms dont define M_PI. So we have to define it. Definition at line 45 of file pgdraw.h. Referenced by PG_Draw::RotoScaleSurface(), and sinc(). |
|
|
||||||||||||||||
|
Scale and blit surface. Scales a 32 bit or 8 bit SDL_Surface to the size of the destination surface dst and blits the result to the destination surface. If the surface is not 8bit or 32bit RGBA/ABGR it will be converted into a 32bit RGBA format on the fly.
|
|
||||||||||||||||||||
|
replacement for SDL_BlitSurface
Definition at line 276 of file pgdraw.h. Referenced by VehicleTypeBaseWidget::display(), TechWidget::display(), BuildingTypeBaseWidget::display(), MapComponent::displayClip(), Draw3TileH(), Draw3TileV(), Draw9Tile(), PG_WidgetDnD::drawDragArea(), DrawTileSurface(), PG_Widget::eventBlit(), PG_ProgressBar::eventBlit(), PG_Button::eventBlit(), StoringPosition::eventBlit(), PG_Widget::FadeIn(), PG_Widget::FadeOut(), and PG_Draw::DrawTile(). |
|
|
|
|
||||||||||||||||||||||||
|
Creates a surface filled with a gradient.
|
|
||||||||||||
|
Creates a surface filled with a gradient.
Referenced by PG_Draw::CreateGradient(). |
|
||||||||||||||||
|
Create a new SDL surface.
Referenced by PG_Application::DrawCursor(), PG_WidgetDnD::eventMouseButtonDown(), PG_Widget::FadeIn(), PG_Widget::FadeOut(), PG_Draw::CreateGradient(), PG_Widget::PG_Widget(), and PG_Widget::SizeWidget(). |
|
||||||||||||||||||||||||||||
|
Draw a gradient on a surface.
|
|
||||||||||||||||
|
Draw a gradient on a surface.
Referenced by PG_Draw::CreateGradient(), PG_Draw::DrawGradient(), and PG_Draw::DrawThemedSurface(). |
|
||||||||||||||||||||||||||||||||
|
Draw a line.
Referenced by PG_Widget::DrawLine(). |
|
||||||||||||||||||||||||||||
|
Draw a 'themed' surface.
Referenced by PG_ThemeWidget::CreateThemedSurface(), PG_PopupMenu::eventBlit(), PG_Image::eventBlit(), and PG_ThemeWidget::eventDraw(). |
|
||||||||||||||||||||
|
Tiles a surface with a given image.
Referenced by PG_Application::RedrawBackground(). |
|
||||||||||||
|
|
|
||||||||||||
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||
|
|
|
||||||||||||||||||||
|
Rotate and scale an SDL_Surface. Rotates and scales a 32bit or 8bit SDL_Surface to newly created destination surface. If smooth is 1 the destination 32bit surface is anti-aliased. If the surface is not 8bit or 32bit RGBA/ABGR it will be converted into a 32bit RGBA format on the fly.
|
|
||||||||||||||||||||
|
Scale an SDL_Surface. Scales a 32bit or 8bit SDL_Surface to newly created destination surface. If the surface is not 8bit or 32bit RGBA/ABGR it will be converted into a 32bit RGBA format on the fly.
Definition at line 146 of file pgdraw.h. References PG_Draw::ScaleSurface(), and ForestCalculation::smooth(). |
|
||||||||||||||||
|
Scale an SDL_Surface. Scales a 32bit or 8bit SDL_Surface to newly created destination surface. If the surface is not 8bit or 32bit RGBA/ABGR it will be converted into a 32bit RGBA format on the fly.
Definition at line 128 of file pgdraw.h. References PG_Draw::ScaleSurface(), and ForestCalculation::smooth(). |
|
||||||||||||||||||||
|
Scale an SDL_Surface. Scales a 32bit or 8bit SDL_Surface to newly created destination surface. If the surface is not 8bit or 32bit RGBA/ABGR it will be converted into a 32bit RGBA format on the fly.
Referenced by Draw3TileH(), Draw3TileV(), PG_Draw::BlitScale(), PG_Draw::DrawThemedSurface(), PG_Application::RedrawBackground(), PG_Draw::ScaleSurface(), and SmallGuiButton::updateIcon(). |
|
||||||||||||||||||||
|
Set a pixel.
Referenced by plotpixel(), and PG_Widget::SetPixel(). |
1.4.2