2 Copyright © 1995-2007, 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 *****************************************************************************/
49 First allocate a BitMap where the BitMap Data of the RastPort's
52 struct BitMap
* NewBM
;
54 NewBM
= AllocBitMap(GetBitMapAttr(cr
->BitMap
, BMA_WIDTH
) + 16,
55 GetBitMapAttr(cr
->BitMap
, BMA_HEIGHT
),
56 GetBitMapAttr(cr
->BitMap
, BMA_DEPTH
),
60 Save the displayed bitmap area to the new BitMap
67 ALIGN_OFFSET(cr
->bounds
.MinX
),
69 cr
->bounds
.MaxX
- cr
->bounds
.MinX
+ 1,
70 cr
->bounds
.MaxY
- cr
->bounds
.MinY
+ 1,
77 Display the contents of the ClipRect's BitMap.
81 ALIGN_OFFSET(cr
->bounds
.MinX
),
86 cr
->bounds
.MaxX
- cr
->bounds
.MinX
+ 1,
87 cr
->bounds
.MaxY
- cr
->bounds
.MinY
+ 1,
94 Free the 'old' BitMap of the ClipRect and hang the new BitMap into
95 the ClipRect structure.
97 FreeBitMap(cr
->BitMap
);
101 } /* SwapBitsRastPortClipRect */