Hint added.
[AROS.git] / workbench / c / Decoration / newimage.h
blob48ecacbc0ca040a808222644758c3a519252c732
1 /*
2 Copyright 2011, The AROS Development Team.
3 $Id$
4 */
6 #ifndef NEWIMAGE_H
7 #define NEWIMAGE_H
9 #include <exec/types.h>
10 #include <intuition/intuition.h>
11 #include <graphics/gfx.h>
13 struct TileInfo
15 UWORD TileLeft;
16 UWORD TileRight;
17 UWORD TileTop;
18 UWORD TileBottom;
21 struct NewImage
23 ULONG *data; /* Buffer of RAW ARGB data */
24 UWORD w;
25 UWORD h;
26 BOOL ok;
28 ULONG subimagescols; /* Number of columns of subimages in image, ie. states of gadget*/
29 ULONG subimagesrows; /* Number of rows of subimages in image, ie. states of gadget*/
30 BOOL *subimageinbm; /* Array marking which subimage is present in *bitmap */
32 Object *o; /* Stored DT object */
33 APTR mask; /* Mask pointer from DT object */
34 struct BitMap *bitmap; /* Bitmap pointer from DT object */
35 STRPTR filename;
37 struct BitMap *bitmap2; /* Allocated bitmap object */
40 struct NewLUT8Image
42 UWORD w;
43 UWORD h;
44 UBYTE *data;
47 struct NewImage *NewImageContainer(UWORD w, UWORD h);
48 struct NewImage *ScaleNewImage(struct NewImage * ni, UWORD neww, UWORD newh);
49 void DisposeImageContainer(struct NewImage *ni);
51 struct NewImage *GetImageFromFile(STRPTR path, STRPTR name,
52 ULONG expectedsubimagescols, ULONG expectedsubimagesrows);
53 struct NewImage * CreateNewImageContainerMatchingScreen(struct NewImage *in, BOOL truecolor, struct Screen* scr);
55 struct NewLUT8Image *NewLUT8ImageContainer(UWORD w, UWORD h);
56 void DisposeLUT8ImageContainer(struct NewLUT8Image *ni);
57 struct Region *RegionFromLUT8Image(int w, int h, struct NewLUT8Image *s);
59 ULONG * ScaleBuffer(ULONG * srcdata, LONG widthBuffer /* stride */,
60 LONG widthSrc, LONG heightSrc, LONG widthDest, LONG heightDest);
62 #endif