[Igarden-commit] Garden/source/Plugins MaterialDrawPlugin.h, 1.9.2.1, 1.9.2.2 RenderPlugin.cpp, 1.1
Status: Beta
Brought to you by:
jlbedell
Update of /cvsroot/igarden/Garden/source/Plugins In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv730 Modified Files: Tag: Release_branch_v1 MaterialDrawPlugin.h RenderPlugin.cpp MaterialDrawSetup.h DefaultRenderPlugin.cpp MaterialDrawSetup.cpp Log Message: Create ability to have monochrome drawing styles Index: DefaultRenderPlugin.cpp =================================================================== RCS file: /cvsroot/igarden/Garden/source/Plugins/DefaultRenderPlugin.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 *** DefaultRenderPlugin.cpp 1 Nov 2006 03:10:10 -0000 1.13.2.2 --- DefaultRenderPlugin.cpp 15 Nov 2006 12:17:56 -0000 1.13.2.3 *************** *** 329,335 **** --- 329,337 ---- { case kStyleDisplayDimensions: + case kStyleDisplayColor: result = kAlwaysOn; break; case kStyleDisplayConceptSketchLine: + case kStyleDisplay3D: result = kAlwaysOff; break; *************** *** 741,745 **** else { ! RGGLSVGDraw draw; /*!!!ec =*/ draw.Draw(spec, center.xOffset, center.yOffset, _zSize, --- 743,747 ---- else { ! RGGLSVGDraw draw(_colorEnabled ? kUseColor : kUseMonochrome); /*!!!ec =*/ draw.Draw(spec, center.xOffset, center.yOffset, _zSize, Index: MaterialDrawSetup.h =================================================================== RCS file: /cvsroot/igarden/Garden/source/Plugins/MaterialDrawSetup.h,v retrieving revision 1.3.2.1 retrieving revision 1.3.2.2 diff -C2 -d -r1.3.2.1 -r1.3.2.2 *** MaterialDrawSetup.h 29 Oct 2006 03:31:48 -0000 1.3.2.1 --- MaterialDrawSetup.h 15 Nov 2006 12:17:56 -0000 1.3.2.2 *************** *** 36,39 **** --- 36,40 ---- virtual void SetYear(itemYear_t year); virtual void SetGroupBounds(planRectangle_t bounds); + virtual void EnableColor(bool isEnabled); protected: *************** *** 61,64 **** --- 62,66 ---- itemYear_t _year; planRectangle_t _groupBounds; + bool _colorEnabled; }; Index: MaterialDrawPlugin.h =================================================================== RCS file: /cvsroot/igarden/Garden/source/Plugins/MaterialDrawPlugin.h,v retrieving revision 1.9.2.1 retrieving revision 1.9.2.2 diff -C2 -d -r1.9.2.1 -r1.9.2.2 *** MaterialDrawPlugin.h 29 Oct 2006 03:31:48 -0000 1.9.2.1 --- MaterialDrawPlugin.h 15 Nov 2006 12:17:56 -0000 1.9.2.2 *************** *** 60,63 **** --- 60,64 ---- virtual void SetYear(itemYear_t year) = 0; virtual void SetGroupBounds(planRectangle_t bounds) = 0; + virtual void EnableColor(bool isEnabled) = 0; virtual cnvErr_t DrawItem(materialType_t mtype, planPoint_t center, XGFileSpecifier &spec) = 0; Index: RenderPlugin.cpp =================================================================== RCS file: /cvsroot/igarden/Garden/source/Plugins/RenderPlugin.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 *** RenderPlugin.cpp 2 Nov 2006 23:44:34 -0000 1.13.2.2 --- RenderPlugin.cpp 15 Nov 2006 12:17:56 -0000 1.13.2.3 *************** *** 34,38 **** const revision_t pluginRev = { 1, 0 }; const revision_t interfaceRev = { 1, 0 }; ! const long numStyles = 2; #define kDefaultStyleFactoryID (CFUUIDGetConstantUUIDWithBytes(NULL, 0x95, 0xD0, 0x14, 0x92, 0x0D, 0x05, 0x11, 0xDA, 0xAB, 0x89, 0xC4, 0x67, 0xFD, 0x39, 0x7B, 0x7A)) --- 34,38 ---- const revision_t pluginRev = { 1, 0 }; const revision_t interfaceRev = { 1, 0 }; ! const long numStyles = 3; #define kDefaultStyleFactoryID (CFUUIDGetConstantUUIDWithBytes(NULL, 0x95, 0xD0, 0x14, 0x92, 0x0D, 0x05, 0x11, 0xDA, 0xAB, 0x89, 0xC4, 0x67, 0xFD, 0x39, 0x7B, 0x7A)) *************** *** 267,271 **** yaaf::uuid_t uidStruct1 = { 0x99444914, 0x0935, 0x11DA, 0xAB, 0x89, 0xC4, 0x67, 0xFD, 0x39, 0x7B, 0x7A }; yaaf::uuid_t uidStruct2 = { 0x350F3AB0, 0x0C0C, 0x11DA, 0xAB, 0x89, 0xC4, 0x67, 0xFD, 0x39, 0x7B, 0x7A }; ! PRECONDITION(index < numStyles); switch(index) --- 267,271 ---- yaaf::uuid_t uidStruct1 = { 0x99444914, 0x0935, 0x11DA, 0xAB, 0x89, 0xC4, 0x67, 0xFD, 0x39, 0x7B, 0x7A }; yaaf::uuid_t uidStruct2 = { 0x350F3AB0, 0x0C0C, 0x11DA, 0xAB, 0x89, 0xC4, 0x67, 0xFD, 0x39, 0x7B, 0x7A }; ! yaaf::uuid_t uidStruct3 = { 0x97fa73e9, 0xecff, 0x47c1, 0xa9, 0x96, 0x02, 0x5f, 0x4d, 0x0d, 0x3c, 0x5e }; PRECONDITION(index < numStyles); switch(index) *************** *** 277,280 **** --- 277,283 ---- uid.ConvertFromBytes((unsigned char*)&uidStruct2); break; + case 2: + uid.ConvertFromBytes((unsigned char*)&uidStruct3); + break; } return kCanvasOK; *************** *** 294,298 **** break; case 1: ! name.SetCString("Presentation"); break; } --- 297,304 ---- break; case 1: ! name.SetCString("Presentation (Monochrome)"); ! break; ! case 2: ! name.SetCString("Presentation (Color)"); break; } *************** *** 324,327 **** --- 330,334 ---- break; case 1: + case 2: return _presentationMaterialDraw; break; *************** *** 354,357 **** --- 361,373 ---- result = kAlwaysOff; break; + case kStyleDisplayColor: + if(index == 2) + result = kAlwaysOn; + else + result = kAlwaysOff; + break; + case kStyleDisplay3D: + result = kAlwaysOff; + break; } *************** *** 491,495 **** else { ! RGGLSVGDraw draw; ErrorCode ec; --- 507,511 ---- else { ! RGGLSVGDraw draw(kUseMonochrome); ErrorCode ec; *************** *** 695,699 **** cnvErr_t PresentationMaterialDraw::DrawItem(materialType_t mtype, planPoint_t center, XGFileSpecifier &spec) { ! RGGLSVGDraw draw; ErrorCode ec; --- 711,715 ---- cnvErr_t PresentationMaterialDraw::DrawItem(materialType_t mtype, planPoint_t center, XGFileSpecifier &spec) { ! RGGLSVGDraw draw(_colorEnabled ? kUseColor : kUseMonochrome); ErrorCode ec; *************** *** 708,712 **** { XGFileSpecifier spec; ! RGGLSVGDraw draw; const char *filename; ErrorCode ec; --- 724,728 ---- { XGFileSpecifier spec; ! RGGLSVGDraw draw(_colorEnabled ? kUseColor : kUseMonochrome); const char *filename; ErrorCode ec; Index: MaterialDrawSetup.cpp =================================================================== RCS file: /cvsroot/igarden/Garden/source/Plugins/MaterialDrawSetup.cpp,v retrieving revision 1.3.2.1 retrieving revision 1.3.2.2 diff -C2 -d -r1.3.2.1 -r1.3.2.2 *** MaterialDrawSetup.cpp 29 Oct 2006 03:31:48 -0000 1.3.2.1 --- MaterialDrawSetup.cpp 15 Nov 2006 12:17:56 -0000 1.3.2.2 *************** *** 133,134 **** --- 133,143 ---- _groupBounds = bounds; } + + // --------------------------------------------------------------------------- + /// EnableColor + // + void MaterialDrawSetup::EnableColor(bool isEnabled) + { + _colorEnabled = isEnabled; + } + |