Methods for Text Clipping in Computer Graphics

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.

My Personal Notes arrow_drop_up

Check out this Author's contributed articles.

If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.

Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.


Article Tags :

Be the First to upvote.


Please write to us at contribute@geeksforgeeks.org to report any issue with the above content.