Chung ji hye 2001.01.31. Window vs. viewport A world-coordinate area selected for display is called...

62
Chung ji h ye 2001.01.31

Transcript of Chung ji hye 2001.01.31. Window vs. viewport A world-coordinate area selected for display is called...

Chung ji hye

2001.01.31

Window vs. viewport

• A world-coordinate area selected for display is called a window.

• An area on the display device to which a window is mapped is called a viewport.

• The window defines what is to be viewed;

• The viewport defines where it is to be displayed.

Viewport

• Viewport – 그래픽스 윈도우 내의 사각형 영역…

• 주어진 윈도우에 대하여 , 절단 사각형의 종횡비를 맞추기 위하여 viewport 의 높이와 너비를 조절할 수 있고 이미지에서 객체의 왜곡을 막을 수 있다 . 또한 윈도우의 다른 부분에 다른 이미지를 표시하기 위해 여러 개의 viewport 을 사용 할 수 있다 .

Cohen sutherland Line Clipping

• To illustrate the specific steps in clipping lines against rectangular boundaries using the Cohen-Sutherland algorithm.

CURVE CLIPPING

The bounding rectangle for a circle or other curvedobject can be used first to test for overlap with arectangular clip window.

If the bounding rectangle for the object is completely

outside the window, we discard the object. If the bounding rectangle for the object is

completelyinside the window, we save the object.

CURVE CLIPPING

TEXT CLIPPING

• METHOD 1.• The simplest method for processing character strings

relative to a window boundary is to use the all or none string –clipping strategy.

• If all of the string is inside a clip window, we keep it. Otherwise, the string is discarded.

TEXT CLIPPING

• METHOD 1.• - EXAMPLE

String

String

String

TEXT CLIPPING

• METHOD 2The entire character string that overlaps a windowboundary is to use the all-or-none characterClipping.

Any character that either overlaps or is outside awindow boundary is to use the all or none character

clippingstrategy. Here we discard only those characters that are

notcompletely inside the window.

TEXT CLIPPING

• METHOD 2• -EXAMPLE

String

String

String

Str

TEXT CLIPPING

METHOD 3.• Text clipping is to clip the components of

individual characters

• -EXAMPLE

String

StringStrin

String