~valavanisalex/inkscape/inkview-gtk3

« back to all changes in this revision

Viewing changes to src/live_effects/lpe-copy_rotate.cpp

  • Committer: Jabiertxof
  • Date: 2016-12-26 09:14:15 UTC
  • Revision ID: jtx@jtx-20161226091415-gslaim8p2fxdrinh
Fixes bug #1652465 on mirror and copy rotate LPE.

Show diffs side-by-side

added added

removed removed

Lines of Context:
50
50
{
51
51
    show_orig_path = true;
52
52
    _provides_knotholder_entities = true;
53
 
    apply_to_clippath_and_mask = true;
54
 
 
55
53
    // register all your parameters here, so Inkscape knows which parameters this effect has:
56
54
    registerParameter(&copies_to_360);
57
55
    registerParameter(&fuse_paths);
63
61
 
64
62
    num_copies.param_make_integer(true);
65
63
    num_copies.param_set_range(0, 1000);
 
64
    apply_to_clippath_and_mask = true;
66
65
}
67
66
 
68
67
LPECopyRotate::~LPECopyRotate()
170
169
    }
171
170
    start_pos = origin + dir * Rotate(-rad_from_deg(starting_angle)) * dist_angle_handle;
172
171
    rot_pos = origin + dir * Rotate(-rad_from_deg(rotation_angle+starting_angle)) * dist_angle_handle;
173
 
    if (near) { 
 
172
    near = Geom::are_near(start_pos, (Geom::Point)starting_point, 0.01);
 
173
    if (!near) { 
174
174
        starting_point.param_setValue(start_pos, true);
175
175
    }
176
176
    previous_start_point = (Geom::Point)starting_point;
177
177
    if ( fuse_paths || copies_to_360 ) {
178
178
        rot_pos = origin;
179
179
    }
180
 
 
181
 
    SPLPEItem * item = const_cast<SPLPEItem*>(lpeitem);
182
 
    item->apply_to_clippath(item);
183
 
    item->apply_to_mask(item);
184
180
}
185
181
 
186
182
void