Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #define CIMGGIP_MAIN
- #include "CImgGIP05.h"
- using namespace std;
- using namespace cimg_library;
- int main()
- {
- while (gip_window_not_closed())
- {
- gip_stop_updates();
- gip_load_image("Campus_Eupener_Strasse.bmp");
- for (int y = 0; y < gip_win_size_y; y++)
- {
- for (int x = 0; x < gip_win_size_x; x++)
- {
- if (gip_distance(x, y, gip_mouse_x(), gip_mouse_y()) > 100)
- {
- gip_set_grey(x, y, 0);
- }
- else
- gip_set_grey(x, y, gip_get_grey(x, y));
- }
- }
- gip_start_updates();
- gip_sleep(3);
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement