some fixes to accented characters
[tangerine.git] / rom / intuition / eraseimage.c
blob48fdd21f1fee4853f8c85e8b095dac12cfa46e60
1 /*
2 Copyright © 1995-2007, The AROS Development Team. All rights reserved.
3 Copyright © 2001-2003, The MorphOS Development Team. All Rights Reserved.
4 $Id$
5 */
7 #include <proto/graphics.h>
8 #include <proto/layers.h>
9 #include "intuition_intern.h"
10 #include <intuition/classusr.h>
11 #ifdef __MORPHOS__
12 #include <clib/alib_protos.h>
13 #else
14 #include <proto/alib.h>
15 #endif
17 /*****************************************************************************
19 NAME */
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,
28 /* SYNOPSIS */
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),
34 /* LOCATION */
35 struct IntuitionBase *, IntuitionBase, 105, Intuition)
37 /* FUNCTION
38 Erase an image on the screen.
40 INPUTS
41 rp - Render in this RastPort
42 image - Erase this image
43 leftOffset, topOffset - Add this offset the the position in the
44 image.
46 RESULT
47 None.
49 NOTES
51 EXAMPLE
53 BUGS
55 SEE ALSO
56 DrawImage(), DrawImageState()
58 INTERNALS
60 HISTORY
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 *****************************************************************************/
67 AROS_LIBFUNC_INIT
69 EXTENDWORD(leftOffset);
70 EXTENDWORD(topOffset);
72 SANITY_CHECK(rp)
73 SANITY_CHECK(image)
75 if (rp->Layer) LockLayer(0,rp->Layer);
77 if (image != NULL)
79 if (image->Depth == CUSTOMIMAGEDEPTH)
81 struct impErase method;
82 IPTR penmode;
84 #ifdef __MORPHOS__
85 GetRPAttrs(rp,RPTAG_PenMode,(ULONG)&penmode,TAG_DONE);
86 #endif
88 method.MethodID = IM_ERASE;
89 method.imp_RPort = rp;
90 method.imp_Offset.X = leftOffset;
91 method.imp_Offset.Y = topOffset;
93 DoMethodA ((Object *)image, (Msg)&method);
95 #ifdef __MORPHOS__
96 SetRPAttrs(rp,RPTAG_PenMode,penmode,TAG_DONE);
97 #endif
99 else
101 EraseRect (rp,
102 leftOffset + image->LeftEdge,
103 topOffset + image->TopEdge,
104 leftOffset + image->LeftEdge + image->Width,
105 topOffset + image->TopEdge + image->Height
110 if (rp->Layer) UnlockLayer(rp->Layer);
112 AROS_LIBFUNC_EXIT
113 } /* EraseImage */