Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add getter for sf::Texture::m_pixelsFlipped #3283

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ChrisThrasher
Copy link
Member

@ChrisThrasher ChrisThrasher commented Oct 8, 2024

Closes #1770

There is reason to believe that larger rendering changes in SFML 4 will render (pun intended) this API moot and thus it will get removed. Nevertheless I think there is value in providing this feature even if this feature only lives for as long as SFML 3. It's trivial to write, test, and maintain and I see no reason why this would limit any implementation changes we wish to make in the v3 release cycle.

/// \return `true` if pixels are flipped, otherwise `false`
///
////////////////////////////////////////////////////////////
[[nodiscard]] bool getPixelsFlipped() const;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the name is confusing, when I read it I thought it returns a pointer to the pixels flipped but no this is just a boolean getter I think an isPixelsFlipped or something else is better name

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

isPixelsFlipped or maybe arePixelsFlipped? I agree that a better name probably exists.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about:

  • m_isYFlipped
  • bool isYFlipped()

or something like that?

@ChrisThrasher ChrisThrasher modified the milestones: 3.0, 3.1 Oct 8, 2024
@vittorioromeo
Copy link
Member

Is there a need / actual use case to expose this? Or are we exposing an implementation detail?

@eXpl0it3r
Copy link
Member

See the linked issue and issue in imgui-sfml

@vittorioromeo
Copy link
Member

See the linked issue and issue in imgui-sfml

Completely missed that, my bad. Will take a look at it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Planned
Development

Successfully merging this pull request may close these issues.

Feature request: implement getter for sf::Texture::m_pixelsFlipped
4 participants