Toggle search
Search
Toggle menu
notifications
Toggle personal menu
Editing
PySFML
(section)
From Chaosdorf Wiki
Views
Read
Edit
Edit source
View history
associated-pages
Page
Discussion
More actions
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
== Notizen/Tasks für Pythonfoo == * The Copyconstructor ???? siehe Displaying a Sprite * Sprite.SetScale(2.f, 0.5f) * Image.GetPixel(10,20) * Pixelfarbe feststellen ??? mGUI->getColorAtPixel(x,y).red; ??? === Speicherplatz sparen/ Resourcenoptimierung === In a more complex engine, images would be automatically handled by a manager. This is a more generic and easy way of handling resources. The idea is to make the manager store the images, associated to their filename (or whatever unique identifier), so that if the same image is requested several times, the same instance will actually always be returned by the manager. sf::Sprite Sprite; // GetImage will always return the same image for the same filename Sprite.SetImage(ImageManager.GetImage("data/missile.png"));
Summary:
Please note that all contributions to Chaosdorf Wiki are considered to be released under the Attribution 3.0 Unported (see
Chaosdorf Wiki:Copyrights
for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource.
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)