tools/adflib: build only host variant which is used by Sam440 target
[AROS.git] / rom / graphics / copysbitmap.c
blob1668700adcfcd34b7ee2d1a365cccfae5d96fd64
1 /*
2 Copyright © 1995-2007, The AROS Development Team. All rights reserved.
3 $Id$
5 Desc: Graphics function CopySBitMap()
6 Lang: english
7 */
8 #include <graphics/layers.h>
9 #include <graphics/clip.h>
10 #include "graphics_intern.h"
12 /*****************************************************************************
14 NAME */
15 #include <proto/graphics.h>
17 AROS_LH1(void, CopySBitMap,
19 /* SYNOPSIS */
20 AROS_LHA(struct Layer *, l, A0),
22 /* LOCATION */
23 struct GfxBase *, GfxBase, 75, Graphics)
25 /* FUNCTION
26 If the layer has a superbitmap all the parts that are visible will
27 be refreshed with what is in the superbitmap. This function should
28 be called after the SuperBitMap of the layer was synchronized with
29 SyncSBitMap() and manipulated.
31 INPUTS
32 l - pointer to superbitmapped layer
34 RESULT
35 The layer will show the true contents of the superbitmap that is
36 attached to it
38 NOTES
40 EXAMPLE
42 BUGS
44 SEE ALSO
45 SyncSBitMap()
47 INTERNALS
49 HISTORY
51 *****************************************************************************/
53 AROS_LIBFUNC_INIT
55 struct ClipRect * CR = l->ClipRect;
57 if (NULL == l->SuperBitMap || (l->Flags & LAYERSUPER) == 0)
58 return;
60 while (NULL != CR)
62 /* a cliprect of a superbitmapped layer is visible if lobs==NULL,
63 only these I have to copy into the rastport's bitmap */
64 if (NULL == CR->lobs)
66 /* I have to backup this part into the SuperBitMap! I find the
67 data in the bitmap of the rastport of this layer */
68 BltBitMap(l->SuperBitMap,
69 CR->bounds.MinX - l->bounds.MinX - l->Scroll_X,
70 CR->bounds.MinY - l->bounds.MinY - l->Scroll_Y,
71 l->rp->BitMap,
72 CR->bounds.MinX,
73 CR->bounds.MinY,
74 CR->bounds.MaxX - CR->bounds.MinX + 1,
75 CR->bounds.MaxY - CR->bounds.MinY + 1,
76 0x0c0,
77 0xff,
78 NULL
81 CR = CR->Next;
84 AROS_LIBFUNC_EXIT
85 } /* CopySBitMap */