I'm trying to make a class called "Sprite", which is supposed to handle spritecards and such. However, I can't seem to be able to get the image height without having an image observer object.
Do I have to pass the image observer from the main class to every sprite class just to be able to get the width?
Acegikmo
0
Light Poster
Recommended Answers
Jump to PostYou normally only need an ImageObserver when you are loading an image asynchronously and need to know when it's finished loading (eg in a web page). Once the Image is loaded you just need the Image itself (or a suitable public method in the class that "owns" the Image).
…
All 4 Replies
peter_budo
2,532
Code tags enforcer
Team Colleague
Featured Poster
CrazyDieter
4
Junior Poster
JamesCherrill
4,733
Most Valuable Poster
Team Colleague
Featured Poster
Ezzaral
2,714
Posting Sage
Team Colleague
Featured Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.