Satyria

SDL-Programmierung / Linien

int hlineColor     (SDL_Renderer *renderer, Sint16 x1, Sint16 x2, Sint16 y, Uint32 color)    
 int hlineRGBA      (SDL_Renderer *renderer, Sint16 x1, Sint16 x2, Sint16 y, Uint8 r, Uint8 g, Uint8 b, Uint8 a)    
 int vlineColor     (SDL_Renderer *renderer, Sint16 x, Sint16 y1, Sint16 y2, Uint32 color)    
 int vlineRGBA      (SDL_Renderer *renderer, Sint16 x, Sint16 y1, Sint16 y2, Uint8 r, Uint8 g, Uint8 b, Uint8 a)    
 int lineColor      (SDL_Renderer *renderer, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Uint32 color)    
 int lineRGBA       (SDL_Renderer *renderer, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Uint8 r, Uint8 g, Uint8 b, Uint8 a)    
 int aalineColor       (SDL_Renderer *renderer, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Uint32 color)       
 int aalineRGBA     (SDL_Renderer *renderer, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Uint8 r, Uint8 g, Uint8 b, Uint8 a)    
 int thickLineColor (SDL_Renderer *renderer, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Uint8 width, Uint32 color)    
 int thickLineRGBA  (SDL_Renderer *renderer, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Uint8 width, Uint8 r, Uint8 g, Uint8 b, Uint8 a)
rendererRenderer des Fensters
x, x1, x2x-Position
y, y1, y2y-Position
colorDie Farbe des Pixels (Format 0xRRGGBBAA)
rRotanteil
gGrünanteil
bBlauanteil
aalphablendig (Deckung zum Hintergrund)
widthDicke der Linie

Beispiel:

Sourcen: line.c

<Punkte | GFX Übersicht | Rechtecke >