Konva - drawing arrows on a path
Ever needed to put a direction of flow indicator on some connector line? In this post I explain a simple approach to get that done.
A tech blog giving usable explainers, advice, tools, tricks and techniques for the Konva JavaScript canvas library, the HTML5 canvas, and related subjects.
Posts about Konva.js, the JavaScript library adding an object model and other super powers to the HTML5 canvas lib.
Ever needed to put a direction of flow indicator on some connector line? In this post I explain a simple approach to get that done.
The font loading process is a stumbling block for folks new to using web-fonts in conjunction with Konva.Text and in the canvas. In this short post I'll explain what the problem is, how to solve it, and provide links to sample code. Read on...
Editing line points or vertices of a polygon is a recurring question I see in the Konva Discord. It gets tricky when the line or its parents are affected by transforms. Here's how to make a bulletproof solution that handles that.
We are often required to position shapes relative to each other - maybe circles mark points on a line - but then you move one of the shapes and update the others position but it doesn't make sense. The answer is relativity!
So you need to make an image mask. That means making a shape and drawing the image into that shape so that the area of the image outside the shape is cut off. But you can't use a path so clipping is off the menu. How to get the mask with composition operations or fill pattern image...
One of the common requirements we see coming through the Konva Discord channel is modifying the stock Transformer anchors with popular requests being how to change the anchors shape and colors, and how use an icon for the rotation anchors. Lets take a look...
The HTML5 canvas has the globalCompositeOperation feature which lets us control how new content being drawn onto the canvas will play with the content that is already there. Konva's API lets us apply it to our shapes. I was curious to visualize and understand what it does..
I'm developing an app that will generate / layout rich text in a canvas. So far my focus has been on the browser but now I need to do some automated testing for which I use node. But node doesn't provide text support out-of-the-box so we have to use node-canvas. How to work with text in node-canvas?