Filters
Question type

Study Flashcards

Which of the following is the context object property in charge of specifying vertical alignment for text in the canvas drawing area?


A) alignHorizontal
B) textAlign
C) textBaseline

D) A) and B)
E) A) and C)

Correct Answer

verifed

verified

How do you specify the color for the interior of a rectangle?


A) Use the rectangle object to call the <code>setColor</code> method.
B) Use the rectangle object to call the <code>setInterior</code> method.
C) Before calling <code>fillRect</code>, assign a color value to the context object's <code>fillStyle</code> property.

D) A) and B)
E) None of the above

Correct Answer

verifed

verified

Given the following syntax for the arc method, what do x and y represent? <code>context.arc(x, y, radius, start-angle, end-angle, counterclockwise) ;</code>


A) They are coordinates for the arc's center point.
B) They are coordinates for the arc's starting and ending points.
C) They are coordinates for the box that circumscribes the arc.

D) A) and B)
E) A) and C)

Correct Answer

verifed

verified

When assigning colors for canvas shapes, you can use any of the color value formats that are used for CSS.

A) True
B) False

Correct Answer

verifed

verified

What does the following method call do? context.setTransform(1, 0, 0, 1, 0, 0);

Correct Answer

verifed

verified

It restores the coor...

View Answer

After the browser engine assigns a value to the context object's lineWidth property, that line width will be used for all subsequent line drawings until the lineWidth property is reassigned.

A) True
B) False

Correct Answer

verifed

verified

If you would like your drawn rectangle's border to have a line width equal to the value specified by the lineWidth property, you should call the strokeRect method before the fillRect method.

A) True
B) False

Correct Answer

verifed

verified

To rotate around a position different from the coordinate system's origin, you should first call <code>translate</code> to move the origin so it is centered at the position where you want the rotation to take place.

A) True
B) False

Correct Answer

verifed

verified

Given the following syntax for the clearRect method, if you want to clear the entire canvas drawing area, what values are appropriate for the method's third and fourth arguments? Context.clearRect(top-left-x, top-left-y, width, height) ;


A) canvas.width, canvas.height (where canvas is the canvas element's object)
B) MAX_WIDTH, MAX_HEIGHT
C) null, null

D) None of the above
E) All of the above

Correct Answer

verifed

verified

Given the following syntax for the clearRect method, if you want to clear the entire canvas drawing area, what values are appropriate for the method's first two arguments? Context.clearRect(top-left-x, top-left-y, width, height) ;


A) 0, 0 (assuming the current coordinate system is the same as the canvas drawing area)
B) -1, -1
C) null, null

D) All of the above
E) A) and B)

Correct Answer

verifed

verified

Showing 21 - 30 of 30

Related Exams

Show Answer