Howto:Dynamic Liveries via Canvas: Difference between revisions

Jump to navigation Jump to search
m
cat
m (→‎Canvas Code: add untested snippet)
m (cat)
(3 intermediate revisions by one other user not shown)
Line 121: Line 121:
# hash with all layers/images added
# hash with all layers/images added
m.layers = {};
m.layers = {};
var.basepath = path;
m.basepath = path;


# return the new object to the caller
# return the new object to the caller
Line 137: Line 137:
# Put a raster image into the canvas and save the image in a hash: layers['EF2000.png].hide();
# Put a raster image into the canvas and save the image in a hash: layers['EF2000.png].hide();
m.layers[image] = root.createChild("image")
m.layers[image] = root.createChild("image")
     .setFile( path~image )
     .setFile( m.basepath~image )
     .setSize(2048,2048)
     .setSize(2048,2048)
return m.layers[image];
return m.layers[image];
Line 325: Line 325:
   }}
   }}
}}
}}
[[Category:Canvas]]
[[Category:Aircraft enhancement]]

Navigation menu