home *** CD-ROM | disk | FTP | other *** search
- // CBlock.h: CBlock header file
-
- #include "crect1.h"
- #include <stdlib.h>
-
- void Fill (int X, int Y, int Color);
-
- class CBlock : public CRectangle
- {
- protected:
- int FillColor;
-
- public:
- CBlock ()
- {
- FillColor = 0;
- }
- CBlock (int L, int T, int R, int B, int Color)
- : CRectangle (L, T, R, B)
- {
- SetColor (Color);
- }
- void Draw (void)
- {
- CRectangle::Draw ();
- Fill ((Left + Right) / 2, (Top + Bottom) / 2, FillColor);
- }
- void SetColor (int Color)
- {
- FillColor = __max (0, Color);
- }
- };
-