20,741
edits
Line 12: | Line 12: | ||
Alternatively, a good/better workaround may be to use a raster image and register event listeners, to show an embedded canvas with the actual canvas displayed separately - that is an approach that F-JJTH originally came up with. | Alternatively, a good/better workaround may be to use a raster image and register event listeners, to show an embedded canvas with the actual canvas displayed separately - that is an approach that F-JJTH originally came up with. | ||
Basically, you'd have a "shell" with controls (think widgets) and an inner canvas showing the actual graph, which is accomplished using clipping (you can treat another canvas as a raster image and place it in an outer canvas) - for example, the red area is treated as a screen region, where the instrument is displayed, whereas the outer area is just a conventional raster image that responds to "events" to set up the instrument/oscilloscope):[[File:Canvas-mfd-framework-prototyping.png|250px]]Note that this would make it possible to have all sorts of custom "skins" (think themes) for your "oscilloscope" - if that's what you are having in mind, i.e. without having to create any missing GUI widgets from scratch, and also without having to use the legacy PUI engine.<ref>{{cite web |url = https://forum.flightgear.org/viewtopic.php?p=325378#p325378 |title = <nowiki> Re: Plot2D and graph helpers </nowiki> |author = <nowiki> Hooray </nowiki> |date = Dec 28th, 2017 |added = Dec 28th, 2017 |script_version = 0.36 }}</ref> | Basically, you'd have a "shell" with controls (think widgets) and an inner canvas showing the actual graph, which is accomplished using clipping (you can treat another canvas as a raster image and place it in an outer canvas) - for example, the red area is treated as a screen region, where the instrument is displayed, whereas the outer area is just a conventional raster image that responds to "events" to set up the instrument/oscilloscope): | ||
[[File:Canvas-mfd-framework-prototyping.png|250px]] | |||
Note that this would make it possible to have all sorts of custom "skins" (think themes) for your "oscilloscope" - if that's what you are having in mind, i.e. without having to create any missing GUI widgets from scratch, and also without having to use the legacy PUI engine.<ref>{{cite web |url = https://forum.flightgear.org/viewtopic.php?p=325378#p325378 |title = <nowiki> Re: Plot2D and graph helpers </nowiki> |author = <nowiki> Hooray </nowiki> |date = Dec 28th, 2017 |added = Dec 28th, 2017 |script_version = 0.36 }}</ref> | |||