Компьютерная графика. Полигональные модели

view -> status |= WS_COMPLETELYVISIBLE; // initially not overlap
// by anyone
if ( viewRect.isEmpty ()) return;
for (reg = start; reg != NULL; reg = next) {
next = reg -> next; updatePrev = TRUE;
floated views
// should be added // after all subviews - if (reg -> owner -> isFloating ())
{
if (recLevel >= 0 ) // if adding view then store floater {
floaters.insert (reg -> owner); prev = reg; // update prev continue; // skip floater
}
}
splitting Rect = * reg; // get current rect
splittingRect &= viewRect; // clip it to viewRect
if ( splittingRect.isEmpty ()) // if not { // intersection
prev = reg; // update prev
continue; // then continue
}
if ( splittingRect == * reg ) // current is { // overlapped
if ( prev != NULL ) // remove region from region list prev -> next = next;
freeRegion (reg ); // free it
updatePrev = FALSE;
}
else
{
r = * reg; // save current rect
owner = reg -> owner; // and it's owner
owner -> status &= ~WS_COMPLETELYVISIBLE;
//1 st block reg -> y2 = splittingRect.yl - 1 ;
if (!reg -> isEmpty ()) {
prev = reg;
reg = allocRegion ();
prev -> next = reg;
}

5. Принципы построения пользовательского интерфейса

// 2nd block reg -> x1 = r.xl; reg -> y1 = splittingRect.yl; reg -> x2 = splittingRect.xl -1; reg -> y2 = splittingRect.y2; reg -> owner = owner;
if (Ireg -> isEmpty ()) {
prev .= reg;
reg = allocRegion ();
prev -> next = reg;
}
// 3rd block reg -> x1 = splittingRect.x2 + 1; reg -> y1 = splittingRect.yl; reg -> x2 = r.x2; reg -> y2 = splittingRect.y2; reg -> owner = owner;
if (Ireg -> isEmpty ()) {
prev = reg;
reg = allocRegion ();
prev -> next = reg;
}
// 4th block reg -> x1 = r.xl; reg -> y1 = splittingRect.y2 + 1; reg -> x2 = r.x2; reg -> y2 = r.y2; reg -> owner = owner;
if (reg -> isEmpty ())// remove from chain {
if ( prev != NULL ) prev -> next = next;

⇐ Предыдущая| |Следующая ⇒