πŸŽ“ Computer Science & Engineering Portal

Master Engineering Disciplines with Structured Notes

Comprehensive academic lecture notes, exam-oriented unit summaries, laboratory manuals, and previous year question papers designed strictly for university students.

πŸ“‘

University Syllabi

AKTU & AICTE aligned semester guidelines.

πŸ“

Exam Question Papers

Previous 5 years solved university papers.

πŸ’‘

Lab Manuals & Viva

Practical codes with outputs & interview Qs.

Core Subjects & Units Hub

Click on any specific unit to immediately view its lecture notes below

Viewing All Lectures

Curve Clipping and Text clipping

Text Clipping

Various techniques are used to provide text clipping in a computer graphics. It depends on the methods used to generate characters and the requirements of a particular application. There are three methods for text clipping which are listed below βˆ’

  • All or none string clipping
  • All or none character clipping
  • Text clipping

The following figure shows all or none string clipping –

All or None String Clipping

In all or none string clipping method, either we keep the entire string or we reject entire string based on the clipping window. As shown in the above figure, STRING2 is entirely inside the clipping window so we keep it and STRING1 being only partially inside the window, we reject.

The following figure shows all or none character clipping –

All or None Character Clipping

This clipping method is based on characters rather than entire string. In this method if the string is entirely inside the clipping window, then we keep it. If it is partially outside the window, then βˆ’

  • You reject only the portion of the string being outside
  • If the character is on the boundary of the clipping window, then we discard that entire character and keep the rest string.

The following figure shows text clipping –

Text Clipping

This clipping method is based on characters rather than the entire string. In this method if the string is entirely inside the clipping window, then we keep it. If it is partially outside the window, then

  • You reject only the portion of string being outside.
  • If the character is on the boundary of the clipping window, then we discard only that portion of character that is outside of the clipping window.

(2) Curve Clipping :-

  1. Curve clipping procedures will involve non-linear equarions however this requires more processing than for object with linear boundries.
  2. The bounding rectangle for a circle or other curved object cab be used first to test for overlap with a rectangle clip window.
  3. If the bounding rectangle for the objects is completely inside the window we save the object.
  4. If the boundary rectangle for the object is determined to be completely outside the window, we discard the object.
  5. This procedure can be applied when clipping a curved object against a general polygon clip region. On the first pass we can clip the bounding rectangle of the clip region.
  6. If the region overlaps, we will need to store the simulations line-curve equation to obtain the clip intersection points.

Labels: ,

Discussion & Queries (<$I18NNumComments$>):

<$CommentPager$>
<$I18NAtCommentTimeWithPermalink$>, <$I18NCommentAuthorSaid$>

<$BlogCommentBody$>

<$BlogCommentDeleteIcon$>
<$CommentPager$>