[Igarden-commit] CommonSource/YAAFExtensions RGHypertext.cpp, 1.24.2.1, 1.24.2.2
Status: Beta
Brought to you by:
jlbedell
|
From: Jeffrey B. <jlb...@us...> - 2006-12-19 12:57:14
|
Update of /cvsroot/igarden/CommonSource/YAAFExtensions In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv6163 Modified Files: Tag: Release_branch_v1 RGHypertext.cpp Log Message: Add new shopping list report with plant picture Index: RGHypertext.cpp =================================================================== RCS file: /cvsroot/igarden/CommonSource/YAAFExtensions/RGHypertext.cpp,v retrieving revision 1.24.2.1 retrieving revision 1.24.2.2 diff -C2 -d -r1.24.2.1 -r1.24.2.2 *** RGHypertext.cpp 29 Oct 2006 03:31:56 -0000 1.24.2.1 --- RGHypertext.cpp 19 Dec 2006 12:57:13 -0000 1.24.2.2 *************** *** 327,337 **** tableInfo_t *curTable; - if(!_displayText) - return; - if(len == 0) - return; - if(len <= static_cast<long>(strspn(str, " \t\n"))) - return; - imageIndex = MatchingImage(static_cast<long>(_y), static_cast<long>(_lineHeight)); if(imageIndex >= 0) --- 327,330 ---- *************** *** 363,385 **** if(_doDraw) { imageInfo = _images[imageIndex]; ! imageRect.top = static_cast<short>(_y-_scrollY); ! imageRect.left = _imageLeft-_scrollX; ! imageRect.bottom = imageRect.top + imageInfo.height; ! imageRect.right = imageRect.left + imageInfo.width; ! ! dr.top = imageRect.top; ! dr.left = imageRect.left; ! dr.bottom = imageRect.bottom; ! dr.right = imageRect.right; ! if(PointWithinBounds(imageRect.right, imageRect.bottom)) { ! gw = RGCompression::DecompressFile(imageInfo.spec, imageInfo.width, imageInfo.height); ! if(gw != NULL) { SetForeColor(KXGColorBlack); ! CopyImage(gw, imageRect); ! delete gw; } } } --- 356,384 ---- if(_doDraw) { + long actualHeight, actualWidth; + imageInfo = _images[imageIndex]; ! gw = RGCompression::DecompressFile(imageInfo.spec, 0, 0, &actualHeight, &actualWidth); ! if(gw != NULL) { ! double ratio; ! ! ratio = (double)actualWidth / actualHeight; ! imageRect.top = static_cast<short>(_y-_scrollY); ! imageRect.left = _imageLeft-_scrollX; ! imageRect.bottom = imageRect.top + imageInfo.height; ! imageRect.right = imageRect.left + imageInfo.height*ratio; ! ! dr.top = imageRect.top; ! dr.left = imageRect.left; ! dr.bottom = imageRect.bottom; ! dr.right = imageRect.right; ! if(PointWithinBounds(imageRect.right, imageRect.bottom)) { + SetForeColor(KXGColorBlack); ! gw->CopyImage(imageRect); } + delete gw; } } *************** *** 402,405 **** --- 401,411 ---- } + if(!_displayText) + return; + if(len == 0) + return; + if(len <= static_cast<long>(strspn(str, " \t\n"))) + return; + info = CurrentFontInfo(); prefixSpace = false; *************** *** 750,754 **** CGWorld *gw; ! if(!_doDraw && !_loadedImageData && GetNamedArgument("src", filename)) { if(CIstrncmp(filename.c_str(), kResourceFilePrefix, strlen(kResourceFilePrefix)) == 0) --- 756,760 ---- CGWorld *gw; ! if(/* !_doDraw && */ !_loadedImageData && GetNamedArgument("src", filename)) { if(CIstrncmp(filename.c_str(), kResourceFilePrefix, strlen(kResourceFilePrefix)) == 0) |