Changes

Jump to: navigation, search

Canvas SVG Parser

22 bytes removed, 10:57, 23 February 2014
m
Hello World
m.file=file;
m.dlg = canvas.Window.new([x,y],"dialog");
 
# you can change the background color here
var color = {WHITE:[1,1,1,1],BLACK:[0,0,0,1]};
m.canvas = m.dlg.createCanvas().setColorBackground(color.BLACK);
m.root = m.canvas.createGroup();
update: func() {
# create a group for the imagevar svg_symbols = me.root.createChild("group", "navaidsvgfile"); # parse the SVG file
canvas.parsesvg(svg_symbols, me.file);
svg_symbols.setScale(0.35); # resize the image so that it can be fully seen (35%)
 
# resize the image so that it can be fully seen (35%)
svg_symbols.setScale(0.35);
},
init: func() {
var filename = "/Aircraft/Instruments/gyro.xml";
}, # init
}; # end of CanvasApplication
18,603
edits

Navigation menu