Drawing axis and grids with Raphael JS Subscribe Pub

When you do, learn or teach 2D graphics, you need to keep calculating coordinates, to figure out where objects should go.

Here's a simple function that will draw axis and optionally a grid on a Raphael canvas, to help you make these calculations.

The most common sizes for a Raphael Javascript canvas are (220,220) or (420,220).

You can tell what the arguments are - they also have default values.

Just copy the code and use it as you wish.

Was this useful?    

By: Razie | 2014-04-23 .. 2016-10-06 | Tags: post , js , raphael , grid , javascript , canvas , html

See more in: Cool Scala Subscribe

Viewed 3795 times ( | Print ) this page.

You need to log in to post a comment!