Advertisement
Guest User

tincho puto

a guest
Apr 25th, 2014
40
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.51 KB | None | 0 0
  1. void drawTransformedImageInv(Transformation * tr, int x, int y, int w, int h,const Color * img, Color * color){
  2. (void)color;
  3. int width,height;
  4. Color *surface=(Color*)Tablet_surface(&width,&height);
  5. int xx;
  6. int yy;
  7. for (xx=0;xx<width;xx++){
  8. for (yy=0;yy<height;yy++){
  9. int x_yeti=xx,y_yeti=yy;
  10. Transformation_applyInverse(tr,&x_yeti,&y_yeti);
  11. x_yeti-=x; y_yeti-=y;
  12. if(0<=x_yeti && x_yeti<w && 0<=y_yeti && y_yeti<h) drawPixel(xx,yy,img[x_yeti+y_yeti*w]);
  13. }
  14. }
  15.  
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement