clip
Description:
Clip the given start and stop values to the segment boundaries given in this.
start and stop are compared and clipped to this start and stop values.
If the function returns false, start and stop are known to fall outside of
this and clip_start and clip_stop are not updated.
When the function returns true, clip_start and clip_stop will be updated. If
clip_start or clip_stop are different from start or stop respectively, the region fell partially
in the segment.
Note that when stop is -1, clip_stop will be set to the end of the segment. Depending on the use case, this may or
may not be what you want.
Parameters:
| this |
a Segment structure. |
| format |
the format of the segment. |
| start |
the start position in the segment |
| stop |
the stop position in the segment |
| clip_start |
the clipped start position in the segment |
| clip_stop |
the clipped stop position in the segment |
Returns:
|
true if the given |