Source code:
<div>
<div id="output"></div>
<canvas id="mycanvas" style="width:100%; height:200px;"></canvas>
</div>
fire.require(
function(){
var prj1 = new fire.cad.project.Project("mycanvas");
var url = "js/feltre_orto.png";
var raster = prj1.addRasterLayer("Bati", url);
raster.position = view.center;
var pt = new fire.gear.geom.Point(
new fire.gear.geom.Coordinate(50,50)
);
prj1.getOverLayer().addChild(pt);
pt.p_geom.strokeColor = 'white';
pt.p_geom.radius = 30;
var toolAverage = new fire.cad.tool.Tool();
toolAverage.onMouseMove = function(event) {
pt.p_geom.fillColor = raster.getAverageColor(event.point);
}
}, {
modules : [fire.Modules.CAD]
,mode : fire.Mode.BUILD
,otherScripts: []
,relative: "../lib/fire/"
}
);