Aros/Developer/Docs/Libraries/Intuition/BOOPSIClasses

Introduction
Apart from RootClass, all classes that are written will inherit from this base class (rootclass). Your class must either implement the rootclass methods or defer processing of these methods to the next class.

rootclass
The rootclass method IDs:

gadgetclass
gadgetclass has to understand these rootclass methods and introduces these

imageClass
Boopsi's imageclass is one of the standard classes built into Intuition. As its name implies, it is a class of Intuition Images. These boopsi images can be used in place of traditional Image structure (as they contain an Intuition Image structure), but they are much more powerful. By using boopsi methods, an application or Intuition can tell an imageclass object to render itself. Because it renders itself (rather than Intuition rendering it), the imageclass object is free to render whatever it wants (well, within reason). For example, a boopsi image object can render itself according to the current display resolution, or to scale itself to any size an application requests.

Imageclass defines several methods of its own which subclasses of imageclass either have to implement or pass on to their superclass.

IM_DRAW IM_HITTEST IM_ERASEFRAME IM_MOVE IM_ERASE IM_DRAWFRAME IM_HITFRAME IM_FRAMEBOX

You create a new boopsi class which is subclass of Intuition's IMAGECLASS (like this bitmap class) and in the IM_DRAW method you do the painting in whatever way you want. If you have some Bitmap from the datatype object use that with BltBitMapRastPort, if you have some chunky pixel array, use WritePixelArray.

See compiler/coolimages/imageclass.c

Objects created from classes derived from IMAGECLASS can be passed to DrawImage.

You can use objects from IMAGECLASS (or subclasses from IMAGECLASS) as GadgetRender (etc.) in gadgets (no matter if the gadget is old-style or boopsi). You can also cast the object to (struct Image *), because the instance data contains a struct Image at the beginning.

This new image class I'm talking about is not different to what you are already doing on AOS (using the Reaction/Classact bitmap.image class which is also a subclass of IMAGECLASS). AROS doesn't have that class so one would either need to write it (it's an external class similar to colorwheel.gadget), or write a simplified class reimplementation directly in your program == the new image class I mean which doesn't need to do much more than some blitting with BltBitMapRastPort or similar in IM_DRAW (if you are already loading the image/datatype object elsewhere, otherwise you could also do the loading in the new image class's OM_NEW).

Examples
The following worked with a 4 color IFF image. I'm assuming that I can do CopyMem for the planes of a V42 datatype bitmap.

icclass
must understand rootclass method IDs but also these

ICM_SETLOOP ICM_CLEARLOOP ICM_CHECKLOOP - to manage a loop inhibition for broadcasted messages. They increment, decrement, and return the value of that counter

ICA_Target ICA_Map