Advertisement
Guest User

Untitled

a guest
Dec 18th, 2017
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.57 KB | None | 0 0
  1. #include <iostream>
  2. #define CIMGGIP_MAIN
  3. #include "CImgGIP05.h"
  4. using namespace std;
  5. using namespace cimg_library;
  6.  
  7. int main()
  8. {
  9.     while (gip_window_not_closed())
  10.     {
  11.         gip_stop_updates();
  12.         gip_load_image("Campus_Eupener_Strasse.bmp");
  13.         for (int y = 0; y < gip_win_size_y; y++)
  14.         {
  15.             for (int x = 0; x < gip_win_size_x; x++)
  16.             {
  17.                 if (gip_distance(x, y, gip_mouse_x(), gip_mouse_y()) > 100)
  18.                 {
  19.                     gip_set_grey(x, y, 0);
  20.                 }
  21.                 else
  22.                     gip_set_grey(x, y, gip_get_grey(x, y));
  23.             }
  24.         }
  25.         gip_start_updates();
  26.         gip_sleep(3);
  27.  
  28.     }
  29.     return 0;
  30. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement