Exemplo n.º 1
0
RS_Entity* RS_Image::clone() const {
    RS_Image* i = new RS_Image(*this);
        i->setHandle(getHandle());
    i->initId();
    i->update();
    return i;
}
Exemplo n.º 2
0
/**
     * Creates an image with the given data.
     */
RS_Image* RS_Creation::createImage(const RS_ImageData* data) {

	if (document && handleUndo) {
        document->startUndoCycle();
    }

	RS_Image* img = new RS_Image(container, *data);
    img->update();
	setEntity(img);

    return img;
}
Exemplo n.º 3
0
    /**
     * Creates an image with the given data.
     */
    RS_Image* RS_Creation::createImage(RS_ImageData& data) {

        if (document!=NULL && handleUndo) {
            document->startUndoCycle();
        }

        RS_Image* img = new RS_Image(container, data);
        img->setLayerToActive();
        img->setPenToActive();
        img->update();

        if (container!=NULL) {
            container->addEntity(img);
        }
        if (document!=NULL && handleUndo) {
            document->addUndoable(img);
            document->endUndoCycle();
        }
        if (graphicView!=NULL) {
            graphicView->drawEntity(img);
        }

        return img;
    }