SHARE
TWEET

683 bytes

a guest Sep 4th, 2017 65 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include<SFML\Graphics.hpp>
  2. #define V=RectangleShape({6.f,300.f});r
  3. #define H=RectangleShape({300.f,6.f});r
  4. #define S(a,b).setPosition(a,b);
  5. #define D(c,d)a.setPosition(c,d);w.draw(a);
  6. using namespace sf;int main(){RenderWindow w(VideoMode(300,300),"");RectangleShape r[8];r[0]V[1]V[2]V[3]V[4]H[5]H[6]H[7]H[0]S(-3,0)r[1]S(97,0)r[2]S(197,0)r[3]S(297,0)r[4]S(0,-3)r[5]S(0,97)r[6]S(0,197)r[7]S(0,297)CircleShape a(40);a.setFillColor(Color::Black);while(w.isOpen()){Event e;while(w.pollEvent(e))if(e.type==Event::Closed)w.close();w.clear(Color::White);for(int i=0;i<8;++i){r[i].setFillColor(Color(128,128,128));w.draw(r[i]);}D(110,10)D(210,110)D(210,210)D(110,210)D(10,210)w.display();}}
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top