If tried a couple of things to simply draw a line with famo.us means (not on the canvas).
Is there any possibilty to do that ?
If tried a couple of things to simply draw a line with famo.us means (not on the canvas).
Is there any possibilty to do that ?
Drawing a line in the DOM without canvas is not really drawing a line as much as creating an illusion of having drawn a line. This example shows how to make a surface look like a line.
Famo.us will allow you to create a surface with a
height
orwidth
of 1 with the alternative being the length you would like the line to be. With a little magicbackground-color
, the line will appear.Here is a working example
Create the Line
Setting an angle for the line
Remember: We are starting with a horizontal line, so we rotate starting from that perspective.
Add to the context