java - What is an ImageObserver? -


when draw image requires image observer. understand far bufferedimage image observer. question is, defines image observer , do? i'm quite confused.

first of all, imageobserver interface. according docs:

an asynchronous update interface receiving notifications image information image constructed.

in other words, it's object-oriented way use images can modified before created. method imageupdate(image img, int infoflags, int x, int y, int width, int height) called time image modified. returns true if wants notified further changes , false otherwise. method can used force size, resolution, colours etc. gives control of errors (error flag). more info see this.

the observer may process important information image - example if we're drawing image on screen , change bigger 1 before rendering complete, there has way inform whatever we're drawing on dimension has changed (allocate more space) , has deal changes. fact imageobserver asynchronous extremely important in case.


Comments

Popular posts from this blog

java.util.scanner - How to read and add only numbers to array from a text file -

rewrite - Trouble with Wordpress multiple custom querystrings -