Beispiel #1
0
/**
 * Copies all attributes (layer, block, color, line weight, line style) from the given entity.
 */
void REntity::copyAttributesFrom(REntity* entity) {
    if (entity==NULL) {
        qWarning("REntity::copyAttributesFrom: source entity is NULL");
        return;
    }

    if (getDocument()!=entity->getDocument()) {
        qWarning("REntity::copyAttributesFrom: source entity not from same document");
        return;
    }

    setLayerId(entity->getLayerId());
    setBlockId(entity->getBlockId());
    setColor(entity->getColor());
    setLineweight(entity->getLineweight());
    setLinetypeId(entity->getLinetypeId());
}
Beispiel #2
0
/**
 * Copies all attributes (layer, block, color, line weight, line style) from the given entity.
 */
void REntity::copyAttributesFrom(REntity* entity, bool copyBlockId) {
    if (entity==NULL) {
        qWarning("REntity::copyAttributesFrom: source entity is NULL");
        return;
    }

    if (getDocument()!=entity->getDocument()) {
        qWarning("REntity::copyAttributesFrom: source entity not from same document");
        //RDebug::printBacktrace();
        return;
    }

    setLayerId(entity->getLayerId());
    if (copyBlockId) {
        setBlockId(entity->getBlockId());
    }
    setColor(entity->getColor());
    setLineweight(entity->getLineweight());
    setLinetypeId(entity->getLinetypeId());
    setLinetypeScale(entity->getLinetypeScale());
    setDrawOrder(entity->getDrawOrder());
}