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

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - pauljurczak

Pages: [1]
1
Graphics / Transform matrix behaves differently for VertexArray and Text
« on: December 24, 2019, 07:08:07 am »
In this code snippet:

    sf::Text      text{ "text", font };
    sf::Transform transform{ 1, 0, 0, 0, -1, 0, 0, 0, 1 };
    sf::View      view{ sf::FloatRect{-100, -100, 200, 200} };

    text.setFillColor(sf::Color::Red);
    view.setViewport(sf::FloatRect{0, 0, 1, 1});
    window.setView(view);
    window.draw(text, transform);

the text is being displayed upside-down as intended. When I change transform to:

sf::Transform transform{ 1, 0, 0, 0, -1, 0, 0, 0, 0 };

the text is not displayed any more. If I replace sf::Text with sf::VertexArray, vertices are displayed. Why there is a difference in behavior between these two Drawable types?

2
General / Re: Text error messages from some functions.
« on: September 05, 2015, 12:49:56 pm »
Thanks. I had hard time finding this before, but now your answer directed me to the description of sf::err(), which makes it clear. Maybe it could be referenced somewhere at top level of documentation as a general way of handling error conditions.

3
General / Text error messages from some functions.
« on: September 05, 2015, 11:24:50 am »
I've built my first SFML program and I noticed that functions like loadFromFile send a text error message to the console when they fail. I can't find a description of this side effect in the documentation. Is this text being sent to std::cerr stream? Is there an option to throw an exception instead or in addition to this error message?

Pages: [1]
anything