#include <pixel.h>
|  | 
| static void | put (SDL_Surface *surface, Sint32 x, Sint32 y, const Color &color) | 
|  | 
| static Uint32 | alpha32 (Uint32 src, Uint32 dst, Uint8 a) | 
|  | 
| static Uint16 | alpha16 (Uint16 src, Uint16 dst, Uint8 a, const SDL_PixelFormat *f) | 
|  | 
| static void | putAlpha (SDL_Surface *surface, Sint32 x, Sint32 y, const Color &color) | 
|  | 
|  | 
| Sint16 | x | 
|  | 
| Sint16 Sint16 | y | 
|  | 
| Uint8 * | p = (Uint8 *)surface->pixels + y * surface->pitch + x * bpp | 
|  | 
| Uint32 | color = 0 | 
|  | 
| Uint8 | r | 
|  | 
| Uint8 | g | 
|  | 
| Uint8 | b | 
|  | 
| Uint8 | a | 
|  | 
Checks a pixels color of an SDL_Surface. 
- Parameters
- 
  
    | surface | an SDL_Surface where to check for a pixel color. |  | x | the x coordinate on the surface. |  | y | the y coordinate on the surface. |  
 
- Returns
- a color of a pixel. 
 
 
  
  | 
        
          | static Uint16 alpha16 | ( | Uint16 | src, |  
          |  |  | Uint16 | dst, |  
          |  |  | Uint8 | a, |  
          |  |  | const SDL_PixelFormat * | f |  
          |  | ) |  |  |  | inlinestatic | 
 
 
  
  | 
        
          | static Uint32 alpha32 | ( | Uint32 | src, |  
          |  |  | Uint32 | dst, |  
          |  |  | Uint8 | a |  
          |  | ) |  |  |  | inlinestatic | 
 
 
  
  | 
        
          | static void put | ( | SDL_Surface * | surface, |  
          |  |  | Sint32 | x, |  
          |  |  | Sint32 | y, |  
          |  |  | const Color & | color |  
          |  | ) |  |  |  | inlinestatic | 
 
 
  
  | 
        
          | static void putAlpha | ( | SDL_Surface * | surface, |  
          |  |  | Sint32 | x, |  
          |  |  | Sint32 | y, |  
          |  |  | const Color & | color |  
          |  | ) |  |  |  | inlinestatic | 
 
Puts a pixel on an SDL_Surface with alpha 
- Parameters
- 
  
    | x | the x coordinate on the surface. |  | y | the y coordinate on the surface. |  | color | the color the pixel should be in. |  
 
References Color::a(), Pixel::alpha16(), Pixel::alpha32(), Color::b(), Pixel::b, Color::g(), Pixel::g, Pixel::p, Color::r(), Pixel::r, Pixel::SDL_LockSurface(), and Pixel::SDL_UnlockSurface().
Referenced by CanvasStd::clearClipRect(), and CanvasStd::line().
 
 
      
        
          | SDL_GetRGBA | ( | color | , | 
        
          |  |  | surface-> | format, | 
        
          |  |  | & | r, | 
        
          |  |  | & | g, | 
        
          |  |  | & | b, | 
        
          |  |  | & | a | 
        
          |  | ) |  |  | 
      
 
 
      
        
          | SDL_LockSurface | ( | surface |  | ) |  | 
      
 
 
      
        
          | SDL_UnlockSurface | ( | surface |  | ) |  | 
      
 
 
      
        
          | Uint8* p = (Uint8 *)surface->pixels + y * surface->pitch + x * bpp | 
      
 
 
Initial value:{
            Sint32  bpp = surface->format->BytesPerPixel
 
 
The documentation for this class was generated from the following file: