MCPcopy Create free account
hub / github.com/audacity/audacity / GetNextPosition

Method GetNextPosition

libraries/lib-theme/Theme.cpp:438–468  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

436}
437
438void FlowPacker::GetNextPosition( int xSize, int ySize )
439{
440 xSize += 2*mBorderWidth;
441 ySize += 2*mBorderWidth;
442 // if the height has increased, then we are on a NEW group.
443 if(( ySize > myHeight )||(((mFlags ^ mOldFlags )& ~resFlagSkip)!=0))
444 {
445 SetNewGroup( ((mFlags & resFlagPaired)!=0) ? 2 : 1 );
446 myHeight = ySize;
447// mFlags &= ~resFlagNewLine;
448// mOldFlags = mFlags;
449 }
450
451 iImageGroupIndex++;
452 if( iImageGroupIndex == iImageGroupSize )
453 {
454 iImageGroupIndex = 0;
455 mxPos += mComponentWidth;
456 }
457
458 if(mxPos > (mxCacheWidth - xSize ))
459 {
460 SetNewGroup(iImageGroupSize);
461 iImageGroupIndex++;
462 myHeight = ySize;
463 }
464 myPos = myPosBase + iImageGroupIndex * myHeight;
465
466 mComponentWidth = xSize;
467 mComponentHeight = ySize;
468}
469
470wxRect FlowPacker::Rect()
471{

Callers 3

CreateOneImageCacheMethod · 0.80
WriteOneImageMapMethod · 0.80
ReadImageCacheMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected