Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I need to create a sand castle shaped like the one shown in the screenshot below that is located on the right side of the

  1. I need to create a sand castle shaped like the one shown in the screenshot below that is located on the right side of the beach.

  2. I need to use strokeRect(x,y,w,h) to outline the castle.

my html
/span> html>
charset="utf-8">
Canvas
="ex7.js" type="text/javascript" defer>

Fun on the Beach
id="myCanvas" height="500" width="800" style="border: 1px solid black">
My Js
ctx.arc(100, 100, 80, 0, 2 * Math.PI); //sun
ctx.fill();

ctx.fillStyle = "DarkOrange";
ctx.beginPath();
ctx.arc(MID, GROUND - 150, 150, Math.PI, 2 * Math.PI); // umbrella
ctx.fill();

ctx.fillStyle = "purple"; // first circle
ctx.beginPath();
ctx.arc(MID, GROUND - 175, 20, 0, 2 * Math.PI);
ctx.fill();

ctx.fillStyle = "purple"; // second circle
ctx.beginPath();
ctx.arc(MID - 100, GROUND - 175, 20, 0, 2 * Math.PI);
ctx.fill();

ctx.fillStyle = "purple"; // third circle
ctx.beginPath();
ctx.arc(MID + 100, GROUND - 175, 20, 0, 2 * Math.PI);
ctx.fill();

ctx.beginPath();
ctx.fillStyle = "darkgray";
ctx.fillRect(MID, GROUND-150, 10, 200); // umbrella
ctx.fill();

ctx.font = "30px Georgia";
ctx.fillStyle = "black"
ctx.strokeText("my name", width - 120, 30);

ctx.fillStyle = "brown";
ctx.strokeRect(600, GROUND - 50, 100, 100);
image text in transcribed
Your Name

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Machine Learning And Knowledge Discovery In Databases European Conference Ecml Pkdd 2010 Barcelona Spain September 2010 Proceedings Part 2 Lnai 6322

Authors: Jose L. Balcazar ,Francesco Bonchi ,Aristides Gionis ,Michele Sebag

2010th Edition

364215882X, 978-3642158827

More Books

Students also viewed these Databases questions

Question

What must a creditor do to become a secured party?

Answered: 1 week ago

Question

When should the last word in a title be capitalized?

Answered: 1 week ago

Question

Explain the importance of nonverbal messages.

Answered: 1 week ago

Question

Describe the advantages of effective listening.

Answered: 1 week ago

Question

Prepare an employment application.

Answered: 1 week ago