Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: 1.6 to 2.x help with shapes  (Read 1729 times)

0 Members and 1 Guest are viewing this topic.

NGM88

  • Full Member
  • ***
  • Posts: 162
    • View Profile
1.6 to 2.x help with shapes
« on: June 06, 2017, 09:56:04 pm »
How would these be converted to 2.x?

win.draw(sf::Shape::Rectangle(le.Blocks[0].fRect, sf::Color(255, 0, 0)));
rt.draw(sf::Shape(sf::Shape::Line(l.position, end, 1, l.color)));

le.Blocks is basically a vector of FloatRects.
l.position and end are Vector2fs

Hapax

  • Hero Member
  • *****
  • Posts: 3379
  • My number of posts is shown in hexadecimal.
    • View Profile
    • Links
Re: 1.6 to 2.x help with shapes
« Reply #1 on: June 06, 2017, 10:01:09 pm »
Looks like you need sf::RectangleShape.
Selba Ward -SFML drawables
Cheese Map -Drawable Layered Tile Map
Kairos -Timing Library
Grambol
 *Hapaxia Links*

NGM88

  • Full Member
  • ***
  • Posts: 162
    • View Profile
Re: 1.6 to 2.x help with shapes
« Reply #2 on: June 19, 2017, 12:13:26 am »

 

anything