2 Copyright © 1995-2001, The AROS Development Team. All rights reserved.
8 #include <aros/libcall.h>
9 #include <proto/layers.h>
10 #include <proto/graphics.h>
11 #include "layers_intern.h"
13 /*****************************************************************************
17 AROS_LH2(void, SwapBitsRastPortClipRect
,
20 AROS_LHA(struct RastPort
*, rp
, A0
),
21 AROS_LHA(struct ClipRect
*, cr
, A1
),
24 struct LayersBase
*, LayersBase
, 21, Layers
)
44 *****************************************************************************/
47 AROS_LIBBASE_EXT_DECL(struct LayersBase
*,LayersBase
)
50 First allocate a BitMap where the BitMap Data of the RastPort's
53 struct BitMap
* NewBM
;
55 NewBM
= AllocBitMap(GetBitMapAttr(cr
->BitMap
, BMA_WIDTH
) + 16,
56 GetBitMapAttr(cr
->BitMap
, BMA_HEIGHT
),
57 GetBitMapAttr(cr
->BitMap
, BMA_DEPTH
),
61 Save the displayed bitmap area to the new BitMap
68 ALIGN_OFFSET(cr
->bounds
.MinX
),
70 cr
->bounds
.MaxX
- cr
->bounds
.MinX
+ 1,
71 cr
->bounds
.MaxY
- cr
->bounds
.MinY
+ 1,
78 Display the contents of the ClipRect's BitMap.
82 ALIGN_OFFSET(cr
->bounds
.MinX
),
87 cr
->bounds
.MaxX
- cr
->bounds
.MinX
+ 1,
88 cr
->bounds
.MaxY
- cr
->bounds
.MinY
+ 1,
95 Free the 'old' BitMap of the ClipRect and hang the new BitMap into
96 the ClipRect structure.
98 FreeBitMap(cr
->BitMap
);
102 } /* SwapBitsRastPortClipRect */