Author Topic: AM's sfml implementation?  (Read 6347 times)

ArcadeBliss

  • Sr. Member
  • ****
  • Posts: 195
    • View Profile
AM's sfml implementation?
« on: October 14, 2016, 07:03:05 AM »
In sfml it is possible to change the origin point of an sf:shape, text, and sprite by setting the origin property. This allows objects to be rotated using the center point instead of the upper left point of an object.

Raygun, would it be very involved to expose this property in squirrel?

Here is the link to the sfml documentation for sf::Transformable http://www.sfml-dev.org/tutorials/2.4/graphics-transform.php

raygun

  • Administrator
  • Sr. Member
  • *****
  • Posts: 393
    • View Profile
Re: AM's sfml implementation?
« Reply #1 on: November 02, 2016, 11:14:54 PM »
Hey there, it actually looks pretty straight forward... in fact I 've got it implemented now for the next version jst looking at it  :D

ArcadeBliss

  • Sr. Member
  • ****
  • Posts: 195
    • View Profile
Re: AM's sfml implementation?
« Reply #2 on: November 04, 2016, 06:59:30 AM »
Hey there, it actually looks pretty straight forward... in fact I 've got it implemented now for the next version jst looking at it  :D


You rock! You dont know how well this will help me and other themers. It will now be possible to do a slew od things that were not possible before.

liquid8d

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 442
    • View Profile
Re: AM's sfml implementation?
« Reply #3 on: November 29, 2016, 06:22:48 PM »
Awesome! I've had that request in for a while :)

raygun

  • Administrator
  • Sr. Member
  • *****
  • Posts: 393
    • View Profile
Re: AM's sfml implementation?
« Reply #4 on: December 02, 2016, 07:13:31 PM »
Yeah I can be pretty dim sometimes, it didn't really click for me until ArcadeBliss pointed out that the setorigin function is right there in sfml to do exactly what was needed.. duoh

liquid8d

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 442
    • View Profile
Re: AM's sfml implementation?
« Reply #5 on: December 03, 2016, 08:38:33 AM »
the set origin is a huge help, were you able to look at the shapes? Just simple rectangles and possibly circles would be helpful. I worked around rectangles by using a single white pixel image and setting color but it'd be nice if it was an actual object.