0
저는 SFML 라이브러리와 Visual C++를 사용하여 막 대형 차트를 만듭니다. 막 대형 차트의 시작점을 설정하려고하므로 move 및 setOrigin 함수를 사용하려고 시도하지만 성공할 수는 없습니다.막 대형 차트의 시작점을 설정하는 방법
sf::RectangleShape rec1(sf::Vector2f(stage1x*1000, stage1y*1000));
sf::RectangleShape rec2(sf::Vector2f(stage2x*1000, stage2y*1000));
sf::RectangleShape rec3(sf::Vector2f(stage3x*1000, stage3y*1000));
rec1.setOrigin(0, 0);
rec2.setOrigin(0, 0);
rec3.setOrigin(0, 0);
rec1.move(200, 700); // This moves the Rectangle over 200 pixels and down 700 pixels
rec2.move(300, 700); // This moves the Rectangle over 300 pixels and down 700 pixels
rec3.move(400, 700); // This moves the Rectangle over 400 pixels and down 700 pixels
rec1.setFillColor(sf::Color(100, 250, 50));
rec2.setFillColor(sf::Color(10, 20, 100));
rec3.setFillColor(sf::Color(500, 600, 700));