Copyright (c) Hyperion Entertainment and contributors.

BOOPSI Images

From AmigaOS Documentation Wiki
Revision as of 23:15, 5 April 2013 by Steven Solie (talk | contribs) (Created page with "== Introduction == 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...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Introduction

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.

BOOPSI Image Methods

Imageclass defines several methods of its own which subclasses of imageclass either have to implement or pass on to their superclass. The method IDs for imageclass are defined in <intuition/imageclass.h>. Each method requires some parameters. The MethodID is the only parameter common to each method.

Method Description
IM_DRAW Draw image with state.
IM_DRAWFRAME Draw image within frame limits.
IM_ERASE Erase image with state.
IM_ERASEFRAME Erase image within frame.
IM_HITFRAME Determine if image was hit within frame.
IM_HITTEST Determine if image was hit.

The following methods are described at the imageclass level although it's up to the subclasses to actually implement them. If a class does not implement these methods it should either return zero, indicating that this class does not support the method, or defer processing on to its superclass.

Method Description
IM_FRAMEBOX Get recommended frame around some box.
IM_EXTENT Inquire about rendering extent.
IM_EXTENTFRAME Inquire about rendering extent with dimensions.