Used to outline rendered text.
Definition at line 10 of file Outline.h.
Public Member Functions | |
| Outline (const SDL_Color &color, int width) | |
| void | drawOnColorKey (SDL_Surface *surface) |
| Draw outline, use surface colorkey as bg color. | |
| void | drawOn (SDL_Surface *surface, Uint32 bgKey) |
| Draw outline on bg color. | |
|
||||||||||||
|
Definition at line 17 of file Outline.cpp. 00018 : m_color(color)
00019 {
00020 m_width = width;
00021 m_pixel = 0;
00022 }
|
|
||||||||||||
|
Draw outline on bg color.
Definition at line 40 of file Outline.cpp. 00041 {
00042 SurfaceLock lock1(surface);
00043
00044 precomputePixel(surface->format);
00045 for (int i = 0; i < m_width; ++i) {
00046 drawOneLayer(surface, bgKey);
00047 }
00048 }
|
|
|
Draw outline, use surface colorkey as bg color.
Definition at line 28 of file Outline.cpp. 00029 {
00030 Uint32 bgKey = surface->format->colorkey;
00031 drawOn(surface, bgKey);
00032 }
|
1.4.2