13,208
edits
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 = {}; | ||
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( | .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]] |