igarden-commit Mailing List for GardenSketch (Page 5)
Status: Beta
Brought to you by:
jlbedell
You can subscribe to this list here.
| 2006 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(24) |
Nov
(77) |
Dec
(122) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2007 |
Jan
(103) |
Feb
(278) |
Mar
(130) |
Apr
(66) |
May
(56) |
Jun
(31) |
Jul
(94) |
Aug
(73) |
Sep
(22) |
Oct
(306) |
Nov
(52) |
Dec
|
| 2008 |
Jan
(27) |
Feb
(90) |
Mar
(218) |
Apr
(145) |
May
(114) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|
From: Jeffrey B. <jlb...@us...> - 2008-05-10 02:52:42
|
Update of /cvsroot/igarden/Garden/source/Document In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv27051/source/Document Modified Files: Tag: Release_branch_v1 ClientDocument.cpp CGardenForm.cpp CGardenPanel.h Log Message: Font picker in prferences now changes the list view font in real time. Index: CGardenForm.cpp =================================================================== RCS file: /cvsroot/igarden/Garden/source/Document/CGardenForm.cpp,v retrieving revision 1.4.2.11 retrieving revision 1.4.2.12 diff -C2 -d -r1.4.2.11 -r1.4.2.12 *** CGardenForm.cpp 12 Apr 2008 22:40:04 -0000 1.4.2.11 --- CGardenForm.cpp 10 May 2008 02:52:20 -0000 1.4.2.12 *************** *** 1595,1598 **** --- 1595,1599 ---- Layout *layout; String regionStr; + long n, numPanels; PersistentTags *prefs = static_cast<PersistentTags*>(parg); *************** *** 1607,1610 **** --- 1608,1618 ---- } } + + numPanels = _panels.Length(); + for(n = 0; n < numPanels; n++) + { + _panels[n]->DoPrefsStateChanged(arg, parg); + } + return -1; // Let everyone else hear this } Index: ClientDocument.cpp =================================================================== RCS file: /cvsroot/igarden/Garden/source/Document/ClientDocument.cpp,v retrieving revision 1.6.2.11 retrieving revision 1.6.2.12 diff -C2 -d -r1.6.2.11 -r1.6.2.12 *** ClientDocument.cpp 16 Apr 2008 02:50:03 -0000 1.6.2.11 --- ClientDocument.cpp 10 May 2008 02:52:17 -0000 1.6.2.12 *************** *** 159,162 **** --- 159,164 ---- _layout = new Layout(this); _prefs = new DocumentTags(); + _prefs->CopyGlobalTags(); + #if JOURNAL_PORT _journal = new JournalDB(this); *************** *** 465,468 **** --- 467,471 ---- _dbOpened = true; _prefs = new DocumentTags(); + _prefs->CopyGlobalTags(); _layout = new Layout(this); #if JOURNAL_PORT *************** *** 1074,1077 **** --- 1077,1081 ---- { _prefs = new DocumentTags(); + _prefs->CopyGlobalTags(); _prefs->ParseXML(data->GetChild()); found = true; Index: CGardenPanel.h =================================================================== RCS file: /cvsroot/igarden/Garden/source/Document/CGardenPanel.h,v retrieving revision 1.8.2.5 retrieving revision 1.8.2.6 diff -C2 -d -r1.8.2.5 -r1.8.2.6 *** CGardenPanel.h 19 Mar 2008 01:20:40 -0000 1.8.2.5 --- CGardenPanel.h 10 May 2008 02:52:20 -0000 1.8.2.6 *************** *** 98,101 **** --- 98,102 ---- virtual long DoModifyMenu( long arg, void* parg ); virtual long DoTooltipStart( long arg, void* parg ); + virtual long DoPrefsStateChanged( long arg, void* /*parg*/ ) {} virtual void PrintHeader(XGDraw& draw, UInt32 pageNum, UInt32 maxPages, Point printSize); |
|
From: Jeffrey B. <jlb...@us...> - 2008-05-10 02:08:28
|
Update of /cvsroot/igarden/CommonSource/YAAFExtensions In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv29392/YAAFExtensions Modified Files: Tag: Release_branch_v1 RGGLView.cpp Log Message: Correct printing issue on Macintel (colors reversed). Index: RGGLView.cpp =================================================================== RCS file: /cvsroot/igarden/CommonSource/YAAFExtensions/RGGLView.cpp,v retrieving revision 1.11.2.7 retrieving revision 1.11.2.8 diff -C2 -d -r1.11.2.7 -r1.11.2.8 *** RGGLView.cpp 8 Nov 2007 13:18:08 -0000 1.11.2.7 --- RGGLView.cpp 10 May 2008 02:08:21 -0000 1.11.2.8 *************** *** 354,358 **** --- 354,362 ---- if(_printfOffscreen == NULL) + #if OPT_NATIVEORDER _printfOffscreen = new CGWorld(localRect); + #else + _printfOffscreen = new CGWorld(localRect, k32BGRAPixelFormat); + #endif DrawToCGWorld(printRect, _printfOffscreen); _printfOffscreen->CopyImage(printRect); |
|
From: Jeffrey B. <jlb...@us...> - 2008-05-10 00:26:49
|
Update of /cvsroot/igarden/Garden/source/SourceMaterialDB In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv10812/source/SourceMaterialDB Modified Files: Tag: Release_branch_v1 QueryDialog.cpp Log Message: Fix problems with color picker in query dialog Index: QueryDialog.cpp =================================================================== RCS file: /cvsroot/igarden/Garden/source/SourceMaterialDB/QueryDialog.cpp,v retrieving revision 1.25.2.7 retrieving revision 1.25.2.8 diff -C2 -d -r1.25.2.7 -r1.25.2.8 *** QueryDialog.cpp 21 Mar 2008 21:48:34 -0000 1.25.2.7 --- QueryDialog.cpp 10 May 2008 00:26:54 -0000 1.25.2.8 *************** *** 700,703 **** --- 700,704 ---- colorCell->AddColor(color, colorVal); } + table->SetSelectRow(-1); break; *************** *** 1036,1039 **** --- 1037,1041 ---- cell->SetColorMenu(menuRef, 0, kClearColors); table->EnableDrawing(); + table->AddReceiver(this); break; *************** *** 1479,1482 **** --- 1481,1485 ---- panels->ChangeCurrentPanel(pop->GetValue()); EnableActivePanels(); + SetupControlsFromAttributes(); } else if(arg == kQueryType) |
|
From: Jeffrey B. <jlb...@us...> - 2008-05-09 13:31:30
|
Update of /cvsroot/igarden/Garden/source/LayoutDB In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv4827/source/LayoutDB Modified Files: Tag: Release_branch_v1 UserTextBox.cpp Log Message: Clip horizontally if the text box is too narrow Index: UserTextBox.cpp =================================================================== RCS file: /cvsroot/igarden/Garden/source/LayoutDB/UserTextBox.cpp,v retrieving revision 1.11.2.4 retrieving revision 1.11.2.5 diff -C2 -d -r1.11.2.4 -r1.11.2.5 *** UserTextBox.cpp 26 Mar 2008 22:21:46 -0000 1.11.2.4 --- UserTextBox.cpp 9 May 2008 13:30:43 -0000 1.11.2.5 *************** *** 192,195 **** --- 192,200 ---- _sizeX = rect.xSize-(2*xInset*_defaultScale); _sizeY = rect.ySize-(2*yInset*_defaultScale); + if(_sizeX < 0) + _sizeX = 0; + if(_sizeY < 0) + _sizeY = 0; + _x = _boundX; _y = _boundY+_sizeY; *************** *** 465,471 **** void UserTextBox::HandleWord(PlanView* view, RGGLBitmapFont *font, const char *txt, long len) { ! double width; ! PRECONDITION(_sizeX > 0.0 && _sizeY > 0.0); while(*txt == '\n' && len > 0) --- 470,476 ---- void UserTextBox::HandleWord(PlanView* view, RGGLBitmapFont *font, const char *txt, long len) { ! double width, origWidth; ! PRECONDITION(_sizeX >= 0.0 && _sizeY >= 0.0); while(*txt == '\n' && len > 0) *************** *** 481,494 **** width = font->StringWidth(txt, len);// * _scaleByPercent/100.0; ! if((_x + (width * view->GetScale()/*_defaultScale*/)) >= (_boundX+_sizeX)) { ! _x = _boundX; ! _y -= _lineHeight * view->GetScale(); } ! if(_y > _boundY) { ! font->DrawCountedString(_x, _y, view->GetScale(), txt, len); ! _x += width * view->GetScale(); //_defaultScale; } } --- 486,506 ---- width = font->StringWidth(txt, len);// * _scaleByPercent/100.0; ! if(_y > _boundY) { ! origWidth = width; ! while((_x + (width * view->GetScale())) > (_boundX+_sizeX)) ! { ! len--; ! width = font->StringWidth(txt, len); ! } ! ! font->DrawCountedString(_x, _y, view->GetScale(), txt, len); ! _x += origWidth * view->GetScale(); //_defaultScale; } ! if((_x + (width * view->GetScale()/*_defaultScale*/)) >= (_boundX+_sizeX)) { ! _x = _boundX; ! _y -= _lineHeight * view->GetScale(); } } |
|
From: Jeffrey B. <jlb...@us...> - 2008-05-09 13:10:21
|
Update of /cvsroot/igarden/CommonSource/YAAFExtensions In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv30157/YAAFExtensions Modified Files: Tag: Release_branch_v1 RGTableView.cpp Log Message: Clean up drawing of table without title header (was thick black line on top) Index: RGTableView.cpp =================================================================== RCS file: /cvsroot/igarden/CommonSource/YAAFExtensions/RGTableView.cpp,v retrieving revision 1.28.2.38 retrieving revision 1.28.2.39 diff -C2 -d -r1.28.2.38 -r1.28.2.39 *** RGTableView.cpp 16 Apr 2008 02:48:35 -0000 1.28.2.38 --- RGTableView.cpp 9 May 2008 13:10:09 -0000 1.28.2.39 *************** *** 1396,1479 **** long numColumns; ! if(isPrinter) ! cr = r; ! else ! cr = GetContentRect(); ! hdr = cr; ! hdr.bottom = _titleHeight; ! draw.ClipRect(&hdr); ! ! draw.SetFontObject(_font); ! len = _columnTitles.GetNumStrings(); ! s = hdr; ! s.left -= x; ! rightEdge = s.left; ! numColumns = _colArray.Length(); ! ! DrawHeaderButton(draw, s, kButtonSetup, isPrinter); ! for (i = 0; i < numColumns; i++) { ! s.right = s.left + _colArray[i]->width; ! if(_colArray[i]->visible && (!isPrinter || (s.right <= r.right))) { ! if(isPrinter) ! draw.FillRect(s, kTableGreyColor); ! #if OPT_MACOS == 0 ! else if(_colArray[i]->display) ! draw.FillRect(s, kTableReadOnlyColor); ! #endif ! else ! { ! DrawHeaderButton(draw, s, kButtonDrawStd, isPrinter); ! } ! rt = s; ! if(i >= 0 && i < len) { - _columnTitles.GetString(i,buf); if(isPrinter) { ! draw.SetForeColor(KXGColorBlack); ! draw.SetBackColor(KXGColorWhite); } ! else if((i == _highlightCol) || ! ((i == _selCol) && (_selRow == -1))) { ! DrawHeaderButton(draw, s, kButtonDrawSelected, isPrinter); ! if(_selectColIcon != 0) ! draw.DrawIcon(_selectColIcon, s.right-13, s.top+3, 10, 5); } - draw.MoveTo(hdr.left+3,hdr.top + draw.GetFontAscent()); - // Start 1/2 a font height down (mult *1.5) ! Rect rtText = rt; ! // rtText.top += draw.GetFontAscent(); ! rtText.top += (_titleHeight - RGTableCell::SizeWrappedText(draw, rt, buf))/2; ! RGTableCell::DrawWrappedText(draw,kCenterJust,rtText,buf); } - - draw.SetForeColor(KXGColorBlack); - rt.right++; - draw.FrameRect(rt); - - s.left = s.right; - rightEdge = s.right; } ! } ! DrawHeaderButton(draw, s, kButtonCleanup, isPrinter); ! if(s.right < hdr.right) ! { ! rt = hdr; ! rt.left = rightEdge+1; ! draw.EraseRect(rt); } - - draw.SetForeColor(KXGColorBlack); - draw.ClipRect(NULL); - draw.SetPenWidth(2); - draw.MoveTo(hdr.left,hdr.bottom); - draw.LineTo(hdr.right,hdr.bottom); - draw.SetPenWidth(1); } --- 1396,1482 ---- long numColumns; ! if(_titleHeight != 0) { ! if(isPrinter) ! cr = r; ! else ! cr = GetContentRect(); ! hdr = cr; ! hdr.bottom = _titleHeight; ! draw.ClipRect(&hdr); ! draw.SetFontObject(_font); ! len = _columnTitles.GetNumStrings(); ! s = hdr; ! s.left -= x; ! rightEdge = s.left; ! numColumns = _colArray.Length(); ! ! DrawHeaderButton(draw, s, kButtonSetup, isPrinter); ! for (i = 0; i < numColumns; i++) { ! s.right = s.left + _colArray[i]->width; ! ! if(_colArray[i]->visible && (!isPrinter || (s.right <= r.right))) { if(isPrinter) + draw.FillRect(s, kTableGreyColor); + #if OPT_MACOS == 0 + else if(_colArray[i]->display) + draw.FillRect(s, kTableReadOnlyColor); + #endif + else { ! DrawHeaderButton(draw, s, kButtonDrawStd, isPrinter); } ! rt = s; ! if(i >= 0 && i < len) { ! _columnTitles.GetString(i,buf); ! if(isPrinter) ! { ! draw.SetForeColor(KXGColorBlack); ! draw.SetBackColor(KXGColorWhite); ! } ! else if((i == _highlightCol) || ! ((i == _selCol) && (_selRow == -1))) ! { ! DrawHeaderButton(draw, s, kButtonDrawSelected, isPrinter); ! if(_selectColIcon != 0) ! draw.DrawIcon(_selectColIcon, s.right-13, s.top+3, 10, 5); ! } ! draw.MoveTo(hdr.left+3,hdr.top + draw.GetFontAscent()); ! // Start 1/2 a font height down (mult *1.5) ! ! Rect rtText = rt; ! // rtText.top += draw.GetFontAscent(); ! rtText.top += (_titleHeight - RGTableCell::SizeWrappedText(draw, rt, buf))/2; ! RGTableCell::DrawWrappedText(draw,kCenterJust,rtText,buf); } ! draw.SetForeColor(KXGColorBlack); ! rt.right++; ! draw.FrameRect(rt); ! ! s.left = s.right; ! rightEdge = s.right; } } ! DrawHeaderButton(draw, s, kButtonCleanup, isPrinter); ! if(s.right < hdr.right) ! { ! rt = hdr; ! rt.left = rightEdge+1; ! draw.EraseRect(rt); ! } ! ! draw.SetForeColor(KXGColorBlack); ! draw.ClipRect(NULL); ! draw.SetPenWidth(2); ! draw.MoveTo(hdr.left,hdr.bottom); ! draw.LineTo(hdr.right,hdr.bottom); ! draw.SetPenWidth(1); } } |
|
From: Jeffrey B. <jlb...@us...> - 2008-05-09 01:08:26
|
Update of /cvsroot/igarden/Garden/source/LayoutDB In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv23644/source/LayoutDB Modified Files: Tag: Release_branch_v1 TextBox.cpp Log Message: Textbox and titlebox fixes Index: TextBox.cpp =================================================================== RCS file: /cvsroot/igarden/Garden/source/LayoutDB/TextBox.cpp,v retrieving revision 1.16.2.6 retrieving revision 1.16.2.7 diff -C2 -d -r1.16.2.6 -r1.16.2.7 *** TextBox.cpp 26 Mar 2008 22:21:38 -0000 1.16.2.6 --- TextBox.cpp 9 May 2008 01:08:26 -0000 1.16.2.7 *************** *** 443,446 **** --- 443,448 ---- planLength_t top, left, bottom, right; double scale, spacing, radius, out; + borderType_t btype; + planLength_t minSize; top = _rectangle.yOffset+_rectangle.ySize; *************** *** 471,475 **** view->SetLineColorToDefault(); view->SetGLColor(); ! switch(_borderType) { case kBorderPlain: --- 473,484 ---- view->SetLineColorToDefault(); view->SetGLColor(); ! ! minSize = MinimumSize(view, kBorderRounded); ! if(_rectangle.xSize > minSize && _rectangle.ySize > minSize) ! btype = _borderType; ! else ! btype = kBorderPlain; ! ! switch(btype) { case kBorderPlain: |
|
From: Jeffrey B. <jlb...@us...> - 2008-05-09 01:08:25
|
Update of /cvsroot/igarden/Garden/source/PlanTool In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv23644/source/PlanTool Modified Files: Tag: Release_branch_v1 TextBoxTool.cpp Log Message: Textbox and titlebox fixes Index: TextBoxTool.cpp =================================================================== RCS file: /cvsroot/igarden/Garden/source/PlanTool/TextBoxTool.cpp,v retrieving revision 1.8.2.5 retrieving revision 1.8.2.6 diff -C2 -d -r1.8.2.5 -r1.8.2.6 *** TextBoxTool.cpp 19 Mar 2008 01:37:41 -0000 1.8.2.5 --- TextBoxTool.cpp 9 May 2008 01:08:27 -0000 1.8.2.6 *************** *** 94,98 **** UserTextBox *newElem = NULL; PlanAddAction *action; - planLength_t minSize; PRECONDITION(view != NULL); --- 94,97 ---- *************** *** 129,137 **** newElem = new UserTextBox(rect); ! minSize = newElem->MinimumSize(wview, kBorderRounded); ! if(rect.xSize > minSize && rect.ySize > minSize) ! newElem->SetBorder(kBorderRounded); ! else ! newElem->SetBorder(kBorderPlain); AddElementToAction(newElem); FinishAndPostAction(wview); --- 128,132 ---- newElem = new UserTextBox(rect); ! newElem->SetBorder(kBorderRounded); AddElementToAction(newElem); FinishAndPostAction(wview); |
|
From: Jeffrey B. <jlb...@us...> - 2008-05-09 01:08:15
|
Update of /cvsroot/igarden/CommonSource/YAAFExtensions In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv23568/YAAFExtensions Modified Files: Tag: Release_branch_v1 RGHypertextGL.cpp Log Message: Textbox and titlebox fixes Index: RGHypertextGL.cpp =================================================================== RCS file: /cvsroot/igarden/CommonSource/YAAFExtensions/RGHypertextGL.cpp,v retrieving revision 1.7 retrieving revision 1.7.2.1 diff -C2 -d -r1.7 -r1.7.2.1 *** RGHypertextGL.cpp 18 Dec 2005 02:12:12 -0000 1.7 --- RGHypertextGL.cpp 9 May 2008 01:08:15 -0000 1.7.2.1 *************** *** 91,101 **** long RGHypertextGL::StringWidth(const char *str, long len) { ! return static_cast<long>(_font->StringWidth(str, len)); } void RGHypertextGL::DrawString(const char *str, long len) { _font->DrawCountedString(_x, _y, 1.0, str, len); ! _x += _font->StringWidth(str, len)*GetScale(); } --- 91,109 ---- long RGHypertextGL::StringWidth(const char *str, long len) { ! return static_cast<long>(_font->StringWidth(str, len)*GetScale()); } void RGHypertextGL::DrawString(const char *str, long len) { + double width = _font->StringWidth(str, len)*GetScale(); + + while((_x + width) > _bounds.right) + { + len--; + width = _font->StringWidth(str, len)*GetScale(); + } + _font->DrawCountedString(_x, _y, 1.0, str, len); ! _x += width; } *************** *** 118,123 **** _drawRect = rect; ! ! DrawLines(text,rect.left + 4,rect.top /*- (GetFontHeight()+4)*/,rect.right - 8); --- 126,130 ---- _drawRect = rect; ! DrawLines(text,rect.left + 4,rect.top /*- (GetFontHeight()+4)*/,rect.right - 8); |
|
From: Jeffrey B. <jlb...@us...> - 2008-05-06 12:29:08
|
Update of /cvsroot/igarden/Garden/source/SourceMaterialDB In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv7238/source/SourceMaterialDB Modified Files: Tag: Release_branch_v1 MaterialPalette.cpp MaterialPalette.h Log Message: Fix problem with saving cached document pointer Index: MaterialPalette.cpp =================================================================== RCS file: /cvsroot/igarden/Garden/source/SourceMaterialDB/MaterialPalette.cpp,v retrieving revision 1.8.2.3 retrieving revision 1.8.2.4 diff -C2 -d -r1.8.2.3 -r1.8.2.4 *** MaterialPalette.cpp 4 May 2008 22:30:42 -0000 1.8.2.3 --- MaterialPalette.cpp 6 May 2008 12:28:54 -0000 1.8.2.4 *************** *** 592,595 **** --- 592,596 ---- InvalView(); EnableView(); + _thread->SetDocument(doc); } *************** *** 609,612 **** --- 610,614 ---- InvalView(); DisableView(); + _thread->SetDocument(NULL); } *************** *** 649,652 **** --- 651,665 ---- } + + // --------------------------------------------------------------------------- + /// SetDocument + // + void BackgroundLoadThread::SetDocument(ClientDocument *doc) + { + _drawing->SetDocument(doc); + } + + + // --------------------------------------------------------------------------- /// AddRequest Index: MaterialPalette.h =================================================================== RCS file: /cvsroot/igarden/Garden/source/SourceMaterialDB/MaterialPalette.h,v retrieving revision 1.6 retrieving revision 1.6.2.1 diff -C2 -d -r1.6 -r1.6.2.1 *** MaterialPalette.h 4 Nov 2007 19:53:17 -0000 1.6 --- MaterialPalette.h 6 May 2008 12:28:54 -0000 1.6.2.1 *************** *** 147,150 **** --- 147,151 ---- void AddRequest(PaletteItem *item); void ClearRequests(); + void SetDocument(ClientDocument *doc); PlanPaletteView* GetCanvas(); |
|
From: Jeffrey B. <jlb...@us...> - 2008-05-04 22:30:46
|
Update of /cvsroot/igarden/Garden/source/SourceMaterialDB In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv20284/source/SourceMaterialDB Modified Files: Tag: Release_branch_v1 MaterialPalette.cpp Log Message: Fix display problems on MacIntel Index: MaterialPalette.cpp =================================================================== RCS file: /cvsroot/igarden/Garden/source/SourceMaterialDB/MaterialPalette.cpp,v retrieving revision 1.8.2.2 retrieving revision 1.8.2.3 diff -C2 -d -r1.8.2.2 -r1.8.2.3 *** MaterialPalette.cpp 19 Mar 2008 01:07:44 -0000 1.8.2.2 --- MaterialPalette.cpp 4 May 2008 22:30:42 -0000 1.8.2.3 *************** *** 911,915 **** --- 911,919 ---- { Rect r = _image->GetContentRect(); + #if OPT_NATIVEORDER CGWorld *gw = new CGWorld(r); + #else + CGWorld *gw = new CGWorld(r,k32BGRAPixelFormat); + #endif thread->GetCanvas()->SetMaterial(material, ptr, _doc); |
|
From: Jeffrey B. <jlb...@us...> - 2008-05-04 12:42:57
|
Update of /cvsroot/igarden/Garden/source/resources In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv31446/source/resources Modified Files: Tag: Release_branch_v1 Garden2.rsrc Log Message: Don't give "no spread" warning for non-plants Index: Garden2.rsrc =================================================================== RCS file: /cvsroot/igarden/Garden/source/resources/Garden2.rsrc,v retrieving revision 1.33.2.26 retrieving revision 1.33.2.27 diff -C2 -d -r1.33.2.26 -r1.33.2.27 Binary files /tmp/cvsb1YqgY and /tmp/cvsDdqLTW differ |
|
From: Jeffrey B. <jlb...@us...> - 2008-05-04 11:41:19
|
Update of /cvsroot/igarden/Garden/source/SourceMaterialDB In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv15802/source/SourceMaterialDB Modified Files: Tag: Release_branch_v1 Length.cpp Log Message: Fix rounding issues which could display 4'12" Index: Length.cpp =================================================================== RCS file: /cvsroot/igarden/Garden/source/SourceMaterialDB/Length.cpp,v retrieving revision 1.9.2.5 retrieving revision 1.9.2.6 diff -C2 -d -r1.9.2.5 -r1.9.2.6 *** Length.cpp 19 Mar 2008 01:26:00 -0000 1.9.2.5 --- Length.cpp 4 May 2008 11:41:12 -0000 1.9.2.6 *************** *** 167,178 **** if(rounding == kNearestInch) { if(truncFoot != 0) { - inch = (long)(floatInch+0.5); - if(inch == 12) - { - truncFoot++; - inch = 0; - } if(inch != 0) sprintf(buf, "%ld' %ld\"", truncFoot, inch); --- 167,179 ---- if(rounding == kNearestInch) { + inch = (long)(floatInch+0.5); + if(inch == 12) + { + truncFoot++; + inch = 0; + } + if(truncFoot != 0) { if(inch != 0) sprintf(buf, "%ld' %ld\"", truncFoot, inch); *************** *** 216,219 **** --- 217,226 ---- } + if(inch == 12) + { + truncFoot++; + inch = 0; + } + if(truncFoot != 0) { |
|
From: Jeffrey B. <jlb...@us...> - 2008-05-04 11:39:26
|
Update of /cvsroot/igarden/Garden/source/LayoutDB In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv14441/source/LayoutDB Modified Files: Tag: Release_branch_v1 RectanglePath.cpp Log Message: Sometimes didn't repaint dimension lines on rectangle Index: RectanglePath.cpp =================================================================== RCS file: /cvsroot/igarden/Garden/source/LayoutDB/RectanglePath.cpp,v retrieving revision 1.38.2.9 retrieving revision 1.38.2.10 diff -C2 -d -r1.38.2.9 -r1.38.2.10 *** RectanglePath.cpp 26 Mar 2008 22:21:36 -0000 1.38.2.9 --- RectanglePath.cpp 4 May 2008 11:39:29 -0000 1.38.2.10 *************** *** 704,707 **** --- 704,709 ---- _anchorPoints[Index].xOffset += dx; _anchorPoints[Index].yOffset += dy; + + RecalcDimensionPositions(); break; } |
|
From: Jeffrey B. <jlb...@us...> - 2008-05-04 11:38:50
|
Update of /cvsroot/igarden/Garden/source/LayoutDB In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv13613/source/LayoutDB Modified Files: Tag: Release_branch_v1 Element.h Log Message: Don't give "no spread" warning for non-plants Index: Element.h =================================================================== RCS file: /cvsroot/igarden/Garden/source/LayoutDB/Element.h,v retrieving revision 1.38.2.12 retrieving revision 1.38.2.13 diff -C2 -d -r1.38.2.12 -r1.38.2.13 *** Element.h 18 Apr 2008 02:42:15 -0000 1.38.2.12 --- Element.h 4 May 2008 11:38:47 -0000 1.38.2.13 *************** *** 91,94 **** --- 91,95 ---- kAllelopath, // One plant kOtherOverlapProblem, // Other non-crowding problem + kAlwaysAllowOverlap, kAllOverlap } overlapResult_t; |
|
From: Jeffrey B. <jlb...@us...> - 2008-04-19 11:21:22
|
Update of /cvsroot/igarden/Garden/source/LayoutDB In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv8282/source/LayoutDB Modified Files: Tag: Release_branch_v1 Path.cpp Log Message: Don't give "no spread" warning for non-plants Index: Path.cpp =================================================================== RCS file: /cvsroot/igarden/Garden/source/LayoutDB/Path.cpp,v retrieving revision 1.67.2.9 retrieving revision 1.67.2.10 diff -C2 -d -r1.67.2.9 -r1.67.2.10 *** Path.cpp 17 Apr 2008 10:51:00 -0000 1.67.2.9 --- Path.cpp 19 Apr 2008 11:21:25 -0000 1.67.2.10 *************** *** 885,894 **** landscapeHeight_t height; planLength_t spread; ! ref->GetLatestPlantDimensions(&height, &spread ); ! if(spread > 0.0) ! _owningElement->RemoveWarning(kNoSpread); ! else ! _owningElement->AddWarning(kNoSpread); } } --- 885,898 ---- landscapeHeight_t height; planLength_t spread; + Material *mat = ref->GetMaterial(ifMissingNULL); ! if((mat != NULL) && (mat->GetMaterialType() & kMajorMaterialType) == kMaterialTypePlant) ! { ! ref->GetLatestPlantDimensions(&height, &spread ); ! if(spread > 0.0) ! _owningElement->RemoveWarning(kNoSpread); ! else ! _owningElement->AddWarning(kNoSpread); ! } } } |
|
From: Jeffrey B. <jlb...@us...> - 2008-04-19 11:19:29
|
Update of /cvsroot/igarden/Garden/source/LayoutDB In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv7229/source/LayoutDB Modified Files: Tag: Release_branch_v1 MaterialRef.cpp Log Message: Improve handling of overlap warnings Index: MaterialRef.cpp =================================================================== RCS file: /cvsroot/igarden/Garden/source/LayoutDB/MaterialRef.cpp,v retrieving revision 1.119.2.35 retrieving revision 1.119.2.36 diff -C2 -d -r1.119.2.35 -r1.119.2.36 *** MaterialRef.cpp 18 Apr 2008 02:42:15 -0000 1.119.2.35 --- MaterialRef.cpp 19 Apr 2008 11:19:33 -0000 1.119.2.36 *************** *** 946,949 **** --- 946,950 ---- myMat = GetMaterial(ifMissingNULL); myType = GetMaterialType(); + ref = dynamic_cast<MaterialRef*>(testElement); if(ref != NULL) *************** *** 953,960 **** { otherType = ref->GetMaterialType(); ! if(myType == kMaterialTypeAnnual || otherType == kMaterialTypeAnnual) ! result = kBeyondCurrentSize; ! else if(myType == kMaterialTypeAnnualVegetable || otherType == kMaterialTypeAnnualVegetable) ! result = kBeyondCurrentSize; else if(myType == kMaterialTypeDeciduousTree) { --- 954,959 ---- { otherType = ref->GetMaterialType(); ! if((myType & kMajorMaterialType) != kMaterialTypePlant) ! result = kAlwaysAllowOverlap; else if(myType == kMaterialTypeDeciduousTree) { *************** *** 1033,1036 **** --- 1032,1038 ---- distance = GetMinimumSpacing() * (30.0/100.0); // Reserve 30% of spread near trunk break; + case kAlwaysAllowOverlap: + return false; // EARLY RETURN + default: distance = GetMinimumSpacing(); *************** *** 1061,1064 **** --- 1063,1068 ---- otherDistance = testMaterialRef->GetMinimumSpacing() * (30.0/100.0); // Reserve 30% of spread near trunk break; + case kAlwaysAllowOverlap: + return false; // EARLY RETURN default: otherDistance = testMaterialRef->GetMinimumSpacing(); *************** *** 1427,1431 **** if(!_material->GetValueInt32Range(kPlantSpread, lower, upper)) upper = 0; ! upper = (upper * _spacingPercent) / 100; } --- 1431,1435 ---- if(!_material->GetValueInt32Range(kPlantSpread, lower, upper)) upper = 0; ! upper = (upper * _spacingPercent) / 100; } |
|
From: Jeffrey B. <jlb...@us...> - 2008-04-19 11:19:17
|
Update of /cvsroot/igarden/Garden/source/LayoutDB In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv7194/source/LayoutDB Modified Files: Tag: Release_branch_v1 Layout.cpp Log Message: Improve handling of overlap warnings Index: Layout.cpp =================================================================== RCS file: /cvsroot/igarden/Garden/source/LayoutDB/Layout.cpp,v retrieving revision 1.27.2.16 retrieving revision 1.27.2.17 diff -C2 -d -r1.27.2.16 -r1.27.2.17 *** Layout.cpp 26 Mar 2008 22:24:58 -0000 1.27.2.16 --- Layout.cpp 19 Apr 2008 11:19:18 -0000 1.27.2.17 *************** *** 985,1035 **** numFromUnused = 0; result = 0; ! ref = _unusedMaterial->FindMaterial(materialID); ! if(count != 0) { ! while(ref != NULL && (result < count)) { ! obj = ref->GetInstanceAttributes(false); ! if(obj != NULL) { ! Int32 pur; ! ! pur = obj->GetNumPurchased(); ! ref->RemoveMaterialsFromUnused(count-result, acquired, remaining ); ! if(static_cast<long>(acquired) > pur) { ! numPurchased += pur; ! numFromUnused += acquired-pur; } else { ! numPurchased += acquired; } } ! else ! { ! ref->RemoveMaterialsFromUnused(count-result, acquired, remaining ); ! numFromUnused += acquired; ! } ! result += acquired; ! if(acquired != 0) ! { ! XGBroadcast::SendBroadcast(kElementCountChanged, 0, ref); ! } ! if(remaining == 0) { XGBroadcast::SendBroadcast(kPreRemoveMaterialRefMsg, 0, ref); _unusedMaterial->RemoveElement(ref); } - - ref = _unusedMaterial->FindMaterial(materialID); - } - } - else - { - if((ref != NULL) && (ref->GetNumItems() == 0)) - { - XGBroadcast::SendBroadcast(kPreRemoveMaterialRefMsg, 0, ref); - _unusedMaterial->RemoveElement(ref); } } --- 985,1038 ---- numFromUnused = 0; result = 0; ! if(_unusedMaterial != NULL) { ! ref = _unusedMaterial->FindMaterial(materialID); ! if(count != 0) { ! while(ref != NULL && (result < count)) { ! obj = ref->GetInstanceAttributes(false); ! if(obj != NULL) { ! Int32 pur; ! ! pur = obj->GetNumPurchased(); ! ref->RemoveMaterialsFromUnused(count-result, acquired, remaining ); ! if(static_cast<long>(acquired) > pur) ! { ! numPurchased += pur; ! numFromUnused += acquired-pur; ! } ! else ! { ! numPurchased += acquired; ! } } else { ! ref->RemoveMaterialsFromUnused(count-result, acquired, remaining ); ! numFromUnused += acquired; } + result += acquired; + if(acquired != 0) + { + XGBroadcast::SendBroadcast(kElementCountChanged, 0, ref); + } + if(remaining == 0) + { + XGBroadcast::SendBroadcast(kPreRemoveMaterialRefMsg, 0, ref); + _unusedMaterial->RemoveElement(ref); + } + + ref = _unusedMaterial->FindMaterial(materialID); } ! } ! else ! { ! if((ref != NULL) && (ref->GetNumItems() == 0)) { XGBroadcast::SendBroadcast(kPreRemoveMaterialRefMsg, 0, ref); _unusedMaterial->RemoveElement(ref); } } } |
|
From: Jeffrey B. <jlb...@us...> - 2008-04-19 11:18:17
|
Update of /cvsroot/igarden/Garden/source/LayoutDB In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv6673/source/LayoutDB Modified Files: Tag: Release_branch_v1 Element.cpp Log Message: Improve handling of overlap warnings Index: Element.cpp =================================================================== RCS file: /cvsroot/igarden/Garden/source/LayoutDB/Element.cpp,v retrieving revision 1.40.2.11 retrieving revision 1.40.2.12 diff -C2 -d -r1.40.2.11 -r1.40.2.12 *** Element.cpp 18 Apr 2008 02:42:16 -0000 1.40.2.11 --- Element.cpp 19 Apr 2008 11:18:17 -0000 1.40.2.12 *************** *** 560,563 **** --- 560,564 ---- bool changed = false, found; long n, count; + double dx, dy; planPoint_t testPoint; *************** *** 566,570 **** { testPoint = _overlapPoints[n].point; ! if(testPoint.xOffset == aPoint.xOffset && testPoint.yOffset == aPoint.yOffset) { found = true; --- 567,573 ---- { testPoint = _overlapPoints[n].point; ! dx = testPoint.xOffset - aPoint.xOffset; ! dy = testPoint.yOffset - aPoint.yOffset; ! if(dx > -0.5 && dx < 0.5 && dy > -0.5 && dy < 0.5) { found = true; |
|
From: Jeffrey B. <jlb...@us...> - 2008-04-18 22:01:57
|
Update of /cvsroot/igarden/Garden/source/resources In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv15487/source/resources Modified Files: Tag: Release_branch_v1 Excl.gif Log Message: Fix a problem with displaying pictures in OpenGL Index: Excl.gif =================================================================== RCS file: /cvsroot/igarden/Garden/source/resources/Excl.gif,v retrieving revision 1.3 retrieving revision 1.3.2.1 diff -C2 -d -r1.3 -r1.3.2.1 Binary files /tmp/cvsymA5cO and /tmp/cvsJmRmpq differ |
|
From: Jeffrey B. <jlb...@us...> - 2008-04-18 22:01:31
|
Update of /cvsroot/igarden/Garden/source/PlanTool In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv15299/source/PlanTool Modified Files: Tag: Release_branch_v1 WarningOverlay.cpp Log Message: Fix a problem with displaying pictures in OpenGL Index: WarningOverlay.cpp =================================================================== RCS file: /cvsroot/igarden/Garden/source/PlanTool/WarningOverlay.cpp,v retrieving revision 1.4.2.8 retrieving revision 1.4.2.9 diff -C2 -d -r1.4.2.8 -r1.4.2.9 *** WarningOverlay.cpp 18 Apr 2008 02:42:17 -0000 1.4.2.8 --- WarningOverlay.cpp 18 Apr 2008 22:01:33 -0000 1.4.2.9 *************** *** 215,219 **** if(mkdir.ChangeDirectory("Resources")) { ! spec.SetFile(mkdir, "Excl.gif"); sWarningImage = RGCompression::DecompressFile(spec, 0, 0, NULL, NULL); } --- 215,219 ---- if(mkdir.ChangeDirectory("Resources")) { ! spec.SetFile(mkdir, "Excl.png"); sWarningImage = RGCompression::DecompressFile(spec, 0, 0, NULL, NULL); } |
|
From: Jeffrey B. <jlb...@us...> - 2008-04-18 21:59:30
|
Update of /cvsroot/igarden/CommonSource/CQTImagePane In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv13905/CQTImagePane Modified Files: Tag: Release_branch_v1 CGWorld.cpp Log Message: Fix a problem with displaying pictures in OpenGL Index: CGWorld.cpp =================================================================== RCS file: /cvsroot/igarden/CommonSource/CQTImagePane/CGWorld.cpp,v retrieving revision 1.22.2.2 retrieving revision 1.22.2.3 diff -C2 -d -r1.22.2.2 -r1.22.2.3 *** CGWorld.cpp 12 Mar 2008 22:52:16 -0000 1.22.2.2 --- CGWorld.cpp 18 Apr 2008 21:59:32 -0000 1.22.2.3 *************** *** 260,264 **** --- 260,268 ---- destX = static_cast<long>(xSize/rectScale); destY = static_cast<long>(ySize/rectScale); + #if OPT_NATIVEORDER glDrawPixels(destX, destY, GL_BGRA_EXT, GL_UNSIGNED_INT_8_8_8_8_REV, baseAddress); + #else + glDrawPixels(destX, destY, GL_BGRA_EXT, GL_UNSIGNED_INT_8_8_8_8, baseAddress); + #endif UnlockPixels(); } *************** *** 356,360 **** --- 360,368 ---- if(ySiz > inSrcRect.bottom-inSrcRect.top) ySiz = inSrcRect.bottom-inSrcRect.top; + #if OPT_NATIVEORDER glDrawPixels(xSiz, ySiz, GL_BGRA_EXT, GL_UNSIGNED_INT_8_8_8_8_REV, baseAddress); + #else + glDrawPixels(xSiz, ySiz, GL_BGRA_EXT, GL_UNSIGNED_INT_8_8_8_8, baseAddress); + #endif errCode = glGetError(); if(errCode != GL_NO_ERROR) |
|
From: Jeffrey B. <jlb...@us...> - 2008-04-18 11:55:58
|
Update of /cvsroot/igarden/Garden/Macintosh/Garden.xcodeproj In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv16811/Macintosh/Garden.xcodeproj Modified Files: Tag: Release_branch_v1 project.pbxproj Log Message: Add excl.png for plan warning support Index: project.pbxproj =================================================================== RCS file: /cvsroot/igarden/Garden/Macintosh/Garden.xcodeproj/project.pbxproj,v retrieving revision 1.58.2.44 retrieving revision 1.58.2.45 diff -C2 -d -r1.58.2.44 -r1.58.2.45 *** project.pbxproj 31 Mar 2008 00:41:21 -0000 1.58.2.44 --- project.pbxproj 18 Apr 2008 11:55:54 -0000 1.58.2.45 *************** *** 157,161 **** 4935B1D50C81A61D00C3DB64 /* MaterialPalette.h in Headers */ = {isa = PBXBuildFile; fileRef = 4935B1D30C81A61D00C3DB64 /* MaterialPalette.h */; }; 4935B1D60C81A61D00C3DB64 /* MaterialPalette.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4935B1D40C81A61D00C3DB64 /* MaterialPalette.cpp */; }; - 4935B683073B0ECA00D65ABB /* Excl.gif in Resources */ = {isa = PBXBuildFile; fileRef = 4935B682073B0ECA00D65ABB /* Excl.gif */; }; 493BDDE70C3B350C006B29D0 /* RGTable.rsrc in Rez */ = {isa = PBXBuildFile; fileRef = 493BDDE60C3B350C006B29D0 /* RGTable.rsrc */; }; 4940802009D5ADEE006F7F71 /* AgingWindow.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4940801E09D5ADEE006F7F71 /* AgingWindow.cpp */; }; --- 157,160 ---- *************** *** 517,520 **** --- 516,520 ---- 49C7E3250B2E40A000755D16 /* LayoutDBTests.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 49C7E3210B2E409C00755D16 /* LayoutDBTests.cpp */; }; 49C7E3430B2E423100755D16 /* CPlusTest.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 49C7E3340B2E422F00755D16 /* CPlusTest.framework */; }; + 49C9B9490DB8C0BF007275A8 /* Excl.png in Resources */ = {isa = PBXBuildFile; fileRef = 49C9B9480DB8C0BF007275A8 /* Excl.png */; }; 49CA0AAE08B0176100FBA1F9 /* OpenGL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 49081028070CDE910044EEA3 /* OpenGL.framework */; }; 49CA0AAF08B0176200FBA1F9 /* AGL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 49080FFC070CDE170044EEA3 /* AGL.framework */; }; *************** *** 1290,1293 **** --- 1290,1294 ---- 49C7E3220B2E409D00755D16 /* LayoutDBTests.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = LayoutDBTests.h; path = ../UnitTest/LayoutDBTests.h; sourceTree = SOURCE_ROOT; }; 49C7E3340B2E422F00755D16 /* CPlusTest.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CPlusTest.framework; path = /System/Library/Frameworks/CPlusTest.framework; sourceTree = "<absolute>"; }; + 49C9B9480DB8C0BF007275A8 /* Excl.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = Excl.png; path = ../source/resources/Excl.png; sourceTree = SOURCE_ROOT; }; 49CA170508B17A4F00FBA1F9 /* YAAF_FW.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = YAAF_FW.framework; path = ../../../external/yaaf/build/Development/YAAF_FW.framework; sourceTree = SOURCE_ROOT; }; 49CA170E08B17C9F00FBA1F9 /* AppMain.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = AppMain.cpp; path = ../../../external/yaaf/Libraries/yaaf_gui/sources/AppMain.cpp; sourceTree = SOURCE_ROOT; }; *************** *** 1525,1528 **** --- 1526,1530 ---- 49F5054D0A69983300049552 /* Credits.html */, 4935B682073B0ECA00D65ABB /* Excl.gif */, + 49C9B9480DB8C0BF007275A8 /* Excl.png */, 49C1C0D606E3ED260021D1F5 /* Garden.cin */, 49CE7314060AAA20001612B8 /* Garden.r */, *************** *** 2730,2734 **** 49700489075E9F0400E43554 /* Info.plist in Resources */, 49C1C0D706E3ED260021D1F5 /* Garden.cin in Resources */, - 4935B683073B0ECA00D65ABB /* Excl.gif in Resources */, 49E995FF07692948000555BC /* SourceMaterialsStart.xml in Resources */, 49E13EAD0787117600A358B9 /* pladvanced.gif in Resources */, --- 2732,2735 ---- *************** *** 2804,2807 **** --- 2805,2809 ---- 496B18480D9BD160007579BE /* fr in Resources */, 496B18490D9BD161007579BE /* English in Resources */, + 49C9B9490DB8C0BF007275A8 /* Excl.png in Resources */, ); runOnlyForDeploymentPostprocessing = 0; |
|
From: Jeffrey B. <jlb...@us...> - 2008-04-18 11:50:34
|
Update of /cvsroot/igarden/Garden/source/resources In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv14788/Garden/source/resources Added Files: Excl.png Log Message: Initial checkin on mainline --- NEW FILE: Excl.png --- (This appears to be a binary file; contents omitted.) |
|
From: Jeffrey B. <jlb...@us...> - 2008-04-18 02:42:13
|
Update of /cvsroot/igarden/Garden/source/LayoutDB In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv2488/source/LayoutDB Modified Files: Tag: Release_branch_v1 MaterialRef.cpp Element.h Element.cpp Log Message: Improve overlap warning system Index: Element.cpp =================================================================== RCS file: /cvsroot/igarden/Garden/source/LayoutDB/Element.cpp,v retrieving revision 1.40.2.10 retrieving revision 1.40.2.11 diff -C2 -d -r1.40.2.10 -r1.40.2.11 *** Element.cpp 16 Apr 2008 11:33:11 -0000 1.40.2.10 --- Element.cpp 18 Apr 2008 02:42:16 -0000 1.40.2.11 *************** *** 164,167 **** --- 164,182 ---- writer.WriteData("All"); break; + case kSomeOverlap: + writer.WriteData("kSomeOverlap"); + break; + case kProblemShade: + writer.WriteData("Shade"); + break; + case kUnknownShade: + writer.WriteData("MaybeShade"); + break; + case kAllelopath: + writer.WriteData("Allelopath"); + break; + case kOtherOverlapProblem: + writer.WriteData("OtherOverlap"); + break; } if(_overlapPoints[n].ack) *************** *** 292,297 **** --- 307,338 ---- ptr += 3; } + else if(CIstrncmp(ptr, "SomeOverlap", 3) == 0) + { + pointData.style = kSomeOverlap; + ptr += 3; + } + else if(CIstrncmp(ptr, "Shade", 3) == 0) + { + pointData.style = kProblemShade; + ptr += 3; + } + else if(CIstrncmp(ptr, "MaybeShade", 3) == 0) + { + pointData.style = kUnknownShade; + ptr += 3; + } + else if(CIstrncmp(ptr, "Allelopath", 3) == 0) + { + pointData.style = kAllelopath; + ptr += 3; + } + else if(CIstrncmp(ptr, "All", 3) == 0) + { + pointData.style = kOtherOverlapProblem; + ptr += 3; + } else pointData.style = kBeyondMaximumGrowth; + if(CIstrncmp(ptr, "/Ack", 3) == 0) pointData.ack = true; *************** *** 515,519 **** /// NoteOverlap( planPoint_t aPoint, bool isPresent) // ! void Element::NoteOverlap( planPoint_t aPoint, bool isPresent, overlapResult_t overlapType) { bool changed = false, found; --- 556,560 ---- /// NoteOverlap( planPoint_t aPoint, bool isPresent) // ! void Element::NoteOverlap( planPoint_t aPoint, bool isPresent, overlapResult_t overlapType, planPoint_t mat1, planPoint_t mat2) { bool changed = false, found; *************** *** 540,543 **** --- 581,586 ---- wrPoint.point = aPoint; + wrPoint.materialPointA = mat1; + wrPoint.materialPointB = mat2; wrPoint.style = overlapType; wrPoint.ack = false; *************** *** 567,570 **** --- 610,623 ---- } + // --------------------------------------------------------------------------- + /// GetIndexedOverlap + // + void Element::GetIndexedMaterialPoints( UInt32 index, planPoint_t &matA, planPoint_t &matB ) + { + PRECONDITION(index < (UInt32)_overlapPoints.Length()); + matA = _overlapPoints[index].materialPointA; + matB = _overlapPoints[index].materialPointB; + } + // --------------------------------------------------------------------------- *************** *** 585,588 **** --- 638,643 ---- case kBeyondCurrentSize: case kAllOverlap: + case kSomeOverlap: + case kOtherOverlapProblem: str.SetCString(stx("These plants are too close together.")); break; *************** *** 590,593 **** --- 645,657 ---- str.SetCString(stx("The plants are too close to the tree trunk.")); break; + case kProblemShade: + str.SetCString(stx("One of the plants requires more sun to thrive.")); + break; + case kUnknownShade: + str.SetCString(stx("One of the plants doesn't have a listed shade tolerance, and may not thrive.")); + break; + case kAllelopath: + str.SetCString(stx("One of the plants is an allelopath.")); + break; } return true; Index: Element.h =================================================================== RCS file: /cvsroot/igarden/Garden/source/LayoutDB/Element.h,v retrieving revision 1.38.2.11 retrieving revision 1.38.2.12 diff -C2 -d -r1.38.2.11 -r1.38.2.12 *** Element.h 17 Apr 2008 10:51:00 -0000 1.38.2.11 --- Element.h 18 Apr 2008 02:42:15 -0000 1.38.2.12 *************** *** 83,89 **** typedef enum { ! kBeyondMaximumGrowth, kBeyondCurrentSize, ! kBeyondTrunk, kAllOverlap } overlapResult_t; --- 83,94 ---- typedef enum { ! kBeyondMaximumGrowth, // Crowding kBeyondCurrentSize, ! kSomeOverlap, // Allow 30% overlap (some sun) ! kBeyondTrunk, // Allow 60% overlap (to trunk) ! kProblemShade, // Needs more light than available ! kUnknownShade, // May need more light than available ! kAllelopath, // One plant ! kOtherOverlapProblem, // Other non-crowding problem kAllOverlap } overlapResult_t; *************** *** 92,95 **** --- 97,102 ---- { planPoint_t point; + planPoint_t materialPointA; + planPoint_t materialPointB; overlapResult_t style; bool ack; *************** *** 164,170 **** virtual bool IsOverOverlap(planPoint_t /*point*/, planScale_t /*scale*/, long & /*outIndex*/) { return false; } virtual bool TestOverlap(Element* testElement, overlapAction_t action); ! virtual void NoteOverlap(planPoint_t aPoint, bool isPresent, overlapResult_t overlapType); virtual UInt32 CountOverlapPoints(); virtual planPoint_t GetIndexedOverlapPoint(UInt32 index); virtual bool GetIndexedOverlapMessage(long index, String &str); #pragma mark Warnings --- 171,178 ---- virtual bool IsOverOverlap(planPoint_t /*point*/, planScale_t /*scale*/, long & /*outIndex*/) { return false; } virtual bool TestOverlap(Element* testElement, overlapAction_t action); ! virtual void NoteOverlap(planPoint_t aPoint, bool isPresent, overlapResult_t overlapType, planPoint_t mat1, planPoint_t mat2); virtual UInt32 CountOverlapPoints(); virtual planPoint_t GetIndexedOverlapPoint(UInt32 index); + virtual void GetIndexedMaterialPoints( UInt32 index, planPoint_t &matA, planPoint_t &matB ); virtual bool GetIndexedOverlapMessage(long index, String &str); #pragma mark Warnings Index: MaterialRef.cpp =================================================================== RCS file: /cvsroot/igarden/Garden/source/LayoutDB/MaterialRef.cpp,v retrieving revision 1.119.2.34 retrieving revision 1.119.2.35 diff -C2 -d -r1.119.2.34 -r1.119.2.35 *** MaterialRef.cpp 17 Apr 2008 22:18:41 -0000 1.119.2.34 --- MaterialRef.cpp 18 Apr 2008 02:42:15 -0000 1.119.2.35 *************** *** 942,946 **** materialType_t myType, otherType; Material *myMat, *otherMat; - planLength_t myHeight, mySpread, otherHeight, otherSpread; long shadeTolerance; --- 942,945 ---- *************** *** 951,980 **** { otherMat = ref->GetMaterial(ifMissingNULL); ! otherType = (otherMat != NULL ? otherMat->GetMaterialType() : kMaterialTypeUnspecified); ! if(myType == kMaterialTypeAnnual || otherType == kMaterialTypeAnnual) ! result = kBeyondCurrentSize; ! else if(myType == kMaterialTypeAnnualVegetable || otherType == kMaterialTypeAnnualVegetable) ! result = kBeyondCurrentSize; ! else if(myType == kMaterialTypeDeciduousTree && otherType != kMaterialTypeDeciduousTree) ! { ! GetLatestPlantDimensions(&myHeight, &mySpread); ! ref->GetLatestPlantDimensions(&otherHeight, &otherSpread); ! if(otherMat->GetInt32(kShadeTolerance, &shadeTolerance)) ! { ! if(shadeTolerance != kShadeFullSun && otherHeight < (myHeight/10)) ! result = kBeyondTrunk; ! } ! } ! else if(otherType == kMaterialTypeDeciduousTree && myType != kMaterialTypeDeciduousTree) { ! GetLatestPlantDimensions(&myHeight, &mySpread); ! ref->GetLatestPlantDimensions(&otherHeight, &otherSpread); ! if(myMat->GetInt32(kShadeTolerance, ! &shadeTolerance)) { ! if(shadeTolerance != kShadeFullSun && myHeight < (otherHeight/10)) ! result = kBeyondTrunk; } } } else --- 950,997 ---- { otherMat = ref->GetMaterial(ifMissingNULL); ! if(otherMat != NULL) { ! otherType = ref->GetMaterialType(); ! if(myType == kMaterialTypeAnnual || otherType == kMaterialTypeAnnual) ! result = kBeyondCurrentSize; ! else if(myType == kMaterialTypeAnnualVegetable || otherType == kMaterialTypeAnnualVegetable) ! result = kBeyondCurrentSize; ! else if(myType == kMaterialTypeDeciduousTree) { ! planLength_t treeHeight, treeSpread, plantHeight, plantSpread; ! ! GetLatestPlantDimensions(&treeHeight, &treeSpread); ! ref->GetLatestPlantDimensions(&plantHeight, &plantSpread); ! if(plantHeight < (treeHeight/6)) ! { ! if((otherType == kMaterialTypePerennial) || (otherType == kMaterialTypeBulb) || ! (otherType == kMaterialTypeDeciduousVine) || (otherType == kMaterialTypeDeciduousVine) || ! (otherType == kMaterialTypeUnspecified)) ! { ! if(otherMat->GetInt32(kShadeTolerance, &shadeTolerance)) ! { ! if(shadeTolerance == kShadeFullSun) ! result = kProblemShade; ! else if(shadeTolerance == kShadePartial) ! result = kSomeOverlap; ! else if(shadeTolerance == kShadeUnspecified) ! result = kUnknownShade; ! else ! result = kBeyondTrunk; ! } ! else ! result = kUnknownShade; ! } ! else if(ref->NonPlantItem()) ! { ! result = kBeyondTrunk; ! } ! } ! else ! result = kBeyondMaximumGrowth; } } + else + result = kAllOverlap; } else *************** *** 992,996 **** planRectangle_t rect; UInt32 testIndex, myIndex, testCount, myCount; ! bool found = false; double actualDistance; planPoint_t testPoint, myPoint, overlapPoint; --- 1009,1013 ---- planRectangle_t rect; UInt32 testIndex, myIndex, testCount, myCount; ! bool badOverlap = false; double actualDistance; planPoint_t testPoint, myPoint, overlapPoint; *************** *** 999,1019 **** planLength_t dx, dy; planLength_t distance = GetMinimumSpacing(); ! overlapResult_t overlapType; planLength_t myHeight, mySpread, otherHeight, otherSpread; PRECONDITION(testElement != NULL); ! overlapType = AllowedOverlap(testElement); ! switch(overlapType) { - case kBeyondMaximumGrowth: - case kAllOverlap: - distance = GetMinimumSpacing(); - break; case kBeyondCurrentSize: GetLatestPlantDimensions(&myHeight, &mySpread); distance = mySpread; break; case kBeyondTrunk: ! distance = GetMinimumSpacing() / 30; // Reserve 30% of spread near trunk break; } --- 1016,1038 ---- planLength_t dx, dy; planLength_t distance = GetMinimumSpacing(); ! overlapResult_t myOverlap, otherOverlap; planLength_t myHeight, mySpread, otherHeight, otherSpread; PRECONDITION(testElement != NULL); ! myOverlap = AllowedOverlap(testElement); ! switch(myOverlap) { case kBeyondCurrentSize: GetLatestPlantDimensions(&myHeight, &mySpread); distance = mySpread; break; + case kSomeOverlap: + distance = GetMinimumSpacing() * (60.0/100.0); // Reserve 60% of spread near trunk + break; case kBeyondTrunk: ! distance = GetMinimumSpacing() * (30.0/100.0); // Reserve 30% of spread near trunk ! break; ! default: ! distance = GetMinimumSpacing(); break; } *************** *** 1029,1044 **** planLength_t otherDistance; ! switch(overlapType) { - case kBeyondMaximumGrowth: - case kAllOverlap: - otherDistance = testMaterialRef->GetMinimumSpacing(); - break; case kBeyondCurrentSize: testMaterialRef->GetLatestPlantDimensions(&otherHeight, &otherSpread); otherDistance = mySpread; break; case kBeyondTrunk: ! otherDistance = testMaterialRef->GetMinimumSpacing() / 30; // Reserve 30% of spread near trunk break; } --- 1048,1066 ---- planLength_t otherDistance; ! otherOverlap = testMaterialRef->AllowedOverlap(this); ! switch(otherOverlap) { case kBeyondCurrentSize: testMaterialRef->GetLatestPlantDimensions(&otherHeight, &otherSpread); otherDistance = mySpread; break; + case kSomeOverlap: + otherDistance = testMaterialRef->GetMinimumSpacing() * (60.0/100.0); // Reserve 60% of spread near trunk + break; case kBeyondTrunk: ! otherDistance = testMaterialRef->GetMinimumSpacing() * (30.0/100.0); // Reserve 30% of spread near trunk ! break; ! default: ! otherDistance = testMaterialRef->GetMinimumSpacing(); break; } *************** *** 1063,1083 **** if(dx > distance || dy > distance) { ! found = false; } else { actualDistance = sqrt((dx*dx) + (dy*dy)); ! found = (actualDistance < distance); } ! if(found || overlapType == kAllOverlap) ! { ! overlapPoint.xOffset = std::min(myPoint.xOffset, testPoint.xOffset) + (dx >= 0 ? dx : -dx)/2; ! overlapPoint.yOffset = std::min(myPoint.yOffset, testPoint.yOffset) ! + (dy >= 0 ? dy : -dy)/2; ! testElement->NoteOverlap(overlapPoint, (action==kAddingElement), overlapType); ! } ! NoteOverlap(overlapPoint, false, overlapType); } } --- 1085,1123 ---- if(dx > distance || dy > distance) { ! badOverlap = false; } else { actualDistance = sqrt((dx*dx) + (dy*dy)); ! badOverlap = (actualDistance < distance); } ! overlapResult_t overlapType; ! if(myOverlap == kUnknownShade || otherOverlap == kUnknownShade) ! overlapType = kUnknownShade; ! else if(myOverlap == kAllelopath || otherOverlap == kAllelopath) ! overlapType = kAllelopath; ! else if(myOverlap == kOtherOverlapProblem || otherOverlap == kOtherOverlapProblem) ! overlapType = kOtherOverlapProblem; ! else if(myOverlap == kProblemShade || otherOverlap == kProblemShade) ! overlapType = kProblemShade; ! else if(otherOverlap != kAllOverlap && otherOverlap != kBeyondMaximumGrowth) ! overlapType = otherOverlap; ! else if(myOverlap != kAllOverlap && myOverlap != kBeyondMaximumGrowth) ! overlapType = myOverlap; ! else ! overlapType = kAllOverlap; ! ! // printf("dx,dy,distance = %f,%f,%f\n", dx,dy,distance); ! // printf("badOverlap = %d\n", badOverlap); ! overlapPoint.xOffset = std::min(myPoint.xOffset, testPoint.xOffset) + (dx >= 0 ? dx : -dx)/2; ! overlapPoint.yOffset = std::min(myPoint.yOffset, testPoint.yOffset) ! + (dy >= 0 ? dy : -dy)/2; ! if(badOverlap) ! testElement->NoteOverlap(overlapPoint, (action==kAddingElement), overlapType, myPoint, testPoint); ! else ! testElement->NoteOverlap(overlapPoint, false, overlapType, myPoint, testPoint); ! NoteOverlap(overlapPoint, false, overlapType, myPoint, testPoint); } } *************** *** 1085,1091 **** } ! return found; } // --------------------------------------------------------------------------- /// NonPlantItem --- 1125,1135 ---- } ! return badOverlap; } + //!!!kProblemShade => may not survive in the shade + //kUnknownShade => (unknown shade tolerance) may not survive in the shade + //kSomeOverlap => too close, will survive if less overlap + // --------------------------------------------------------------------------- /// NonPlantItem |
|
From: Jeffrey B. <jlb...@us...> - 2008-04-18 02:42:12
|
Update of /cvsroot/igarden/Garden/source/PlanTool In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv2488/source/PlanTool Modified Files: Tag: Release_branch_v1 WarningOverlay.cpp Log Message: Improve overlap warning system Index: WarningOverlay.cpp =================================================================== RCS file: /cvsroot/igarden/Garden/source/PlanTool/WarningOverlay.cpp,v retrieving revision 1.4.2.7 retrieving revision 1.4.2.8 diff -C2 -d -r1.4.2.7 -r1.4.2.8 *** WarningOverlay.cpp 17 Apr 2008 22:18:30 -0000 1.4.2.7 --- WarningOverlay.cpp 18 Apr 2008 02:42:17 -0000 1.4.2.8 *************** *** 70,82 **** { CGWorld *image; image = GetWarningImage(); if(image != NULL) { for(n = 0; n < count; n++) { point = matRef->GetIndexedOverlapPoint(n); ! image->CopyImage(viewPtr, point.xOffset-(kIconWidth/2), point.yOffset-(kIconHeight/2), kWarningImageZ, kIconWidth, kIconHeight, 1.0, 1.0); } } } --- 70,94 ---- { CGWorld *image; + image = GetWarningImage(); if(image != NULL) { + GardenColor lineColor(RGB(255,0,0)); + planScale_t scale = viewPtr->GetScale(); + + viewPtr->SetLineColor(lineColor); + viewPtr->SetLineType(kPlanThinLine); for(n = 0; n < count; n++) { + planPoint_t matA, matB; + point = matRef->GetIndexedOverlapPoint(n); ! image->CopyImage(viewPtr, point.xOffset-(kIconWidth*scale/2), point.yOffset+(kIconHeight*scale/2), kWarningImageZ, kIconWidth, kIconHeight, 1.0, 1.0); + + matRef->GetIndexedMaterialPoints(n, matA, matB); + viewPtr->Line(matA,matB); } + viewPtr->SetLineColorBlack(); } } |