src/lddocument.cpp

changeset 1305
31627acdd4b5
parent 1298
dbc8bb2a4d84
child 1306
be85306198a2
equal deleted inserted replaced
1304:bb3f43293cf8 1305:31627acdd4b5
527 // Got another sub-file reference, recurse and inline it too if we're deep-inlining. 527 // Got another sub-file reference, recurse and inline it too if we're deep-inlining.
528 // If not, just add it into the objects normally. 528 // If not, just add it into the objects normally.
529 if (deep and object->type() == LDObjectType::SubfileReference) 529 if (deep and object->type() == LDObjectType::SubfileReference)
530 { 530 {
531 LDSubfileReference* reference = static_cast<LDSubfileReference*>(object); 531 LDSubfileReference* reference = static_cast<LDSubfileReference*>(object);
532 reference->inlineContents(documentManager(), model, deep, renderinline); 532 reference->inlineContents(
533 documentManager(),
534 this->header.winding,
535 model,
536 deep,
537 renderinline
538 );
533 } 539 }
534 else 540 else
535 { 541 {
536 model.insertCopy(model.size(), object); 542 model.insertCopy(model.size(), object);
537 } 543 }
566 572
567 void LDDocument::redoVertices() 573 void LDDocument::redoVertices()
568 { 574 {
569 m_verticesOutdated = true; 575 m_verticesOutdated = true;
570 } 576 }
571
572 /*
573 * Special operator definition that implements the XOR operator for windings.
574 * However, if either winding is NoWinding, then this function returns NoWinding.
575 */
576 Winding operator^(Winding one, Winding other)
577 {
578 if (one == NoWinding or other == NoWinding)
579 return NoWinding;
580 else
581 return static_cast<Winding>(static_cast<int>(one) ^ static_cast<int>(other));
582 }

mercurial