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?
Jump to Post
You 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
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, learning, and sharing knowledge.