HTML5 Canvas Drawing App (Part 3/6)

preview_player
Показать описание

Official site

Twitter
Рекомендации по теме
Комментарии
Автор

Here's a tip my teacher taught me about vertically centering a single line of text in an element on which you have set the height...Set the *line-height* equal to the height:

*E.X.* you have buttons with one line of text:

*.button {*
   *height: 40px;* // always make buttons at least 40px for mobile devices
   *line-height: 40px;* // vertically centers text (play with the number and *padding-top* for multiple lines of text)
*}*

McGavel
Автор

Cool, thanks for the great info! I love how you put the *user-select* CSS in the reset rule, instead of in an assignable style class.

McGavel
Автор

Hi there, I have got a problem with implementing the size of radius stroke in to my app.
The reason i'm thinking is because my canvas is a function (so that I can use it as a button if i want to draw on it or not) and I cannot do the setradius(40) in the command window because it says that the context is undefined. (around 11:40 in your video). I am wondering what I can do to pass on the context and canvas variables to the radius function.(If that is what I need to do).

Appreciate your help very much.

Thank you.

LordShish
Автор

I discovered a nice special effect by disabling the points drawing part. For the serious version, I ended up disabling it below 3px as a simple anti-aliasing technique.

MrSaemichlaus
Автор

I have a problem with the radius button it cannot be click and the radius was not changing.

carlyip
Автор

I noticed that when you swipe the mouse in a very quick motion it looks very jaggy. Is there a way to add more dots per frame for a smoother line? Maybe increasing the frame speed?

cjb
Автор

Awesome tutorial! Why doesn't display inline block work like that, lol I always have weird problems with code

ren
Автор

there is a
make something on the canvas and then click multiple times on the drawn part and try to make something or overwrite it. Doing this, even when u leave the click button, the line keep following the mouse.

shubham
Автор

why does the background color change when you set it to save

koolstrings
Автор

Here is problem I'm having. I tried to bring this up on my android phone but it does not work. Also tried it with an Ipad and it does not work there either. This is not good because i'm making a white board for my math website.  Does anyone have any ideas?

MichaelGriffis
Автор

But I did this before part 2 but I needed to do this too

_Mackan
Автор

why not not you use ms-paint is better

riddhishah