Graphics2D icon indicating copy to clipboard operation
Graphics2D copied to clipboard

To think about: abstract position

Open keyten opened this issue 8 years ago • 0 comments

Position of the element do not have to be cartesian coords always. Now:

ctx.rect(x, y, width, height, fill, stroke);

To think about:

// polar coords
ctx.rect({ angle: 90, length: 50 }, width, height, fill, stroke);
// in-hex-engine coords
var hexEngine = ...
ctx.rect({ engine: hexEngine, r: 0, g: 0, b: 0 }, width, height, fill, stroke);
// maybe table-like, row-like, col-like, flex-line engines? with margins, paddings and etc

in Delta.More ofc.

It is neccessary to find out is v8 able to optimize functions passing arguments ob to another function. And think when is it neccessary to convert coords when init. Maybe additional predraw function for calculating position?

keyten avatar Jul 14 '17 15:07 keyten