inline bool operator ==(const Selection& other) { if (other.CountItems() == CountItems()) { int32* items = Items(); int32* otherItems = other.Items(); for (int32 i = 0; i < CountItems(); i++) { if (items[i] != otherItems[i]) return false; items++; otherItems++; } return true; } else return false; }
// _RemoveSelection void PathManipulator::_RemoveSelection() { // NOTE: copy selection since removing points will // trigger notifications, and that will influence the // selection Selection selection = *fSelection; int32 count = selection.CountItems(); for (int32 i = 0; i < count; i++) { if (!fPath->RemovePoint(selection.IndexAt(i) - i)) break; } fPath->SetClosed(fPath->IsClosed() && fPath->CountPoints() > 1); fSelection->MakeEmpty(); }