The words Under construction in black text on a yellow background with diagonal black stipes surrounding it
I'm in the process of moving my site. It's still a work in progress. Please excuse the mess and broken links.

Make A Circle On An HTML Canvas

TODO: Pull subtitle into page object html_start_default_section html_end_default_section script_start_default_section script_end_default_section

Notes

Debugging Stuff

I'm moving stuff around right now. All this below is helping me figure out where to put stuff

        -- title

Make A Circle On An HTML Canvas

this is how I'm putting a circle on a
canvas

-- html/
-- show: below

<canvas id="example" width="100" height="80"></canvas>

-- /html

-- script/
-- show

document.addEventListener("DOMContentLoaded", () => {

  const c = document.getElementById("example")
  const ctx = c.getContext("2d")

  ctx.beginPath()
  ctx.arc(40, 40, 30, 0, 2 * Math.PI)
  ctx.fillStyle = "crimson"
  ctx.fill()
  ctx.strokeStyle = "white"
  ctx.stroke()
  ctx.closePath()

})

-- /script


-- notes
-- title: Notes

- The order of the variables is `.arc()`` is:

x, y, radius, startAngle, endAngle


-- categories
-- JavaScript 
-- HTML
-- WebDev

-- metadata
-- date: 2021-05-20 13:36:53
-- id: 01f65dkz
-- status: draft 
-- type: post
-- site: aws