Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

1.8 Curve Attributes - Attributes of Output

Download as ppt, pdf, or txt
Download as ppt, pdf, or txt
You are on page 1of 21

Computer Science III B.

Sc CS Sem : VI Year 2019 - 2020

Subject: Graphics and Multimedia

Google Classroom : oefqdki Subject code: 63A

Attributes of Output Primitives


Unit 1: Curve Attribute
Dr.M.Manimaran,
Associate Professor,
Department Computer Science,
SKACAS
oefqdki - Graphics & Multimedia Unit I Output Primitives 1
Computer Science III B.Sc CS Sem : VI Year 2019 - 2020

SNAP TALK / ATTENDANCE

oefqdki - Graphics & Multimedia Unit I Output Primitives 2


Computer Science III B.Sc CS Sem : VI Year 2019 - 2020

Lecture Agenda
• Curve Attributes

• LineTo, ArcTo, PolylineTo, or PolyBezierTo

oefqdki - Graphics & Multimedia Unit I Output Primitives 3


Computer Science III B.Sc CS Sem : VI Year 2019 - 2020

EXPECTED OUTCOME
After studying this class, you should be able to:

• To understand the concepts of Curve Attributes

• To understand the concepts of LineTo, ArcTo, PolylineTo,

or PolyBezierTo

oefqdki - Graphics & Multimedia Unit I Output Primitives 4


Computer Science III B.Sc CS Sem : VI Year 2019 - 2020

Attributes of output
primitives
• Any parameter that affects the way a primitive is to be
displayed is referred to as an attribute parameter.
• Example attribute parameters are color, size etc. A line
drawing function for example could contain parameter
to set color, width and other properties.
– Line Attributes
– Curve Attributes
– Color and Grayscale Levels
– Area Fill Attributes
– Character Attributes

oefqdki - Graphics & Multimedia Unit I Output Primitives 5


Computer Science III B.Sc CS Sem : VI Year 2019 - 2020

Curve attributes
• The default current position for any DC is located at the
point (0,0) in logical (or world) space.
• You can set these coordinates to a new position by
calling the MoveToEx function and passing a new set of
coordinates.
• Note There are two sets of line- and curve-drawing
functions.
• The first set retains the current position in a DC, and the
second set alters the position.
• You can identify the functions that alter the current
position by examining the function name.

oefqdki - Graphics & Multimedia Unit I Output Primitives 6


Computer Science III B.Sc CS Sem : VI Year 2019 - 2020

Curve attributes
• If the function name ends with the preposition "To", the
function sets the current position to the ending point of
the last line drawn (LineTo, ArcTo, PolylineTo,
or PolyBezierTo).
• If the function name does not end with this preposition,
it leaves the current position intact (Arc,Polyline,
or PolyBezier).

oefqdki - Graphics & Multimedia Unit I Output Primitives 7


Computer Science III B.Sc CS Sem : VI Year 2019 - 2020

Curve attributes
• The default brush is a solid white brush.
• An application can create a new brush by calling
the CreateBrushIndirect function.
• After creating a brush, the application can select it into
its DC by calling the SelectObject function.
• Windows provides a complete set of functions to create,
select, and alter the brush in an application's DC.
• The default pen is a cosmetic, solid black pen that is one
pixel wide.

oefqdki - Graphics & Multimedia Unit I Output Primitives 8


Computer Science III B.Sc CS Sem : VI Year 2019 - 2020

Curve attributes
• An application can create a pen by using
the ExtCreatePen function.
• After creating a pen, your application can select it into its
DC by calling theSelectObject function.
• Windows provides a complete set of functions to create,
select, and alter the pen in an application's DC
• The default transformation is the unity transformation
(specified by the identity matrix).
• An application can specify a new transformation by
calling the SetWorldTransform function.
• Windows provides a complete set of functions to
transform lines and curves by altering their width,
location, and general appearance.
oefqdki - Graphics & Multimedia Unit I Output Primitives 9
Computer Science III B.Sc CS Sem : VI Year 2019 - 2020

Curve attributes

oefqdki - Graphics & Multimedia Unit I Output Primitives 10


Computer Science III B.Sc CS Sem : VI Year 2019 - 2020

Curve attributes

oefqdki - Graphics & Multimedia Unit I Output Primitives 11


Computer Science III B.Sc CS Sem : VI Year 2019 - 2020

Key Points
– LineTo
– ArcTo
– PolylineTo,
– PolyBezierTo

oefqdki - Graphics & Multimedia Unit I Output Primitives 12


Computer Science III B.Sc CS Sem : VI Year 2019 - 2020

MCQ
1. The basic parameter to curved attributes are
a) Type
b) Width
c) Color
d) All of the mentioned

oefqdki - Graphics & Multimedia Unit I Output Primitives 13


Computer Science III B.Sc CS Sem : VI Year 2019 - 2020

MCQ
2. Raster curves of various widths can be displayed
using
a) Horizontal or vertical spans
b) Horizontal spans
c) Vertical spans
d) Horizontal and vertical spans

oefqdki - Graphics & Multimedia Unit I Output Primitives 14


Computer Science III B.Sc CS Sem : VI Year 2019 - 2020

MCQ
3. If the magnitude of the curve slope is lesser than 1,
then
a) We can plot horizontal spans
b) We can plot vertical spans
c) Only b
d) All of the mentioned

oefqdki - Graphics & Multimedia Unit I Output Primitives 15


Computer Science III B.Sc CS Sem : VI Year 2019 - 2020

MCQ ANSWERS
1) Answer: d
Explanation: Type, width and colors are the
basic parameters to curved attributes.
2) Answer: a
Explanation: Raster curves of various widths
can be displayed using Horizontal or vertical
spans
3) Answer: c
Explanation: if slope magnitude<1 then we can
plot vertical spans Magnitude > 1 then we can
plot vertical spans.
oefqdki - Graphics & Multimedia Unit I Output Primitives 16
Computer Science III B.Sc CS Sem : VI Year 2019 - 2020

VIDEO URL

https://www.youtube.com/watch?v=2JIh04rHIEA

oefqdki - Graphics & Multimedia Unit I Output Primitives 17


Computer Science III B.Sc CS Sem : VI Year 2019 - 2020

One mark URL

https://www.sanfoundry.com/computer-graphics-
mcqs-curve-attributes/

oefqdki - Graphics & Multimedia Unit I Output Primitives 18


Computer Science III B.Sc CS Sem : VI Year 2019 - 2020

Next Lecture
Attributes of Output Primitives:
Color and gray scale

oefqdki - Graphics & Multimedia Unit I Output Primitives 19


Computer Science III B.Sc CS Sem : VI Year 2019 - 2020

DISCUSSIONS

oefqdki - Graphics & Multimedia Unit I Output Primitives 20


Computer Science III B.Sc CS Sem : VI Year 2019 - 2020

oefqdki - Graphics & Multimedia Unit I Output Primitives 21

You might also like