Raster operations
Cx.rasterize$( figures, { dpi: 25.4 } ).then( function( rasters ){ // ...});
Converts figures to a raster representation. By default the dpi is 25.4 * 3, allowing for some looseless up scaling afterwards.
Cx.vectorize$( rasters, { backColors : [ 'FFFFFF' ], foreColors : [ '000000', 'FF0000' ], regionResolution: 6, fitToCurveResolution: 7}).then( function( vectorFigures ) {
Convert the raster figures in vector representations.
Cut Outline
Cx.cutOutline$( figures, { offset: 10 }).then( function( cutOutlineFigures ) { // ...
Create a cut outline around a list of figures.
General
var f = Cx.findByType(figures,type);var fs = Cx.filterByType(figures,type);
find and filter versions to work with types directly.
Cx.forEachText(figures, function(text){ ... }, context);Cx.forEachShape(figures, function(shape){ ... }, context);Cx.forEachRaster(figures, function(raster){ ... }, context);Cx.forEachGroup(figures, function(group){ ... }, context);Cx.forEachProxyGroup(figures, function(proxyGroup){ ... }, context);
Iteration by figure type.
var cs = Cx.cloneDeep(figures);