home *** CD-ROM | disk | FTP | other *** search
Text File | 1997-07-20 | 1.5 KB | 75 lines | [TEXT/CWIE] |
- //Copyright (c) 1997 Aidan Cully
- //All rights reserved
-
- #include "CLRectShape.h"
- #include "CLDrawSlate.h"
-
- TRectShape::TRectShape( Rect bounds ):
- mBounds( bounds )
- {
- }
-
- TRectShape::TRectShape( short left, short top, short right, short bottom )
- {
- mBounds.left= left;
- mBounds.top= top;
- mBounds.right= right;
- mBounds.bottom= bottom;
- }
-
- TFillRectShape::TFillRectShape( Rect bounds, TStyle *style ):
- TRectShape( bounds ),
- mStyle( style )
- {
- }
-
- TFillRectShape::TFillRectShape( short left, short top, short right, short bottom, TStyle *style ):
- TRectShape( left, top, right, bottom ),
- mStyle( style )
- {
- }
-
- void TFillRectShape::RenderOn( TDrawSlate *gr )
- {
- gr->GetDrawFocus();
- mStyle->Apply();
- ::PaintRect( &mBounds );
- gr->ReleaseDrawFocus();
- }
-
- TFrameRectShape::TFrameRectShape( Rect bounds, TStyle *style ):
- TRectShape( bounds ),
- mStyle( style )
- {
- }
-
- TFrameRectShape::TFrameRectShape( short left, short top, short right, short bottom, TStyle *style ):
- TRectShape( left, top, right, bottom ),
- mStyle( style )
- {
- }
-
- void TFrameRectShape::RenderOn( TDrawSlate *gr )
- {
- gr->GetDrawFocus();
- mStyle->Apply();
- ::FrameRect( &mBounds );
- gr->ReleaseDrawFocus();
- }
-
- TEraseRectShape::TEraseRectShape( Rect bounds ):
- TRectShape( bounds )
- {
- }
-
- TEraseRectShape::TEraseRectShape( short left, short top, short right, short bottom ):
- TRectShape( left, top, right, bottom )
- {
- }
-
- void TEraseRectShape::RenderOn( TDrawSlate *gr )
- {
- gr->GetDrawFocus();
- ::EraseRect( &mBounds );
- gr->ReleaseDrawFocus();
- }