home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
AmigActive 6
/
AACD06.ISO
/
AACD
/
Programming
/
ImageManager
/
Developer
/
ImageManager.Doc
< prev
Wrap
Text File
|
2000-01-27
|
7KB
|
280 lines
TABLE OF CONTENTS
ImageManager.library/--introduction--
ImageManager.library/IM_CreateChainA
ImageManager.library/IM_DeleteChain
ImageManager.library/IM_DisposeObject
ImageManager.library/IM_GetClass
ImageManager.library/IM_FreeClass
ImageManager.library/IM_NewObjectA
ImageManager.library/IM_ObtainColourCube
ImageManager.library/IM_ReleaseColourCube
ImageManager.library/--introduction--
This is a PRELIMINARY autodoc. Don't expect anything to remain as it currently
is...
Feedback: Allan Odgaard <Duff@DIKU.DK>
ImageManager.library/IM_CreateChainA
NAME
IM_CreateChainA -- Create a chain of objects
IM_CreateChain -- Varargs stub for IM_CreateChainA().
SYNOPSIS
objects = IM_CreateChainA(flags, chain)
D0 D0 A0
Object **IM_CreateChainA(ULONG, APTR);
objects = IM_CreateChain(flags, chain_element, ...)
Object **IM_CreateChain(ULONG, ULONG, ...);
FUNCTION
This function allows you to create an entire chain of object.
INPUTS
flags = Currently no flags are defined.
chain = The chain is an array that describe the chain which must be
created. A chain command can be:
IMC_NewObject -- followed by a STRPTR and a taglist.
IMC_CustomObject -- followed by a struct IClass * and a taglist.
IMC_EndChain -- terminates the list.
RESULT
An array of objects where the first one is the first in the chain etc.
NULL for failure.
EXAMPLE
Object **objects = IM_CreateChain(0L,
IMC_NewObject, "File",
TAG_DONE,
IMC_NewObject, "Decoder",
TAG_DONE,
IMC_NewObject, "ScaleX",
IMA_ScaleX_Percent, 150,
TAG_DONE,
IMC_NewObject, "ScaleY",
IMA_ScaleY_Percent, 150
TAG_DONE,
IMC_CustomObject, myclass,
IMA_MyClass_Window, win,
TAG_DONE,
IMC_NewObject, "Container",
IMA_Container_Screen, scr,
TAG_DONE,
IMC_NewObject, "Raster",
TAG_DONE,
IMC_EndChain);
if(objects)
{
DoMethod(objects[0], IMM_File_Load, filename);
...
IM_DeleteChain(objects);
}
SEE ALSO
IM_DeleteChain()
ImageManager.library/IM_DeleteChain
NAME
IM_DeleteChain -- Delete a chain of objects
SYNOPSIS
IM_DeleteChain(chain)
A0
VOID IM_DeleteChain(Object **);
FUNCTION
This function will delete all the objects in the chain previously
created by IM_CrateChain(). It will also free the array used for the
object pointers.
INPUTS
chain = An array of objects as returned by IM_CrateChain()
RESULT
None.
SEE ALSO
IM_CreateChainA()
ImageManager.library/IM_DisposeObject
NAME
IM_DisposeObject -- Delete an IM object.
SYNOPSIS
IM_DisposeObject(object)
A0
VOID MUI_DisposeObject(Object *);
FUNCTION
Deletes an IM object and all of it's auxiliary data.
These objects are all created by IM_NewObject() or NewObject().
INPUTS
object = abstract pointer to an IM object returned by
MUI_NewObject(). The pointer may be NULL, in which case
this function has no effect.
RESULT
None.
SEE ALSO
IM_NewObjectA()
ImageManager.library/IM_GetClass
NAME
IM_GetClass -- Get a pointer to an IM class.
SYNOPSIS
class = IM_GetClass(classID)
D0 A0
struct IClass *IM_GetClass(STRPTR);
FUNCTION
Obtain a pointer to the class of a certain classID.
You need this pointer if you want to create a subclass.
INPUTS
classID = the name/ID string of a IM class, e.g. "Decoder".
RESULT
A pointer to the class or NULL for failure.
SEE ALSO
FreeClass(), intuiton.library/MakeClass()
ImageManager.library/IM_FreeClass
NAME
IM_FreeClass -- Free a class obtained from IM_GetClass()
SYNOPSIS
IM_FreeClass(class)
A0
VOID IM_FreeClass(struct IClass *);
FUNCTION
Free a class previously obtained using IM_GetClass(),
INPUTS
class = pointer to class.
SEE ALSO
GetClass()
ImageManager.library/IM_NewObjectA
NAME
IM_NewObjectA -- Create an object from a class.
IM_NewObject -- Varargs stub for IM_NewObjectA().
SYNOPSIS
object = IM_NewObjectA(classID, tags)
D0 A0 A1
Object *IM_NewObjectA(STRPTR, struct TagItem *);
object = IM_NewObject(classID, Tag1, ...)
Object *IM_NewObject(STRPTR, ULONG, ...);
FUNCTION
This is the general method of creating objects from IM classes.
You specify a class by its ID string. If the class is not
already in memory or built into imagemanager.library, it will be
loaded using OpenLibrary("ImageManager/%s",0).
You further specify initial "create-time" attributes for the
object via a TagItem list, and they are applied to the resulting
generic data object that is returned. The attributes, their meanings,
attributes applied only at create-time, and required attributes
are all defined and documented on a class-by-class basis.
INPUTS
classID = the name/ID string of a IM class, e.g. "Decoder".
Class names are case sensitive!
tagList = pointer to array of TagItems containing attribute/value
pairs to be applied to the object being created.
RESULT
An IM object, which may be used on its own or added to a chain of
objects for serial processing of (image) data.
The object may be manipulated by generic functions such as SetAttrs(),
GetAttr(), DoMethod() etc.
You eventually free the object using IM_DisposeObject().
SEE ALSO
IM_DisposeObject(), SetAttrs(), GetAttr().
ImageManager.library/IM_ObtainColourCube
NAME
IM_ObtainColourCube -- Obtain a screen specific colour cube
SYNOPSIS
cube = IM_ObtainColourCube(screen)
D0 A0
APTR IM_ObtainColourCube(struct Screen *);
FUNCTION
Obtain a colour cube for the specified screen.
INPUTS
screen = Pointer to the screen for which you want a colour cube.
RESULT
A blockbox colour cube, which can be used with the remap or
floyd steinberg dither objects.
SEE ALSO
IM_ReleaseColourCube()
ImageManager.library/IM_ReleaseColourCube
NAME
IM_ReleaseColourCube -- Release a colour cube object
SYNOPSIS
IM_ReleaseColourCube(cube)
VOID IM_ReleaseColourCube(APTR)
FUNCTION
Release a previously obtained colour cube object.
INPUTS
cube = A colour cube obtained with IM_ObtainColourCube() or NULL.
RESULT
None.
NOTE
Releasing a colour cube object for a screen will free all pens that may
have been locked. So you generally shouldn't free this object, while
you're displaying image data that makes use of the colours obtained
through it.
SEE ALSO
IM_ObtainColourCube