Skip to content
Related Articles

Related Articles

Methods for Text Clipping in Computer Graphics
  • Last Updated : 09 Jul, 2020

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 :

  1. 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.

  2. 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.



  3. 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.

geeks-digest-img

My Personal Notes arrow_drop_up
Recommended Articles
Page :