Search found 26 matches: sprintf canvas

Return to advanced search

API documentation for canvas

Is there an API doc for canvas. where? I'm also in need for information about formating numerical text. Is there ... like... .setFormat("%3.0f"); ah, I think I just found it... .setText(sprintf("%4.0f", 100.0 * getprop("/fdm/jsbsim/systems/apu/apu/apu-rpm-fraction")) ...
by wlbragg
Fri Apr 05, 2019 6:21 pm
 
Forum: Canvas
Topic: API documentation for canvas
Replies: 1
Views: 587

Re: IDG A32X Development

... seeing all over the place when it comes to people implementing Nasal/Canvas based avionics, because they usually don't understand dataflow/update ... in other threads where I suggested to introduce property lists with sprintf-style formatting to significantly reduce the property overhead. [...] ...
by Hooray
Sat Mar 24, 2018 8:39 am
 
Forum: Aircraft
Topic: IDG A32X Development Archive - Closed
Replies: 2165
Views: 223017

Re: Canvas display property I/O

... to provide a vector of properties to be fetched and mapped into the sprintf-style string I actually don't think having the getter function canvas-side is a good idea. What is needed there/works best depends on what system you're trying ...
by Thorsten
Sun Mar 19, 2017 1:33 pm
 
Forum: Canvas
Topic: Canvas display property I/O
Replies: 13
Views: 2821

Re: Canvas display property I/O

... the situation where just calling an API has very different parameter requirements compared to setting it up in the first place (imagine the sprintf/getprop use-case where you need to fetch a vector of properties via getprop to populate a formatted string)
by Hooray
Sun Mar 19, 2017 12:24 pm
 
Forum: Canvas
Topic: Canvas display property I/O
Replies: 13
Views: 2821

Re: Canvas display property I/O

... this would be the right place for us to review/optimize if/when the Canvas::Text element is updated accordingly (e.g. to support sprintf-style format strings for labels that may need to look up/format multiple properties ...
by Hooray
Sun Mar 19, 2017 11:24 am
 
Forum: Canvas
Topic: Canvas display property I/O
Replies: 13
Views: 2821

Re: Canvas display property I/O

... ago when we covered property I/O being the bottleneck when it comes to Canvas performance, I specifically mentioned how this should not go through ... reasons, I suggested that we introduce a mode that directly supports sprintf-style format strings so that CanvasText updates would never have ...
by Hooray
Sat Mar 18, 2017 3:15 pm
 
Forum: Canvas
Topic: Canvas display property I/O
Replies: 13
Views: 2821

Re: Nasal must go

... address the underlying problem. For example, I'd much rather see the Canvas system improved, then specifically porting a single instrument to ... in other threads where I suggested to introduce property lists with sprintf-style formatting to significantly reduce the property overhead. There ...
by Hooray
Fri Oct 28, 2016 6:31 pm
 
Forum: Canvas
Topic: Canvas ADI ball (shuttle) / circular clipping
Replies: 22
Views: 4360

Re: User language

Canvas already uses osgText internally, and supports utf8. That is why I mentioned the PUI workaround using sprintf-style format strings in conjunction with live properties - you can then simply use a hash map to emulate ...
by Hooray
Sat Aug 13, 2016 11:10 am
 
Forum: Aircraft
Topic: User language
Replies: 13
Views: 2606

Re: User language

Note that any Canvas dialog can trivially support this use-case. To accomplish the same thing for PUI dialog, you'd need to use dynamic (sprintf-based) "live" property labels and make those reference properties instead of static ...
by Hooray
Fri Aug 12, 2016 7:53 pm
 
Forum: Aircraft
Topic: User language
Replies: 13
Views: 2606

Re: Canvas and properties

... hooks eventually - i.e. it would be relatively simple to hack the Canvas:Element code to also support property values, i.e. values retrieved ... code rather significantly, especially in conjunction with supporting sprintf-style format strings - but that would require some c++ changes, for ...
by Hooray
Tue Aug 09, 2016 5:01 pm
 
Forum: Canvas
Topic: [SOLVED] Canvas and properties
Replies: 8
Views: 1744

Re: Space Shuttle

... I have no doubt that the shuttle has the most number of active Canvas screens, but its visual part of the avionics (the representation on-screen) ... the typical shuttle display will have more or less a 1:1 mapping from a sprintf/getprop() call to a setText() equivalent which maps to OSGText nodes, ...
by Hooray
Mon May 09, 2016 5:02 pm
 
Forum: Spaceflight
Topic: Space Shuttle
Replies: 2859
Views: 514824

Re: Space Shuttle

... panes. I think it's pretty efficient the way it's structured even using sprintf as there aren't going to be that many wasted cycles even with the ... I'd need to see evidence of a real performance impact of the MDU Nasal/Canvas code that we have before it gets changed.
by Richard
Sat Dec 19, 2015 9:05 pm
 
Forum: Spaceflight
Topic: Space Shuttle
Replies: 2859
Views: 514824

Re: Space Shuttle

... be encapsulated in a fashion so that common coding constructs (such as sprintf/getprop idiom) are put into a helper function, which can later on ... these can be wrapped using a helper function that: ⋅  take a CanvasText element ⋅  accept a sprintf format string ⋅  ...
by Hooray
Sat Dec 19, 2015 7:23 pm
 
Forum: Spaceflight
Topic: Space Shuttle
Replies: 2859
Views: 514824

Re: Space Shuttle

I'm currently not sure if we can share the canvas elements across displays, so I've made copies of everything for each display. ... is using, too. In the case of propery-driven labels that are formatted using sprintf(), it would probably be easier to just introduce a helper function, and ...
by Hooray
Sat Dec 19, 2015 3:31 pm
 
Forum: Spaceflight
Topic: Space Shuttle
Replies: 2859
Views: 514824

Re: Space Shuttle

So the point is not that sprintf() is slow, but that the whole mechanism of using getprop() calls wrapped in ... is referenced by all of the displays. I'm currently not sure if we can share the canvas elements across displays, so I've made copies of everything for each display. ...
by Richard
Sat Dec 19, 2015 3:12 pm
 
Forum: Spaceflight
Topic: Space Shuttle
Replies: 2859
Views: 514824
Next

Return to advanced search