1.8 Curve Attributes - Attributes of Output
1.8 Curve Attributes - Attributes of Output
1.8 Curve Attributes - Attributes of Output
Lecture Agenda
• Curve Attributes
EXPECTED OUTCOME
After studying this class, you should be able to:
or PolyBezierTo
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
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.
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).
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.
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
Curve attributes
Key Points
– LineTo
– ArcTo
– PolylineTo,
– PolyBezierTo
MCQ
1. The basic parameter to curved attributes are
a) Type
b) Width
c) Color
d) All of the mentioned
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
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
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
https://www.sanfoundry.com/computer-graphics-
mcqs-curve-attributes/
Next Lecture
Attributes of Output Primitives:
Color and gray scale
DISCUSSIONS