Text Clipping is a process of clipping the string. In this process, we clip the whole character or only some part of it depending upon the requirement of the application.
Text clipping Methods :
- All or None String Clipping method –
In this method, if the whole string is inside the clip window then we consider it. Otherwise, the string is completely removed. Text pattern is considered under a bounding rectangle. The boundary positions of the rectangle are then compared to the window boundaries. String is rejected if there is any overlapping between the string and the window. This method produces the fastest text clipping.
- All or None Character Clipping method –
In this method, we keep the characters of the string which lies inside clip window and remove all the characters which lie outside the clip window. The boundary limits of individual characters are compared to the window. In case of overlapping of character with the clip window, we remove the character.
- Text Clipping method –
In this method, we keep the characters of the string which lies inside the clip window and remove all the characters which lie outside the clip window. If a character overlaps the window boundary then we keep that part of the character which lies inside the window and discard that part which lies outside the clip window.