// $Revision: 1.2 $ // OutlineFeedbackStyle.C // Copyright (C) 1994, 1995 Taligent, Inc. All rights reserved. #include "OutlineFeedbackStyle.h" #ifndef Taligent_BASEGEOMETRY #include #endif #ifndef Taligent_RGBCOLOR #include #endif #ifndef Taligent_BUNDLES #include #endif #ifndef Taligent_DELETERFOR #include #endif #ifndef Taligent_GRAPHICS #include #endif //-------------------------- Class TBoundsFeedbackStyle ------------------- MGraphic* TOutlineFeedbackStyle::DoCreateFeedback(const TGArea& bounds) const { static const TRGBColor kWhite(1,1,1); static const TRGBColor kBlack(0,0,0); static const GCoordinate width = 1; TDeleterFor group = new TGraphicGroup(); TDeleterFor bundle = new TGrafBundle(new TColorPaint(kWhite), TAttributeState::kFrame); bundle->AdoptFramePen(new TSolidPen(width, TPen::kInsetFrame)); group->AdoptLast(new TArea(bounds, bundle.OrphanObject())); bundle = new TGrafBundle(new TColorPaint(kBlack), TAttributeState::kFrame); bundle->AdoptFramePen(new TSolidPen(width, TPen::kOutsetFrame)); group->AdoptLast(new TArea(bounds, bundle.OrphanObject())); return group.OrphanObject(); }