Only display the status if there is something to display
[AROS.git] / rom / graphics / setrast.c
blob1df0b8ad5f2752e0cd7c2f0f9b28337e6f5d3a9f
1 /*
2 Copyright © 1995-2007, The AROS Development Team. All rights reserved.
3 $Id$ $Log
5 Desc: Graphics function SetRast()
6 Lang: english
7 */
8 #include <graphics/rastport.h>
9 #include "graphics_intern.h"
10 #include "gfxfuncsupport.h"
12 /*****************************************************************************
14 NAME */
15 #include <graphics/rastport.h>
16 #include <proto/graphics.h>
18 AROS_LH2(void, SetRast,
20 /* SYNOPSIS */
21 AROS_LHA(struct RastPort *, rp, A1),
22 AROS_LHA(ULONG , pen, D0),
24 /* LOCATION */
25 struct GfxBase *, GfxBase, 39, Graphics)
27 /* FUNCTION
29 Set the entire contents of a specified RastPort to a specific colour.
31 INPUTS
33 rp -- pointer to the RastPort in question
34 pen -- pen number to set the bitmap pixels to
36 RESULT
38 All pixels are set to the colour corresponding to the specified pen
39 number.
41 NOTES
43 EXAMPLE
45 BUGS
47 SEE ALSO
49 RectFill(), <graphics/rastport.h>
51 INTERNALS
53 HISTORY
54 29-10-95 digulla automatically created from
55 graphics_lib.fd and clib/graphics_protos.h
57 *****************************************************************************/
59 AROS_LIBFUNC_INIT
61 /* We have to use layers to perform clipping */
62 struct BitMap *bm = rp->BitMap;
63 HIDDT_Pixel pixval;
65 ULONG width, height;
67 width = GetBitMapAttr(bm, BMA_WIDTH);
68 height = GetBitMapAttr(bm, BMA_HEIGHT);
69 pixval = BM_PIXEL(bm, pen);
71 fillrect_pendrmd(rp, 0, 0, width - 1, height - 1, pixval,
72 vHidd_GC_DrawMode_Copy, GfxBase);
74 AROS_LIBFUNC_EXIT
75 } /* SetRast */