2 * $Source: s:/prj/tech/libsrc/font/RCS/strclr.c $
5 * $Date: 1996/04/11 10:25:29 $
7 * Clipped string clear routine.
9 * This file is part of the font library.
16 /* clear a string to the background color, with clipping. */
18 int gr_font_string_clear (grs_font
*f
, char *s
, short x
, short y
)
20 short w
, h
; /* extent of string */
21 long c
; /* saved foreground color */
22 int r
; /* return clip code */
25 gr_set_fcolor (gr_get_bcolor ());
26 gr_font_string_size (f
, s
, &w
, &h
);
27 r
= gr_rect (x
, y
, x
+w
, y
+h
);
32 /* clear a string to the background color, unclipped. */
34 void gr_font_string_uclear (grs_font
*f
, char *s
, short x
, short y
)
36 short w
, h
; /* extent of string */
37 long c
; /* saved foreground color */
40 gr_set_fcolor (gr_get_bcolor());
41 gr_font_string_size (f
, s
, &w
, &h
);
42 gr_urect (x
, y
, x
+w
, y
+h
);