Canvas alpha transparency

In canvas alpha transparency can be achieved in a number of ways. There is the global alpha property of the 2d drawing context, and then there is also using the rgba way of setting a web color. There are a number of other topics to canvas and alpha transparency also, such as using a png image with an alpha channel, and using the clear react method and having a background behind the canvas element. So lets look at some example that have to do with alpha transparency in html 5 canvas and javaScript.

Read More

Canvas examples on animation basics and beyond

So this is another post on canvas examples, and for this post it will be about some basics with animations using canvas. Making animations with canvas can be a fun, and rewarding experience and is definitely and example of the fun side of javaScript. In addition in some situations animations can also be helpful as well as a way to express data, or show how something works. There are many canvas frameworks out there, but for now I will be sticking to just plain old native client side javaScript by itself here.

Read More

The canvas clip method

The canvas clip method can be used to set a clipping area for a canvas. This is an area of the canvas that will be drawn to where everything outside of the clip area will not actually be drawn to the canvas. So in other words it is a way to go about making a mask of sorts for a canvas. The canvas clip method is used in a similar way to that of the fill and stroke methods, as it can be used with a path. That is a path can be used as a way to define the clip area and then the canvas clip method is what can be used to set that clip area. This method can also be used with the save and restore methods and layering.

Read More

lodash deburr and latin 1 Unicode car removal

When it comes to Unicode blocks there are the first few blocks that have to do with Latin characters. These kinds of characters come up now and then for cretin words that come from languages like Spanish. If for some reason I might be interested in just simply converting these kinds of strings into a string that contains just the first few ASCCI range characters I can used the lodash debuff method. This method in lodash just simply takes away any additional accent over a letter and just converts into a plain English style form of the word.

Read More