Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void Funkcja8() {
- SDL_Color kolorLU;
- kolorLU.r = 17;
- kolorLU.g = 23;
- kolorLU.b = 255;
- SDL_Color kolorRD;
- kolorRD.r = 200;
- kolorRD.g = 202;
- kolorRD.b = 255;
- for(int y =0 ; y < height ; y++){
- for(int x = 0; x<width ; x++){
- setPixel(x,y,kolorLU.r-((x*1.0)*255/width+(y*1.0)*255/height)/2*kolorLU.r/255 + ((x*1.0)*255/width+(y*1.0)*255/width)/2*kolorRD.r/255,
- kolorLU.g-((x*1.0)*255/width+(y*1.0)*255/height)/2*kolorLU.g/255 + ((x*1.0)*255/width+(y*1.0)*255/height)/2*kolorRD.g/255,
- kolorLU.b-((x*1.0)*255/width+(y*1.0)*255/height)/2*kolorLU.b/255 + ((x*1.0)*255/width+(y*1.0)*255/height)/2*kolorRD.b/255);
- }
- }
- SDL_Flip(screen);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement