home *** CD-ROM | disk | FTP | other *** search
- TABLE OF CONTENTS
-
- bitmap_ic/--datasheet--
- bitmap_ic/BITMAP_GetClass
- bitmap_id/--datasheet-- bitmap_ic/--datasheet--
-
- NAME
- bitmap_ic -- Create image object using datatypes
-
- SUPERCLASS
- imageclass
-
- REQUIRES
- None.
-
- DESCRIPTION
- This image class can create an image given the name of a source
- file. It uses the datatypes system to create a bitmap used for
- rendering the image. Bitmap supports drawing itself in a selected
- state, and supports transparent images provided that the datatype
- supports transparency.
-
- Instead of a source file name, a ready-to-use bitmap can be passed
- with OM_NEW.
-
- METHODS
- OM_NEW -- Create the bitmap image. Passed to superclass, then OM_SET.
-
- OM_GET -- Get object attributes. Passed to superclass first.
-
- OM_SET -- Set object attributes. Passed to superclass first.
-
- OM_UPDATE -- Set object notification attributes. Passed to
- superclassfirst.
-
- IM_DRAW -- Renders the image. Overrides the superclass.
-
- All other methods are passed to the superclass, including OM_DISPOSE.
-
- ATTRIBUTES
- IA_TopEdge (WORD)
- IA_LeftEdge (WORD)
- IA_Width (WORD)
- IA_Height (WORD)
- Set position and size of the image. If given, these must be
- greater then or equal to the maximum dimensions of the bitmaps
- used.
-
- If the image size is larger than one of the bitmap sizes, the
- bitmap will be drawn centered within in the image. The area
- surrounding the bitmap is NOT erased!
-
- Defaults to the maximum of the dimensions of the normal and
- selected bitmaps.
-
- Applicability is (OM_NEW, OM_SET, OM_GET)
-
- BITMAP_SourceFile (STRPTR)
- Source file name of the image file to create the bitmap from,
- using the datatypes system.
-
- Applicability is (OM_NEW, OM_GET)
-
- BITMAP_Screen (struct Screen *)
- Pointer to the screen to use the image on. This attribute MUST
- be provided when creating an object of this class using the
- datatypes system.
-
- Applicability is (OM_NEW, OM_GET)
-
- BITMAP_Precision (ULONG)
- Precision to use when obtaining colors. See the PRECISION_
- defines in <graphics/view.h>
-
- Defaults to PRECISION_ICON.
-
- Applicability is (OM_NEW, OM_GET)
-
- BITMAP_Masking (BOOL)
- If set to TRUE, the image will be drawn using a transparent
- mask if the image source contains a transparent color.
-
- Defaults to FALSE.
-
- Applicability is (OM_NEW, OM_GET)
-
- BITMAP_BitMap (struct BitMap *)
- Instead of letting the class create the bitmap using datatypes,
- you can create your own bitmap and pass it to the class.
- If you supply your own bitmap, you MUST set BITMAP_Width
- and BITMAP_Height too.
- Either BITMAP_SourceFile or BITMAP_BitMap must be given.
-
- Applicability is (OM_NEW, OM_GET)
-
- BITMAP_Width (LONG)
- BITMAP_Height (LONG)
- Set the dimensions of your own bitmap passed with
- BITMAP_BitMap, or get the dimensions of the bitmap created
- by the datatype.
-
- Applicability is (OM_NEW, OM_GET)
-
- BITMAP_MaskPlane (APTR)
- A mask plane. Only set this if you supply your own bitmap
- with BITMAP_BitMap.
- The mask plane will only be used if BITMAP_Masking is TRUE.
-
- Defaults to NULL.
-
- Applicability is (OM_NEW, OM_GET)
-
- BITMAP_SelectSourceFile (STRPTR)
- Source file name of the selected state image to create the
- bitmap from, using the datatypes system.
-
- Applicability is (OM_NEW, OM_GET)
-
- BITMAP_SelectBitMap (struct BitMap *)
- Your own bitmap to use for the selected state.
- If you supply your own bitmap, you MUST set BITMAP_SelectWidth
- and BITMAP_SelectHeight too.
-
- Applicability is (OM_NEW, OM_GET)
-
- BITMAP_SelectWidth (LONG)
- BITMAP_SelectHeight (LONG)
- Set the dimensions of your own selected statebitmap passed
- with BITMAP_SelectBitMap, or get the dimensions of the selected
- state bitmap created by the datatype.
-
- Applicability is (OM_NEW, OM_GET)
-
- BITMAP_SelectMaskPlane (APTR)
- A mask plane for the selected state bitmap. Only set this if
- you supply your own bitmap with BITMAP_SelectBitMap.
- The mask plane will only be used if BITMAP_Masking is TRUE.
-
- Defaults to NULL.
-
- Applicability is (OM_NEW, OM_GET)
-
- BITMAP_OffsetX (LONG)
- BITMAP_OffsetY (LONG)
- Together with BITMAP_BitMap, BITMAP_Width and BITMAP_Height
- these attributes determine which part of the bitmap to use
- for the image.
- These attributes will be ignored if the bitmap was created
- by the class using datatypes.
-
- Defaults to 0.
-
- Applicability is (OM_NEW, OM_GET)
-
- BITMAP_SelectOffsetX (LONG)
- BITMAP_SelectOffsetY (LONG)
- Together with BITMAP_SelectBitMap, BITMAP_SelectWidth and
- BITMAP_SelectHeight these attributes determine which part
- of the bitmap to use for the selected state image.
- These attributes will be ignored if the bitmap was created
- by the class using datatypes.
-
- Defaults to 0.
-
- Applicability is (OM_NEW, OM_GET)
- bitmap_ic/BITMAP_GetClass bitmap_ic/BITMAP_GetClass
-
- NAME
- BITMAP_GetClass -- Gets the pointer to the bitmap class.
-
- SYNOPSIS
- bitmap_class = BITMAP_GetClass();
- D0
-
- Class * BITMAP_GetClass(VOID);
-
- FUNCTION
- Obtains the pointer to the BitMap image class for use with
- NewObject(). This function always returns a valid pointer so
- you do not need to check it. The reason is that if the library
- opens fine, then the pointer returned is already setup. (Of course
- this implies that if opening the library fails, you shouldn't be
- calling this.)
-
- Note that this function does not create the class, that is done
- when the class library is opened.
-
- INPUTS
- Nothing.
-
- RESULT
- bitmap_class - Pointer to the BitMap image class.
-
- SEE ALSO
-