HTML article,Canvas Rectangle, Shadow, Path and Text training in HTML
نوشته شده توسط : dotnek

Web owners are always trying to improve the quality of content on the web and in order to achieve this goal, they take various measures and use all available facilities, to draw graphics on web pages, you can use the Canvas element, which we are going to explain to you in this regard, so that we can learn the ways to implement important things together, such as adding shadows, text, and so on.

What is HTML Canvas?

This element is used to draw graphics, and the important point is that, in order to do this, scripting is required, which is usually used in JavaScript and you can apply the graphics through it, finally, with the help of this element, text, shadows, paths, etc., can be added to the images, if you want to make them more attractive to different users.This element is one of the most attractive features in HTML5 , and it should be noted that almost all browsers today support Canvas, and through it, you can draw graphics using JavaScript while running (On The Fly).

Canvas Rectangle:

This method is used in order to draw a rectangle which has various parameters that we are going to mention in the following.

Available parameters:

- width:

This parameter represents the width of the rectangle which is in pixels.

- Height:

As you know, in addition to the width of the rectangle, it also has a length, which determines the height of the rectangle, and it is also in pixels.

- x:

By using this parameter, you can specify the coordinates that the upper-left corner of the rectangle should have and determine where the rectangle should start from.

- y:

This parameter also specifies the coordinates of the upper-left corner, so with these 4 parameters, a rectangle can be drawn.Another point that should be mentioned is that you can also specify the color of the rectangle by using the command ctx.strokeStyle, which we are going to show you an example of coding in order to draw a rectangle with the help of JavaScript .For example, suppose you want to draw a blue rectangle with line width 6, length 250, width 150 and at 5&5 point, you need to do the following with JavaScript. 

Read more on:https://www.dotnek.com/Blog/Web/canvas-rectangle-shadow-path-and-text-trainin

link:https://dotnek.mystrikingly.com/

Related link:Which country has the best hackers?





:: برچسب‌ها: dotnek , seo , site ,
:: بازدید از این مطلب : 59
|
امتیاز مطلب : 0
|
تعداد امتیازدهندگان : 0
|
مجموع امتیاز : 0
تاریخ انتشار : دو شنبه 18 مرداد 1400 | نظرات ()
مطالب مرتبط با این پست
لیست
می توانید دیدگاه خود را بنویسید


نام
آدرس ایمیل
وب سایت/بلاگ
:) :( ;) :D
;)) :X :? :P
:* =(( :O };-
:B /:) =DD :S
-) :-(( :-| :-))
نظر خصوصی

 کد را وارد نمایید:

آپلود عکس دلخواه: