~danieljabailey/inkscape/arc_node_editor

« back to all changes in this revision

Viewing changes to src/ui/tool/multi-path-manipulator.cpp

  • Committer: Daniel Bailey
  • Date: 2016-05-15 20:44:44 UTC
  • Revision ID: d@nielbailey.com-20160515204444-tak344mvzf55nhwk
Added support for editting arc segments in the node editor

Show diffs side-by-side

added added

removed removed

Lines of Context:
319
319
{
320
320
    if (_selection.empty()) return;
321
321
    invokeForAll(&PathManipulator::setSegmentType, type);
322
 
    if (type == SEGMENT_STRAIGHT) {
323
 
        _done(_("Straighten segments"));
324
 
    } else {
325
 
        _done(_("Make segments curves"));
326
 
    }
 
322
    switch (type){
 
323
        case SEGMENT_STRAIGHT:
 
324
            _done(_("Straighten segments"));
 
325
            break;
 
326
        case SEGMENT_CUBIC_BEZIER:
 
327
            _done(_("Make segments curves"));
 
328
            break;
 
329
        case SEGMENT_ELIPTICAL_ARC:
 
330
            _done(_("Make segments arcs"));
 
331
            break;
 
332
        default:
 
333
            g_error("Unknown segment type");
 
334
    }
 
335
}
 
336
 
 
337
void MultiPathManipulator::setArcSegmentLarge(bool large)
 
338
{
 
339
    if (_selection.empty()) return;
 
340
    invokeForAll(&PathManipulator::setArcSegmentLarge, large);
 
341
    if (large){
 
342
        _done(_("Make arc segments bulge"));
 
343
    }
 
344
    else{
 
345
        _done(_("Make arc segments shallow"));
 
346
    }
 
347
}
 
348
 
 
349
void MultiPathManipulator::toggleArcSegmentSweep()
 
350
{
 
351
    if (_selection.empty()) return;
 
352
    invokeForAll(&PathManipulator::toggleArcSegmentSweep);
 
353
    _done(_("Flip arc segments"));
327
354
}
328
355
 
329
356
void MultiPathManipulator::insertNodes()