Logo Search packages:      
Sourcecode: inkscape version File versions

void GrDragger::updateDependencies ( bool  write_repr  ) 

Moves all draggables that depend on this one

Definition at line 735 of file gradient-drag.cpp.

References GrDraggable::fill_or_stroke, GrDraggable::item, and GrDraggable::point_num.

{
    for (GSList const* i = this->draggables; i != NULL; i = i->next) {
        GrDraggable *draggable = (GrDraggable *) i->data;
        switch (draggable->point_num) {
            case POINT_LG_P1:
                // the other point is dependent only when dragging with ctrl+shift
                this->moveOtherToDraggable (draggable->item, POINT_LG_P2, draggable->fill_or_stroke, write_repr);
                break;
            case POINT_LG_P2:
                this->moveOtherToDraggable (draggable->item, POINT_LG_P1, draggable->fill_or_stroke, write_repr);
                break;
            case POINT_RG_R2:
                this->moveOtherToDraggable (draggable->item, POINT_RG_R1, draggable->fill_or_stroke, write_repr);
                this->moveOtherToDraggable (draggable->item, POINT_RG_FOCUS, draggable->fill_or_stroke, write_repr);
                break;
            case POINT_RG_R1:
                this->moveOtherToDraggable (draggable->item, POINT_RG_R2, draggable->fill_or_stroke, write_repr);
                this->moveOtherToDraggable (draggable->item, POINT_RG_FOCUS, draggable->fill_or_stroke, write_repr);
                break;
            case POINT_RG_CENTER:
                this->moveOtherToDraggable (draggable->item, POINT_RG_R1, draggable->fill_or_stroke, write_repr);
                this->moveOtherToDraggable (draggable->item, POINT_RG_R2, draggable->fill_or_stroke, write_repr);
                this->moveOtherToDraggable (draggable->item, POINT_RG_FOCUS, draggable->fill_or_stroke, write_repr);
                break;
            case POINT_RG_FOCUS:
                // nothing can depend on that
                break;
            default:
                break;
        }
    }
}


Generated by  Doxygen 1.6.0   Back to index