2 Copyright © 1995-2011, The AROS Development Team. All rights reserved.
3 Copyright © 2001-2003, The MorphOS Development Team. All Rights Reserved.
7 #include <proto/graphics.h>
8 #include <proto/layers.h>
9 #include "intuition_intern.h"
10 #include <intuition/classusr.h>
12 #include <clib/alib_protos.h>
14 #include <proto/alib.h>
17 /*****************************************************************************
20 #include <graphics/rastport.h>
21 #include <graphics/rpattr.h>
22 #include <intuition/intuition.h>
23 #include <intuition/imageclass.h>
24 #include <proto/intuition.h>
26 AROS_LH4(void, EraseImage
,
29 AROS_LHA(struct RastPort
*, rp
, A0
),
30 AROS_LHA(struct Image
*, image
, A1
),
31 AROS_LHA(LONG
, leftOffset
, D0
),
32 AROS_LHA(LONG
, topOffset
, D1
),
35 struct IntuitionBase
*, IntuitionBase
, 105, Intuition
)
38 Erase an image on the screen.
41 rp - Render in this RastPort
42 image - Erase this image
43 leftOffset, topOffset - Add this offset the the position in the
56 DrawImage(), DrawImageState()
61 29-10-95 digulla automatically created from
62 intuition_lib.fd and clib/intuition_protos.h
63 23-10.96 aldi commited the code
65 *****************************************************************************/
69 struct GfxBase
*GfxBase
= GetPrivIBase(IntuitionBase
)->GfxBase
;
70 struct LayersBase
*LayersBase
= GetPrivIBase(IntuitionBase
)->LayersBase
;
71 EXTENDWORD(leftOffset
);
72 EXTENDWORD(topOffset
);
77 if (rp
->Layer
) LockLayer(0,rp
->Layer
);
81 if (image
->Depth
== CUSTOMIMAGEDEPTH
)
83 struct impErase method
;
88 GetRPAttrs(rp
,RPTAG_PenMode
,(ULONG
)&penmode
,TAG_DONE
);
91 method
.MethodID
= IM_ERASE
;
92 method
.imp_RPort
= rp
;
93 method
.imp_Offset
.X
= leftOffset
;
94 method
.imp_Offset
.Y
= topOffset
;
96 DoMethodA ((Object
*)image
, (Msg
)&method
);
99 SetRPAttrs(rp
,RPTAG_PenMode
,penmode
,TAG_DONE
);
105 leftOffset
+ image
->LeftEdge
,
106 topOffset
+ image
->TopEdge
,
107 leftOffset
+ image
->LeftEdge
+ image
->Width
,
108 topOffset
+ image
->TopEdge
+ image
->Height
113 if (rp
->Layer
) UnlockLayer(rp
->Layer
);