{"id":3446,"date":"2026-09-15T01:40:10","date_gmt":"2026-09-14T17:40:10","guid":{"rendered":"http:\/\/www.contree-durban-corbieres.com\/blog\/?p=3446"},"modified":"2026-09-15T01:40:10","modified_gmt":"2026-09-14T17:40:10","slug":"how-to-draw-a-semi-circle-on-a-canvas-4153-ab8f83","status":"publish","type":"post","link":"http:\/\/www.contree-durban-corbieres.com\/blog\/2026\/09\/15\/how-to-draw-a-semi-circle-on-a-canvas-4153-ab8f83\/","title":{"rendered":"How to draw a semi &#8211; circle on a Canvas?"},"content":{"rendered":"<p>Drawing a semi &#8211; circle on a Canvas may seem like a simple task, but it involves a good understanding of the Canvas API and basic geometric concepts. In this blog post, I&#8217;ll guide you through the process of drawing a semi &#8211; circle on a Canvas, and also share some insights as a Canvas supplier. <a href=\"https:\/\/www.shengruntextile.com\/fabric\/canvas\/\">Canvas<\/a><\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.shengruntextile.com\/uploads\/202017142\/small\/embroidered-polyester-fabric-net-lace-for56205928912.jpg\"><\/p>\n<h3>Understanding the Basics of the Canvas<\/h3>\n<p>Before we start drawing a semi &#8211; circle, it&#8217;s essential to understand what a Canvas is. The HTML5 Canvas is an element that provides a graphics surface on a web page. Using JavaScript, we can manipulate this surface to draw shapes, animate objects, and create interactive graphics.<\/p>\n<p>To start using the Canvas, you need to create a <code>&lt;canvas&gt;<\/code> element in your HTML file. Here&#8217;s a basic example:<\/p>\n<pre><code class=\"language-html\">&lt;canvas id=&quot;myCanvas&quot; width=&quot;400&quot; height=&quot;400&quot;&gt;&lt;\/canvas&gt;\n<\/code><\/pre>\n<p>In JavaScript, we can then access the Canvas and its 2D rendering context:<\/p>\n<pre><code class=\"language-javascript\">const canvas = document.getElementById('myCanvas');\nconst ctx = canvas.getContext('2d');\n<\/code><\/pre>\n<h3>Drawing a Semi &#8211; Circle: The Arc Method<\/h3>\n<p>The most common way to draw a semi &#8211; circle on a Canvas is by using the <code>arc()<\/code> method of the 2D context. The <code>arc()<\/code> method creates an arc (a part of a circle). The signature of the <code>arc()<\/code> method is as follows:<\/p>\n<pre><code class=\"language-javascript\">ctx.arc(x, y, radius, startAngle, endAngle, anticlockwise);\n<\/code><\/pre>\n<ul>\n<li><code>x<\/code> and <code>y<\/code>: The coordinates of the center of the circle.<\/li>\n<li><code>radius<\/code>: The radius of the circle.<\/li>\n<li><code>startAngle<\/code> and <code>endAngle<\/code>: The angles in radians where the arc begins and ends.<\/li>\n<li><code>anticlockwise<\/code>: A boolean value indicating whether the arc should be drawn in an anticlockwise direction.<\/li>\n<\/ul>\n<p>To draw a semi &#8211; circle, we need to define the start and end angles appropriately. A full circle has an angle of <code>2 * Math.PI<\/code> radians. So, for a semi &#8211; circle, we can set the start angle to <code>0<\/code> and the end angle to <code>Math.PI<\/code> (for a clockwise semi &#8211; circle) or <code>Math.PI<\/code> to <code>2 * Math.PI<\/code> (for an anticlockwise semi &#8211; circle).<\/p>\n<p>Here&#8217;s an example code snippet to draw a clockwise semi &#8211; circle:<\/p>\n<pre><code class=\"language-javascript\">const canvas = document.getElementById('myCanvas');\nconst ctx = canvas.getContext('2d');\n\n\/\/ Center coordinates\nconst x = canvas.width \/ 2;\nconst y = canvas.height \/ 2;\nconst radius = 50;\nconst startAngle = 0;\nconst endAngle = Math.PI;\nconst anticlockwise = false;\n\nctx.beginPath();\nctx.arc(x, y, radius, startAngle, endAngle, anticlockwise);\nctx.stroke();\n<\/code><\/pre>\n<p>In this code, we first calculate the center coordinates of the Canvas. Then we define the radius, start angle, end angle, and the direction of the arc. We use <code>beginPath()<\/code> to start a new path, draw the arc using <code>arc()<\/code>, and finally, we use <code>stroke()<\/code> to draw the outline of the semi &#8211; circle.<\/p>\n<h3>Customizing the Semi &#8211; Circle<\/h3>\n<p>Once you have drawn a basic semi &#8211; circle, you can customize it in various ways.<\/p>\n<h4>Filling the Semi &#8211; Circle<\/h4>\n<p>Instead of just drawing the outline, you can fill the semi &#8211; circle with a color using the <code>fill()<\/code> method. Here&#8217;s how:<\/p>\n<pre><code class=\"language-javascript\">ctx.beginPath();\nctx.arc(x, y, radius, startAngle, endAngle, anticlockwise);\nctx.fillStyle = 'blue';\nctx.fill();\n<\/code><\/pre>\n<p>In this example, we set the <code>fillStyle<\/code> property to <code>'blue'<\/code> and then use the <code>fill()<\/code> method to fill the semi &#8211; circle with that color.<\/p>\n<h4>Changing the Line Width and Color<\/h4>\n<p>You can also change the width and color of the outline of the semi &#8211; circle. The <code>lineWidth<\/code> property sets the width of the line, and the <code>strokeStyle<\/code> property sets the color of the line.<\/p>\n<pre><code class=\"language-javascript\">ctx.beginPath();\nctx.arc(x, y, radius, startAngle, endAngle, anticlockwise);\nctx.lineWidth = 5;\nctx.strokeStyle = 'red';\nctx.stroke();\n<\/code><\/pre>\n<h3>Drawing Multiple Semi &#8211; Circles<\/h3>\n<p>You can draw multiple semi &#8211; circles on the same Canvas by repeating the drawing process with different parameters. For example, you can draw semi &#8211; circles with different radii, positions, or colors.<\/p>\n<pre><code class=\"language-javascript\">const canvas = document.getElementById('myCanvas');\nconst ctx = canvas.getContext('2d');\n\n\/\/ Draw the first semi - circle\nconst x1 = 100;\nconst y1 = 100;\nconst radius1 = 30;\nctx.beginPath();\nctx.arc(x1, y1, radius1, 0, Math.PI, false);\nctx.fillStyle = 'green';\nctx.fill();\n\n\/\/ Draw the second semi - circle\nconst x2 = 200;\nconst y2 = 200;\nconst radius2 = 40;\nctx.beginPath();\nctx.arc(x2, y2, radius2, 0, Math.PI, false);\nctx.fillStyle = 'orange';\nctx.fill();\n<\/code><\/pre>\n<h3>As a Canvas Supplier<\/h3>\n<p>As a Canvas supplier, I understand the importance of high &#8211; quality materials for creating beautiful and precise graphics. Our Canvas products are designed to meet the needs of both professional artists and hobbyists.<\/p>\n<p>We offer a wide range of Canvas sizes and textures. Whether you need a small Canvas for a detailed sketch or a large one for a mural, we have you covered. Our Canvas is made from premium materials that ensure durability and excellent paint adhesion.<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.shengruntextile.com\/uploads\/202017142\/small\/100-cotton-tr-grey-cloth-fabric52189832047.jpg\"><\/p>\n<p>When you&#8217;re working on projects that involve drawing semi &#8211; circles or other complex shapes, having a smooth and consistent Canvas surface is crucial. Our Canvas provides the perfect foundation for your creative endeavors.<\/p>\n<h3>Why Choose Our Canvas?<\/h3>\n<ul>\n<li><strong>Quality Assurance<\/strong>: We have strict quality control measures in place to ensure that each Canvas meets our high standards.<\/li>\n<li><strong>Variety<\/strong>: With a diverse range of sizes and textures, you can find the perfect Canvas for your project.<\/li>\n<li><strong>Affordability<\/strong>: We offer competitive prices without compromising on quality.<\/li>\n<\/ul>\n<p><a href=\"https:\/\/www.shengruntextile.com\/embroidery\/embroidery-tablecloth\/\">Embroidery Tablecloth<\/a> If you&#8217;re interested in purchasing our Canvas products for your next project, whether it&#8217;s a simple semi &#8211; circle drawing or a more elaborate artwork, we&#8217;d love to have a conversation with you. Reaching out to us is easy, and we&#8217;re always here to assist with any questions or product details you may need. Don&#8217;t hesitate to get in touch with us to discuss your procurement needs and explore the possibilities our Canvas can offer for your creative journey.<\/p>\n<h3>References<\/h3>\n<ul>\n<li>HTML5 Canvas API documentation<\/li>\n<li>JavaScript for Web Developers textbooks<\/li>\n<li>Online tutorials on Canvas graphics<\/li>\n<\/ul>\n<hr>\n<p><a href=\"https:\/\/www.shengruntextile.com\/\">Shandong Shengrun Textile Co., Ltd.<\/a><br \/>With over 15 years of experience, Shandong Shengrun Textile Co., Ltd. is one of the most professional canvas manufacturers and suppliers in China. Please rest assured to buy or wholesale durable canvas in stock here from our factory.<br \/>Address: 9th Floor, Hui Ji Business Tower, Ren Cheng District, Ji Ning, Shan Dong, China<br \/>E-mail: liang@shengrungroup.com<br \/>WebSite: <a href=\"https:\/\/www.shengruntextile.com\/\">https:\/\/www.shengruntextile.com\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Drawing a semi &#8211; circle on a Canvas may seem like a simple task, but it &hellip; <a title=\"How to draw a semi &#8211; circle on a Canvas?\" class=\"hm-read-more\" href=\"http:\/\/www.contree-durban-corbieres.com\/blog\/2026\/09\/15\/how-to-draw-a-semi-circle-on-a-canvas-4153-ab8f83\/\"><span class=\"screen-reader-text\">How to draw a semi &#8211; circle on a Canvas?<\/span>Read more<\/a><\/p>\n","protected":false},"author":5,"featured_media":3446,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[3409],"class_list":["post-3446","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-industry","tag-canvas-4dde-abe296"],"_links":{"self":[{"href":"http:\/\/www.contree-durban-corbieres.com\/blog\/wp-json\/wp\/v2\/posts\/3446","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.contree-durban-corbieres.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.contree-durban-corbieres.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.contree-durban-corbieres.com\/blog\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"http:\/\/www.contree-durban-corbieres.com\/blog\/wp-json\/wp\/v2\/comments?post=3446"}],"version-history":[{"count":0,"href":"http:\/\/www.contree-durban-corbieres.com\/blog\/wp-json\/wp\/v2\/posts\/3446\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"http:\/\/www.contree-durban-corbieres.com\/blog\/wp-json\/wp\/v2\/posts\/3446"}],"wp:attachment":[{"href":"http:\/\/www.contree-durban-corbieres.com\/blog\/wp-json\/wp\/v2\/media?parent=3446"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.contree-durban-corbieres.com\/blog\/wp-json\/wp\/v2\/categories?post=3446"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.contree-durban-corbieres.com\/blog\/wp-json\/wp\/v2\/tags?post=3446"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}