Definition at line 95 of file CxRectZTiler.h. References CxMax(), mDist, mFirstLine, mLineY2d, mLineY2dInc, mPosX2d, mPosY2d, mPrevHeight2d, mPrevWidth2d, mWndHeight, and mWndWidth. Referenced by OglGui::Window::RepositionViewports(). 00096 { 00097 //int s = 5; // room for window border and to separate tiles 00098 if (mFirstLine) 00099 { 00100 mFirstLine = false; 00101 } 00102 else if ((tileW+mDist <= mPrevWidth2d) && (mPosX2d != 0) && 00103 (mPosY2d - mLineY2d + mPrevHeight2d + tileH+mDist <= mLineY2dInc)) 00104 { 00105 mPosY2d += mPrevHeight2d; // put it in a "column" on this line 00106 } 00107 else 00108 { 00109 mPosX2d += mPrevWidth2d; // advance on this line 00110 mPosY2d = mLineY2d; 00111 if (mPosX2d + tileW+mDist > mWndWidth) 00112 { 00113 mLineY2d += mLineY2dInc; 00114 mLineY2dInc = 0; 00115 mPosX2d = 0; 00116 mPosY2d = mLineY2d; 00117 } 00118 } 00119 pX2d = mPosX2d; 00120 pY2d = (int)(mWndHeight - mPosY2d - tileH - 1); // 1 is for border 00121 mLineY2dInc = CxMax(mLineY2dInc, (int) tileH+mDist); 00122 mPrevWidth2d = (int)(tileW+mDist); 00123 mPrevHeight2d = (int)(tileH+mDist); 00124 }
Here is the call graph for this function:
|