[Igarden-commit] Garden/source/LayoutDB PaintElement.cpp, 1.26.2.10, 1.26.2.11
Status: Beta
Brought to you by:
jlbedell
|
From: Jeffrey B. <jlb...@us...> - 2008-05-13 12:12:03
|
Update of /cvsroot/igarden/Garden/source/LayoutDB In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv532/source/LayoutDB Modified Files: Tag: Release_branch_v1 PaintElement.cpp Log Message: Add area calculation to info tool Index: PaintElement.cpp =================================================================== RCS file: /cvsroot/igarden/Garden/source/LayoutDB/PaintElement.cpp,v retrieving revision 1.26.2.10 retrieving revision 1.26.2.11 diff -C2 -d -r1.26.2.10 -r1.26.2.11 *** PaintElement.cpp 10 May 2008 22:50:38 -0000 1.26.2.10 --- PaintElement.cpp 13 May 2008 12:12:00 -0000 1.26.2.11 *************** *** 328,331 **** --- 328,332 ---- measureUnits_t units; Path *path; + char msg[256]; String str, pathType; String text; *************** *** 338,344 **** // <n>' x <m>' rectangle (nn square feet) ! result = stx("Drawn ("); ! result += LineWeight(); ! result += stx(" pixel) "); path = GetPath(); path->PathSizeStr(units, text); --- 339,343 ---- // <n>' x <m>' rectangle (nn square feet) ! result = stx("Drawn "); path = GetPath(); path->PathSizeStr(units, text); *************** *** 348,351 **** --- 347,363 ---- result += pathType; + result += " ("; + result += LineWeight(); + result += stx(" pixels thick)"); + + if(!path->IsOpenPath()) + { + if(units == kEnglishUnits) + sprintf(msg, stx("\nEnclosing %6.2f square feet"), path->ComputeArea()/92903.04); + else + sprintf(msg, stx("\nEnclosing %6.2f square meters"), path->ComputeArea()/1000000.0); + result += msg; + } + Material *mat; String backgroundName; |