Exam 12: Canvas

arrow
  • Select Tags
search iconSearch Question
flashcardsStudy Flashcards
  • Select Tags

Given the following syntax for the arc method, the start-angle and end-angle arguments are the arc's starting and ending angles, in radians. context.arc(x, y, radius, start-angle, end-angle, counterclockwise);

Free
(True/False)
4.8/5
(41)
Correct Answer:
Verified

True

A benefit of using helper functions is that they allow you to execute the helper functions' tasks from different places in your program while avoiding redundant code.

Free
(True/False)
4.9/5
(35)
Correct Answer:
Verified

True

What is the context object property in charge of specifying horizontal alignment for text in the canvas drawing area?

Free
(Multiple Choice)
4.7/5
(41)
Correct Answer:
Verified

B

When you call the context object's <code>rotate</code> method, the JavaScript engine rotates the coordinate system around the origin and then refreshes the canvas drawing area by redrawing it.

(True/False)
4.7/5
(40)

In calling the context object's <code>rotate</code> method, which of the following arguments do you pass to it?

(Multiple Choice)
4.9/5
(38)

To indicate the start of a path:

(Multiple Choice)
4.9/5
(37)

A problem with Flash is that it is not built into browser software.

(True/False)
4.8/5
(36)

An applet is a stand-alone JavaScript program.

(True/False)
4.7/5
(36)

The ______ object represents the canvas element's drawing area. After retrieving it from the canvas object, you use it to call methods that draw and animate graphics objects.

(Short Answer)
4.8/5
(40)

If you call ctx.scale(2, 2) and then call ctx.scale(1.5, 1.5), what happens?

(Multiple Choice)
4.8/5
(37)

The standard way to clear the canvas drawing area is to call four of the context object's methods. What is the proper order for calling those methods?

(Multiple Choice)
4.7/5
(41)

The context object's <code>moveTo</code> method moves the drawing ______, so the JavaScript engine knows where you want to start writing.

(Short Answer)
4.8/5
(33)

If you translate a graphics object, you'll usually want to clear the canvas drawing area before you draw the translated object. If you rotate a graphics object, there's no need to clear the canvas drawing area. Why the difference?

(Essay)
4.9/5
(31)

The text that appears between the canvas element's tags is known as __________ content. It gets displayed when the user's browser doesn't support the canvas element.

(Short Answer)
4.9/5
(31)

Using named constants for shape positions and shape dimensions makes your web page drawings:

(Multiple Choice)
4.8/5
(47)

What happens when the following code executes? <code>ctx.strokeRect(0, 0, 250, 40);</code>

(Multiple Choice)
4.9/5
(32)

Suppose you have created an arc by calling the context object's <code>arc</code> method. If you then call the fill method, what happens?

(Multiple Choice)
4.9/5
(36)

For the context object's fillRect method, the JavaScript engine assumes units of pixels for the x, y, width, and height argument values, and the programmer does not specify units explicitly.

(True/False)
4.8/5
(36)

To adjust the number of pixels that position and size values represent, you can call the context object's ______ method.

(Short Answer)
4.9/5
(42)

Given the following syntax for the arc method, describe the purpose of counterclockwise. context.arc(x, y, radius, start-angle, end-angle, counterclockwise);

(Essay)
4.8/5
(46)
Showing 1 - 20 of 30
close modal

Filters

  • Essay(0)
  • Multiple Choice(0)
  • Short Answer(0)
  • True False(0)
  • Matching(0)