20,741
edits
(→Use from Nasal: Added the {{fg_root file}} template.) |
m (→Known Issues: @bugman and others seeing this: please actually give this a try using the Nasal Console) |
||
| Line 60: | Line 60: | ||
To see if that applies here, it would make sense to try an arbitrary canvas/image snippet in conjunction with a png image: http://wiki.flightgear.org/Canvas_Snippets#Adding_Raster_Images | To see if that applies here, it would make sense to try an arbitrary canvas/image snippet in conjunction with a png image: http://wiki.flightgear.org/Canvas_Snippets#Adding_Raster_Images | ||
<syntaxhighlight lang="nasal"> | |||
var (width,height) = (320,160); | |||
var title = 'canvas tooltip/png check'; | |||
var window = canvas.Window.new([width,height],"dialog") | |||
.set('title',title); | |||
var myCanvas = window.createCanvas(); | |||
myCanvas.set("background", "#ffaac0"); | |||
var root = myCanvas.createGroup(); | |||
var path = "gui/images/tooltip.png"; | |||
var child = root.createChild("image") | |||
.setFile(path) | |||
.setTranslation(100, 10) | |||
.setSize(130, 130); | |||
</syntaxhighlight> | |||
If those snippets also fail, it's almost certain that this is related to png image handling. So please be sure to make that test and report back. | If those snippets also fail, it's almost certain that this is related to png image handling. So please be sure to make that test and report back. | ||