Deck 15: Graphics and Multimedia
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Unlock Deck
Sign up to unlock the cards in this deck!
Unlock Deck
Unlock Deck
1/76
Play
Full screen (f)
Deck 15: Graphics and Multimedia
1
The Graphics class does not include a method for drawing
A)lines
B)shapes
C)images
D)strings
E)None of the above
A)lines
B)shapes
C)images
D)strings
E)None of the above
E
2
The System.Drawing namespace provides rectangle and point structures that can be used when drawing on a 2D plane.
True
3
Visual Basic includes tools
A)for drawing 2-D shapes
B)for controlling colors and fonts
C)to support graphics that enable programmers to enhance their Windows apps visually
D)All of the above
A)for drawing 2-D shapes
B)for controlling colors and fonts
C)to support graphics that enable programmers to enhance their Windows apps visually
D)All of the above
D
4
You cannot create your own Paint event handler,rather you must rely on the default implementation provided.
Unlock Deck
Unlock for access to all 76 flashcards in this deck.
Unlock Deck
k this deck
5
OnPaint is a method that cannot be overridden.
Unlock Deck
Unlock for access to all 76 flashcards in this deck.
Unlock Deck
k this deck
6
You can call the Invalidate method to redraw the graphics in a window.
Unlock Deck
Unlock for access to all 76 flashcards in this deck.
Unlock Deck
k this deck
7
Graphics method Invalidate __________.
A)checks to see if a form is valid
B)invalidates a form
C)clears a form
D)refreshes and updates a form
A)checks to see if a form is valid
B)invalidates a form
C)clears a form
D)refreshes and updates a form
Unlock Deck
Unlock for access to all 76 flashcards in this deck.
Unlock Deck
k this deck
8
Screen coordinates are measured in:
A)inches
B)centimeters
C)pixels
D)millimeters
A)inches
B)centimeters
C)pixels
D)millimeters
Unlock Deck
Unlock for access to all 76 flashcards in this deck.
Unlock Deck
k this deck
9
Visual Basic also includes namespaces for multimedia such as the Windows Media Player control.
Unlock Deck
Unlock for access to all 76 flashcards in this deck.
Unlock Deck
k this deck
10
You never call method OnPaint directly because
A)OnPaint is an abstract method.
B)drawing graphics is an event-driven process.
C)OnPaint is a GUI method only so it cannot be called.
D)OnPaint is a class not a method.
A)OnPaint is an abstract method.
B)drawing graphics is an event-driven process.
C)OnPaint is a GUI method only so it cannot be called.
D)OnPaint is a class not a method.
Unlock Deck
Unlock for access to all 76 flashcards in this deck.
Unlock Deck
k this deck
11
You'll explicitly call the OnPaint method often.
Unlock Deck
Unlock for access to all 76 flashcards in this deck.
Unlock Deck
k this deck
12
In Visual Basic's coordinates system (0,0)is located on the bottom-left of the plane.
Unlock Deck
Unlock for access to all 76 flashcards in this deck.
Unlock Deck
k this deck
13
Every app that derives from class System.Windows.Forms.Form inherits an Overridable method named ________ where most graphics operations are performed.
A)OnPaint
B)Paint
C)Draw
D)None of the above.
A)OnPaint
B)Paint
C)Draw
D)None of the above.
Unlock Deck
Unlock for access to all 76 flashcards in this deck.
Unlock Deck
k this deck
14
The Graphics class has methods for:
A)creating pictures
B)drawing lines and shapes
C)drawing only lines
D)creating images
A)creating pictures
B)drawing lines and shapes
C)drawing only lines
D)creating images
Unlock Deck
Unlock for access to all 76 flashcards in this deck.
Unlock Deck
k this deck
15
Instead of overriding the OnPaint method,you can add an event handler for the Paint event.
Unlock Deck
Unlock for access to all 76 flashcards in this deck.
Unlock Deck
k this deck
16
To draw on a control using one of the Graphics drawing methods,you must pass a pen or brush object as the first argument to the method.
Unlock Deck
Unlock for access to all 76 flashcards in this deck.
Unlock Deck
k this deck
17
What is the GDI+?
A)A specific type of program
B)An app programming interface that provides classes for graphical purposes
C)An acronym for Graphical Depiction Implementation Plus
D)All of the above
A)A specific type of program
B)An app programming interface that provides classes for graphical purposes
C)An acronym for Graphical Depiction Implementation Plus
D)All of the above
Unlock Deck
Unlock for access to all 76 flashcards in this deck.
Unlock Deck
k this deck
18
Visual Basic includes many drawing methods that are inside the System.Drawing and System.Drawing.Drawing2D namespaces.
Unlock Deck
Unlock for access to all 76 flashcards in this deck.
Unlock Deck
k this deck
19
Graphics objects contain methods for drawing,font manipulation,color
manipulation,and other graphics-related actions.
manipulation,and other graphics-related actions.
Unlock Deck
Unlock for access to all 76 flashcards in this deck.
Unlock Deck
k this deck
20
Namespaces like System.Drawing and System.Drawing.Drawing2D help make up:
A)GDI
B)GDI %
C)GDI+
D)GDI#
A)GDI
B)GDI %
C)GDI+
D)GDI#
Unlock Deck
Unlock for access to all 76 flashcards in this deck.
Unlock Deck
k this deck
21
There are Font properties that specify font characteristics such as cell ascent and cell descent.
Unlock Deck
Unlock for access to all 76 flashcards in this deck.
Unlock Deck
k this deck
22
A font's properties are also known as its metrics.
Unlock Deck
Unlock for access to all 76 flashcards in this deck.
Unlock Deck
k this deck
23
The properties of font objects cannot be changed once created.
Unlock Deck
Unlock for access to all 76 flashcards in this deck.
Unlock Deck
k this deck
24
Class ColorDialog allows the programmer to display a text box of the chosen color.
Unlock Deck
Unlock for access to all 76 flashcards in this deck.
Unlock Deck
k this deck
25
What does the A in ARGB stand for and what does it determine?
A)Atomic,the percentage of distribution of each color
B)Apeck,the ordering of colors
C)Alpha,the opacity of the color
D)None of the above
A)Atomic,the percentage of distribution of each color
B)Apeck,the ordering of colors
C)Alpha,the opacity of the color
D)None of the above
Unlock Deck
Unlock for access to all 76 flashcards in this deck.
Unlock Deck
k this deck
26
Which of the following RGBcolor codes will result in White?
A)0,0,0
B)255,255,255
C)255,0,0
D)None of the above.
A)0,0,0
B)255,255,255
C)255,0,0
D)None of the above.
Unlock Deck
Unlock for access to all 76 flashcards in this deck.
Unlock Deck
k this deck
27
In general a pen object is used to:
A)fill an entire shape with a color
B)fill an entire shape with a pattern
C)draw an outline of an shape in black or blue
D)draw an outline of a shape
A)fill an entire shape with a color
B)fill an entire shape with a pattern
C)draw an outline of an shape in black or blue
D)draw an outline of a shape
Unlock Deck
Unlock for access to all 76 flashcards in this deck.
Unlock Deck
k this deck
28
The graphics enumeration called GraphicsUnit has constant font sizes.
Unlock Deck
Unlock for access to all 76 flashcards in this deck.
Unlock Deck
k this deck
29
The Size property of a Font object returns the size measured in ________ by default.
A)pixel
B)points
C)design units
D)None of the above.
A)pixel
B)points
C)design units
D)None of the above.
Unlock Deck
Unlock for access to all 76 flashcards in this deck.
Unlock Deck
k this deck
30
A property like Bold or Underline:
A)returns false if the font is bold or underlined,respectively.
B)returns true if the font is bold or underlined,respectively.
C)makes the text all bold or underlined,respectively.
D)gets rid of all bold or underlined text,respectively,and makes it plain.
A)returns false if the font is bold or underlined,respectively.
B)returns true if the font is bold or underlined,respectively.
C)makes the text all bold or underlined,respectively.
D)gets rid of all bold or underlined text,respectively,and makes it plain.
Unlock Deck
Unlock for access to all 76 flashcards in this deck.
Unlock Deck
k this deck
31
A syntax error will occur if a specified font is not available on a system.
Unlock Deck
Unlock for access to all 76 flashcards in this deck.
Unlock Deck
k this deck
32
An existing Font object can be modified to have different properties.
Unlock Deck
Unlock for access to all 76 flashcards in this deck.
Unlock Deck
k this deck
33
The most common unit of measurement for fonts,the point,is equivalent to1/72 inch.
Unlock Deck
Unlock for access to all 76 flashcards in this deck.
Unlock Deck
k this deck
34
Computers view colors as having the following color components:
A)red,blue and yellow.
B)purple,orange and green.
C)red,yellow and green.
D)red,green and blue.
A)red,blue and yellow.
B)purple,orange and green.
C)red,yellow and green.
D)red,green and blue.
Unlock Deck
Unlock for access to all 76 flashcards in this deck.
Unlock Deck
k this deck
35
Only the colors in the Color structure may be used in a program.
Unlock Deck
Unlock for access to all 76 flashcards in this deck.
Unlock Deck
k this deck
36
Color is implemented as a class,rather than as a structure.
Unlock Deck
Unlock for access to all 76 flashcards in this deck.
Unlock Deck
k this deck
37
A LinearGradientBrush draws a solid object whose color blends from one color to another.
Unlock Deck
Unlock for access to all 76 flashcards in this deck.
Unlock Deck
k this deck
38
The alpha value determines the brightness of the color.
Unlock Deck
Unlock for access to all 76 flashcards in this deck.
Unlock Deck
k this deck
39
The ascent of a character is:
A)the height of the character
B)how high above the base line a character goes
C)the vertical space between characters
D)extra spacing above the character for accents.
A)the height of the character
B)how high above the base line a character goes
C)the vertical space between characters
D)extra spacing above the character for accents.
Unlock Deck
Unlock for access to all 76 flashcards in this deck.
Unlock Deck
k this deck
40
The Size property of class Font returns the size of a font in its point size.
Unlock Deck
Unlock for access to all 76 flashcards in this deck.
Unlock Deck
k this deck
41
Counter clockwise arcs are negative.
Unlock Deck
Unlock for access to all 76 flashcards in this deck.
Unlock Deck
k this deck
42
To draw a polygon,you pass to the method:
A)a brush or pen
B)an array of points
C)a brush or pen,and an array of points
D)a grid with a list of points drawn on it
A)a brush or pen
B)an array of points
C)a brush or pen,and an array of points
D)a grid with a list of points drawn on it
Unlock Deck
Unlock for access to all 76 flashcards in this deck.
Unlock Deck
k this deck
43
Arguments to the method for drawing an arc are the same as for the method to draw an ellipse.
Unlock Deck
Unlock for access to all 76 flashcards in this deck.
Unlock Deck
k this deck
44
An arc is a portion of an ellipse.
Unlock Deck
Unlock for access to all 76 flashcards in this deck.
Unlock Deck
k this deck
45
To close the polygon,the user needs to enter the first point twice,once at the beginning and once at the end.
Unlock Deck
Unlock for access to all 76 flashcards in this deck.
Unlock Deck
k this deck
46
For a polygon to be drawn correctly,the first pair of coordinates in the series of
Points passed to the DrawPolygon method must be the same as the last pair of coordinates.
Points passed to the DrawPolygon method must be the same as the last pair of coordinates.
Unlock Deck
Unlock for access to all 76 flashcards in this deck.
Unlock Deck
k this deck
47
The DrawRectangle method uses a Brush object.
Unlock Deck
Unlock for access to all 76 flashcards in this deck.
Unlock Deck
k this deck
48
The number of degrees that an arc traverses from its starting angle is known as the _____________.
A)traversed angle
B)size
C)arc angle
D)None of the above.
A)traversed angle
B)size
C)arc angle
D)None of the above.
Unlock Deck
Unlock for access to all 76 flashcards in this deck.
Unlock Deck
k this deck
49
The four integers that are passed to a Graphics method DrawRectangle represent the top-left and bottom-right corners of the rectangle.
Unlock Deck
Unlock for access to all 76 flashcards in this deck.
Unlock Deck
k this deck
50
The DrawPie method of class Graphics will create:
A)a picture of a pie
B)an arc with lines connecting to the center of the arc's ellipse
C)an arc that is filled in with color or patterns
D)there is no DrawPie method
A)a picture of a pie
B)an arc with lines connecting to the center of the arc's ellipse
C)an arc that is filled in with color or patterns
D)there is no DrawPie method
Unlock Deck
Unlock for access to all 76 flashcards in this deck.
Unlock Deck
k this deck
51
To make a filled rectangle use the syntax:
A)FillRectangle(Pen p,Integer x,Integer y,Integer width, Integer height)
B)DrawRectangle(Pen p,Integer x,Integer y,Integer width, Integer height)
C)FillRectangle(Brush b,Integer x,Integer y,Integer width,Integer height)
D)DrawRectangle(Brush b,Integer x,Integer y,Integer width,Integer height)
A)FillRectangle(Pen p,Integer x,Integer y,Integer width, Integer height)
B)DrawRectangle(Pen p,Integer x,Integer y,Integer width, Integer height)
C)FillRectangle(Brush b,Integer x,Integer y,Integer width,Integer height)
D)DrawRectangle(Brush b,Integer x,Integer y,Integer width,Integer height)
Unlock Deck
Unlock for access to all 76 flashcards in this deck.
Unlock Deck
k this deck
52
Arcs are described most specifically as _______________.
A)angles
B)portions of ellipses
C)half circles
D)None of the above
A)angles
B)portions of ellipses
C)half circles
D)None of the above
Unlock Deck
Unlock for access to all 76 flashcards in this deck.
Unlock Deck
k this deck
53
The difference between an open and closed polygon is:
A)the use OpenPolygon method.
B)the use of the ClosedPolygon method.
C)whether the last point is the same as the first.
D)the use of the AutoPolygon method.
A)the use OpenPolygon method.
B)the use of the ClosedPolygon method.
C)whether the last point is the same as the first.
D)the use of the AutoPolygon method.
Unlock Deck
Unlock for access to all 76 flashcards in this deck.
Unlock Deck
k this deck
54
An arc is drawn as part of an ellipse whose location is specified by the bounding rectangle of the ellipse.
Unlock Deck
Unlock for access to all 76 flashcards in this deck.
Unlock Deck
k this deck
55
Polygons are described most specifically as:
A)odd-sided shapes
B)multi-sided shapes
C)six-sided shapes
D)None of the above.
A)odd-sided shapes
B)multi-sided shapes
C)six-sided shapes
D)None of the above.
Unlock Deck
Unlock for access to all 76 flashcards in this deck.
Unlock Deck
k this deck
56
To form a circle,the syntax of an arc must be:
A)DrawArc( p,1,1,1,1,0,Math.PI )
B)DrawArc( p,1,1,1,1,360,0 )
C)DrawArc( p,1,1,1,1,0,360 )
D)DrawArc( p,1,1,1,1,360,Math.PI )
E)None of the above
A)DrawArc( p,1,1,1,1,0,Math.PI )
B)DrawArc( p,1,1,1,1,360,0 )
C)DrawArc( p,1,1,1,1,0,360 )
D)DrawArc( p,1,1,1,1,360,Math.PI )
E)None of the above
Unlock Deck
Unlock for access to all 76 flashcards in this deck.
Unlock Deck
k this deck
57
A Brush object can be used only to fill a shape with a color.
Unlock Deck
Unlock for access to all 76 flashcards in this deck.
Unlock Deck
k this deck
58
If you fill an open polygon an error occurs.
Unlock Deck
Unlock for access to all 76 flashcards in this deck.
Unlock Deck
k this deck
59
The order of a polygon's points does not matter.
Unlock Deck
Unlock for access to all 76 flashcards in this deck.
Unlock Deck
k this deck
60
The drawing objects provided to methods that draw shapes,such as Pen or Brush,determine characteristics such as the color and style of the specific shape.
Unlock Deck
Unlock for access to all 76 flashcards in this deck.
Unlock Deck
k this deck
61
To load an image that is on disk,use
A)instance method FromImage of class Image
B)instance method GetImage of class Image
C)static method Image.FromImage
D)static method Image.GetImage
A)instance method FromImage of class Image
B)instance method GetImage of class Image
C)static method Image.FromImage
D)static method Image.GetImage
Unlock Deck
Unlock for access to all 76 flashcards in this deck.
Unlock Deck
k this deck
62
A ___________displays a dialog in which the user can view the document that will print before it's sent to the printer.
A)PrintPreviewDialog
B)PreviewDialog
C)PrintViewDialog
D)DisplayDialog
A)PrintPreviewDialog
B)PreviewDialog
C)PrintViewDialog
D)DisplayDialog
Unlock Deck
Unlock for access to all 76 flashcards in this deck.
Unlock Deck
k this deck
63
LinearGradientMode.ForwardDiagonal creates a gradient from the upper-right to the lower-left corner.
Unlock Deck
Unlock for access to all 76 flashcards in this deck.
Unlock Deck
k this deck
64
Method FillPolygon fills a polygon that has already been drawn.
Unlock Deck
Unlock for access to all 76 flashcards in this deck.
Unlock Deck
k this deck
65
Image's method CreateGraphics is available only to picture-related controls.
Unlock Deck
Unlock for access to all 76 flashcards in this deck.
Unlock Deck
k this deck
66
The default event for a PrintDocument is the PrintPage event,which occurs when the data required to print the current page is needed-that is,when the document is printed or a print preview is generated.
Unlock Deck
Unlock for access to all 76 flashcards in this deck.
Unlock Deck
k this deck
67
GraphicsPath method AppendLine appends a line to the shape.
Unlock Deck
Unlock for access to all 76 flashcards in this deck.
Unlock Deck
k this deck
68
When using the DrawImage method of the class Image,the x and y coordinates are the __________ arguments,and represent the _________ corner of the image.
A)first and second,top-right
B)second and third,top-left
C)third and fourth,bottom-right
D)fourth and sixth,bottom-left
A)first and second,top-right
B)second and third,top-left
C)third and fourth,bottom-right
D)fourth and sixth,bottom-left
Unlock Deck
Unlock for access to all 76 flashcards in this deck.
Unlock Deck
k this deck
69
To insert a program into a new program,you must:
A)import that program with the Imports keyword
B)use the desired program as a control and use it in the form
C)implement the desired program
D)extend the desired program
A)import that program with the Imports keyword
B)use the desired program as a control and use it in the form
C)implement the desired program
D)extend the desired program
Unlock Deck
Unlock for access to all 76 flashcards in this deck.
Unlock Deck
k this deck
70
Graphics method RotateTransform enables you to rotate drawing positions around the __________.
A)upper-left corner
B)center
C)origin
D)lower-right corner
A)upper-left corner
B)center
C)origin
D)lower-right corner
Unlock Deck
Unlock for access to all 76 flashcards in this deck.
Unlock Deck
k this deck
71
In order to create a new picture on a Form,one makes a new Image object.
Unlock Deck
Unlock for access to all 76 flashcards in this deck.
Unlock Deck
k this deck
72
A Graphics object must be created on the Form in order to display an Image on that Form.
Unlock Deck
Unlock for access to all 76 flashcards in this deck.
Unlock Deck
k this deck
73
The __________ represent(s)the printable area of a page.
A)PrintBounds
B)Boundary
C)MarginBounds
D)Perimeter
A)PrintBounds
B)Boundary
C)MarginBounds
D)Perimeter
Unlock Deck
Unlock for access to all 76 flashcards in this deck.
Unlock Deck
k this deck
74
A TextureBrush is a brush that fills the interior of a shape with an image rather than a solid color.
Unlock Deck
Unlock for access to all 76 flashcards in this deck.
Unlock Deck
k this deck
75
Objects of type _________ hold the URL property of the file chosen by the user for the Windows Media Player.
A)URL
B)Link
C)AxMediaPlayer
D)Location
A)URL
B)Link
C)AxMediaPlayer
D)Location
Unlock Deck
Unlock for access to all 76 flashcards in this deck.
Unlock Deck
k this deck
76
You can provide width and height values to resize an Image.
Unlock Deck
Unlock for access to all 76 flashcards in this deck.
Unlock Deck
k this deck