[Igarden-commit] Garden/source/PlanTool PlanCanvasDefs.h, 1.5, 1.5.2.1 PlanCanvasView.h, 1.11.2.1,
Status: Beta
Brought to you by:
jlbedell
|
From: Jeffrey B. <jlb...@us...> - 2006-11-15 12:17:46
|
Update of /cvsroot/igarden/Garden/source/PlanTool In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv698 Modified Files: Tag: Release_branch_v1 PlanCanvasDefs.h PlanCanvasView.h PlanCanvasView.cpp PlanPaletteView.cpp Log Message: Create ability to have monochrome drawing styles Index: PlanCanvasDefs.h =================================================================== RCS file: /cvsroot/igarden/Garden/source/PlanTool/PlanCanvasDefs.h,v retrieving revision 1.5 retrieving revision 1.5.2.1 diff -C2 -d -r1.5 -r1.5.2.1 *** PlanCanvasDefs.h 20 Aug 2005 12:39:34 -0000 1.5 --- PlanCanvasDefs.h 15 Nov 2006 12:17:41 -0000 1.5.2.1 *************** *** 77,81 **** { kStyleDisplayDimensions, ! kStyleDisplayConceptSketchLine } styleCharacteristic_t; --- 77,83 ---- { kStyleDisplayDimensions, ! kStyleDisplayConceptSketchLine, ! kStyleDisplayColor, ! kStyleDisplay3D } styleCharacteristic_t; Index: PlanCanvasView.h =================================================================== RCS file: /cvsroot/igarden/Garden/source/PlanTool/PlanCanvasView.h,v retrieving revision 1.11.2.1 retrieving revision 1.11.2.2 diff -C2 -d -r1.11.2.1 -r1.11.2.2 *** PlanCanvasView.h 29 Oct 2006 03:31:24 -0000 1.11.2.1 --- PlanCanvasView.h 15 Nov 2006 12:17:41 -0000 1.11.2.2 *************** *** 118,121 **** --- 118,122 ---- pointList_t _lineList; long _currentStyle; + long _stylePluginIndex; RenderStylePlugin *_currentStylePlugin; XGDynArray<canvasState_t> _stateStack; Index: PlanCanvasView.cpp =================================================================== RCS file: /cvsroot/igarden/Garden/source/PlanTool/PlanCanvasView.cpp,v retrieving revision 1.13.2.2 retrieving revision 1.13.2.3 diff -C2 -d -r1.13.2.2 -r1.13.2.3 *** PlanCanvasView.cpp 1 Nov 2006 03:18:19 -0000 1.13.2.2 --- PlanCanvasView.cpp 15 Nov 2006 12:17:41 -0000 1.13.2.3 *************** *** 139,143 **** cnvErr_t result = kCanvasOK; ! if(_state->_lineType != kPlanConceptSketchLine || (_currentStylePlugin->ShouldDisplay(_currentStyle, kStyleDisplayConceptSketchLine) != kAlwaysOff)) { SetGLColor(); --- 139,143 ---- cnvErr_t result = kCanvasOK; ! if(_state->_lineType != kPlanConceptSketchLine || (_currentStylePlugin->ShouldDisplay(_stylePluginIndex, kStyleDisplayConceptSketchLine) != kAlwaysOff)) { SetGLColor(); *************** *** 167,171 **** cnvErr_t result = kCanvasOK; ! if(_state->_lineType != kPlanConceptSketchLine || (_currentStylePlugin->ShouldDisplay(_currentStyle, kStyleDisplayConceptSketchLine) != kAlwaysOff)) { SetGLColor(); --- 167,171 ---- cnvErr_t result = kCanvasOK; ! if(_state->_lineType != kPlanConceptSketchLine || (_currentStylePlugin->ShouldDisplay(_stylePluginIndex, kStyleDisplayConceptSketchLine) != kAlwaysOff)) { SetGLColor(); *************** *** 214,217 **** --- 214,219 ---- planScale_t scale; + _curMD->EnableColor(ShouldDisplay(kStyleDisplayColor)); + SetGLColor(); glLineWidth (1); *************** *** 241,244 **** --- 243,248 ---- cnvErr_t result; + _curMD->EnableColor(ShouldDisplay(kStyleDisplayColor)); + result = _curMD->DrawItem(mtype, center, spec); if(result == kCanvasNotHandled) *************** *** 255,258 **** --- 259,264 ---- cnvErr_t result = kCanvasNotHandled; + _curMD->EnableColor(ShouldDisplay(kStyleDisplayColor)); + result = _curMD->DrawGenericItem(mtype, center); if(result == kCanvasNotHandled) *************** *** 428,432 **** lineType_t PlanCanvasView::GetDefaultPaintLineType() { ! return _currentStylePlugin->GetDefaultPaintLineType(_currentStyle); } --- 434,438 ---- lineType_t PlanCanvasView::GetDefaultPaintLineType() { ! return _currentStylePlugin->GetDefaultPaintLineType(_stylePluginIndex); } *************** *** 457,461 **** long parentStyle, parentIndex; RenderStylePlugin *plugin; ! if(_renderStyles.Length() == 0) InitializeStyles(); --- 463,467 ---- long parentStyle, parentIndex; RenderStylePlugin *plugin; ! if(_renderStyles.Length() == 0) InitializeStyles(); *************** *** 467,470 **** --- 473,481 ---- _curMD = cur._stylePlugin->GetMaterialDrawInterface(cur._styleIndex); _currentStylePlugin = cur._stylePlugin; + _stylePluginIndex = cur._styleIndex; + + String str; + _currentStylePlugin->GetStyleName(_stylePluginIndex, str); + // printf("Switch(1) to style '%s'\n", str.c_str()); parentStyle = BasedUponStyle(); *************** *** 478,481 **** --- 489,493 ---- _curMD = _fallbackMD; InvalView(); + // printf("Switch(2) to style '%s'\n", str.c_str()); return kCanvasOK; *************** *** 520,528 **** bool result; switch(item) { ! case kStyleDisplayDimensions: // No preference for dimension on/off case kStyleDisplayConceptSketchLine: // or for style line display ! result = (_currentStylePlugin->ShouldDisplay(_currentStyle, item) != kAlwaysOff); break; } --- 532,546 ---- bool result; + String str; + _currentStylePlugin->GetStyleName(_stylePluginIndex, str); + //printf("ShouldDIsplay style '%s'\n", str.c_str()); + switch(item) { ! case kStyleDisplayDimensions: // No preference for dimension on/off case kStyleDisplayConceptSketchLine: // or for style line display ! case kStyleDisplayColor: // Separate style for plugin ! case kStyleDisplay3D: // and for 3D ! result = (_currentStylePlugin->ShouldDisplay(_stylePluginIndex, item) != kAlwaysOff); break; } *************** *** 680,684 **** XGUUID styleUID, nilID; ! styleUID = _currentStylePlugin->BasedUponStyle(_currentStyle); if(styleUID != nilID) { --- 698,702 ---- XGUUID styleUID, nilID; ! styleUID = _currentStylePlugin->BasedUponStyle(_stylePluginIndex); if(styleUID != nilID) { Index: PlanPaletteView.cpp =================================================================== RCS file: /cvsroot/igarden/Garden/source/PlanTool/PlanPaletteView.cpp,v retrieving revision 1.5.2.1 retrieving revision 1.5.2.2 diff -C2 -d -r1.5.2.1 -r1.5.2.2 *** PlanPaletteView.cpp 2 Nov 2006 23:41:19 -0000 1.5.2.1 --- PlanPaletteView.cpp 15 Nov 2006 12:17:41 -0000 1.5.2.2 *************** *** 99,103 **** SetLayout(_drawLayout); } ! RGGLSVGDraw draw; double length, width, scaleX, scaleY, baseScale, variantScale, scale; --- 99,103 ---- SetLayout(_drawLayout); } ! RGGLSVGDraw draw(kUseColor); double length, width, scaleX, scaleY, baseScale, variantScale, scale; |