2 Copyright © 1995-2007, The AROS Development Team. All rights reserved.
5 Desc: Get an attribute from a bitmap.
8 #include "graphics_intern.h"
9 #include "gfxfuncsupport.h"
10 #include <graphics/rastport.h>
12 /*****************************************************************************
15 #include <exec/types.h>
16 #include <graphics/gfx.h>
17 #include <proto/graphics.h>
19 AROS_LH2(IPTR
, GetBitMapAttr
,
22 AROS_LHA(struct BitMap
*, bitmap
, A0
),
23 AROS_LHA(ULONG
, attribute
, D1
),
26 struct GfxBase
*, GfxBase
, 160, Graphics
)
29 Returns a specific information about a bitmap. Do not access the
33 bitmap - The BitMap structure to get information about.
34 attribute - Number of the attribute to get. See <graphics/gfx.h> for
38 The information you requested. If you asked for an unknown attribute,
39 0 or NULL is returned.
53 29-10-95 digulla automatically created from
54 graphics_lib.fd and clib/graphics_protos.h
56 *****************************************************************************/
65 retval
= (IPTR
)bitmap
->Rows
;
69 /* must return width in pixel! */
70 retval
= (IPTR
)(bitmap
->BytesPerRow
* 8);
74 if (IS_HIDD_BM(bitmap
))
76 retval
= (IPTR
)HIDD_BM_REALDEPTH(bitmap
);
80 retval
= (IPTR
)bitmap
->Depth
;
85 retval
= (IPTR
)(bitmap
->Flags
& (BMF_DISPLAYABLE
|