rstoolbox.components.FragmentFrame.add_fragments

FragmentFrame.add_fragments(fragments, ini, how='replace')

Add to a given position a set of fragments more fragments.

Provided a FragmentFrame, use it to add those fragments to the set of available ones starting in the given position. The size and positions of the new fragments is used to assess up to where they should go.

Parameters:
  • fragments (FragmentFrame) – New fragments to add.
  • ini (int) – Initial position to where to add the new fragments.
  • how (str) – Adding mode: replace deletes the actual fragments and adds the new provided ones. append adds them to the actual set of fragments for the required positions.
Returns:

FragmentFrame - with the requested modifications.

Raises:
ValueError:If the size of the provided fragments is not the same as that of the actual ones.