Esempio n. 1
0
	//------------------------------------------------------
	void DrawSheet::addDrawOperation(DrawOperation* drawOp) {
		DrawBuffer* buf = getBufferForOperation(drawOp, true);

		assert(buf);
		
		if (buf) {
			buf->addDrawOperation(drawOp);
			mDrawOpMap[drawOp->getID()] = drawOp;
			drawOp->onSheetRegister(this);
		}
	}
Esempio n. 2
0
	//------------------------------------------------------
	void DrawSheet::_sourceChanged(DrawOperation* op, const DrawSourcePtr& oldsrc) {
		DrawSourceBase::ID oldID = oldsrc->getSourceID();
		DrawSourceBase::ID newID = op->getDrawSourceBase()->getSourceID();
		
		if (oldID != newID) {
			DrawBuffer* dbo = getBufferForSourceID(oldID);
			DrawBuffer* dbn = getBufferForSourceID(newID);
			
			// remove from the old buffer
			// add into the new one
			dbo->removeDrawOperation(op);
			dbn->addDrawOperation(op);
		}
	}