Canvas EFB framework: Difference between revisions

Jump to navigation Jump to search
no edit summary
No edit summary
No edit summary
Line 53: Line 53:
   }}
   }}
}}
}}
{{FGCquote|1= More recently, another idea is to add dedicated PDF support to the core Canvas system, so that arbitrary PDF files can be rendered onto a Canvas: [http://forum.flightgear.org/viewtopic.php?f=71&amp;t=27499&amp;p=258282#p258282 viewtopic.php?f=71&amp;t=27499&amp;p=258282#p258282]|2= {{cite web  | url    = http://forum.flightgear.org/viewtopic.php?p=258879#p258879  | title  = <nowiki>Canvas MFD framework vs. EFB functionality</nowiki>  | author = <nowiki>Hooray</nowiki>  | date  = Sep 27th, 2015  }}}}
{{FGCquote|1= It might be also possible to decrease the quality of any PDFs a little to drop the sie.  It would be good to have everything self contained, for easy reference.  Was the procedure to carry these on the shuttle for quick lookups?  Hmmm, I'm now wondering about a [http://forum.flightgear.org/viewtopic.php?f=71&amp;t=23204&amp;start=45#p214381 canvas PDF viewer]!|2= {{cite web  | url    = http://forum.flightgear.org/viewtopic.php?p=257936#p257936  | title  = <nowiki>Re: Space Shuttle</nowiki>  | author = <nowiki>bugman</nowiki>  | date  = Sep 18th, 2015  }}}}
{{FGCquote|1= See: [[Canvas Development#PDF]]It may make sense to revisit this idea, supporting a subset of PDF would not be too difficult, but it would be better to really use a PDF library and OSG's built-in suport for rendering a PDF to a texture, which could the be easily turned into a new Canvas Element, as per the example at: [[Canvas Development#Adding a new Element]]The coding part is relatively straightforward (basically copy&amp;paste), but getting the dependencies/cmake magic right for all supported FG platforms would probably require a bit of work.|2= {{cite web  | url    = http://forum.flightgear.org/viewtopic.php?p=258282#p258282  | title  = <nowiki>Re: 777 EFB: initial feedback</nowiki>  | author = <nowiki>Hooray</nowiki>  | date  = Sep 21st, 2015  }}}}
{{FGCquote|1= I checked the OSG source tree and examples there, the C++ code is directly dealing with an osg::Image and the cpp file is just 100 lines, so it seems fairly compact:
*  https://github.com/openscenegraph/osg/blob/master/include/osgWidget/PdfReader
*  https://github.com/openscenegraph/osg/blob/master/src/osgWidget/PdfReader.cpp
Adapting our CanvasImage code to also support PDF files should be fairly straightforward and not even take very long - so we can revisit this post 3.2 and I can also post some patches to get this started.|2= {{cite web  | url    = http://forum.flightgear.org/viewtopic.php?p=214381#p214381  | title  = <nowiki>Canvas Element for rendering PDFs ? (split)</nowiki>  | author = <nowiki>Hooray</nowiki>  | date  = Jul 8th, 2014  }}}}


== Motivation ==
== Motivation ==
Line 69: Line 81:
{{FGCquote|1= the whole EFB idea has also been discussed previously, with a focus on using Canvas and Nasal - analogous to how Richard's MFD framework is just a front-end on top of Canvas/Nasal. Obviously, this approach (it not using Phi), has the limitation that it can only display stuff inside the fgfs main window.But we do have code/prototypes doing EFB handling using Nasal &amp; Canvas|2= {{cite web  | url    = http://forum.flightgear.org/viewtopic.php?p=258879#p258879  | title  = <nowiki>Canvas MFD framework vs. EFB functionality</nowiki>  | author = <nowiki>Hooray</nowiki>  | date  = Sep 27th, 2015  }}}}
{{FGCquote|1= the whole EFB idea has also been discussed previously, with a focus on using Canvas and Nasal - analogous to how Richard's MFD framework is just a front-end on top of Canvas/Nasal. Obviously, this approach (it not using Phi), has the limitation that it can only display stuff inside the fgfs main window.But we do have code/prototypes doing EFB handling using Nasal &amp; Canvas|2= {{cite web  | url    = http://forum.flightgear.org/viewtopic.php?p=258879#p258879  | title  = <nowiki>Canvas MFD framework vs. EFB functionality</nowiki>  | author = <nowiki>Hooray</nowiki>  | date  = Sep 27th, 2015  }}}}


{{FGCquote|1= More recently, another idea is to add dedicated PDF support to the core Canvas system, so that arbitrary PDF files can be rendered onto a Canvas: [http://forum.flightgear.org/viewtopic.php?f=71&amp;t=27499&amp;p=258282#p258282 viewtopic.php?f=71&amp;t=27499&amp;p=258282#p258282]|2= {{cite web  | url    = http://forum.flightgear.org/viewtopic.php?p=258879#p258879  | title  = <nowiki>Canvas MFD framework vs. EFB functionality</nowiki>  | author = <nowiki>Hooray</nowiki>  | date  = Sep 27th, 2015  }}}}
{{FGCquote|1= It might be also possible to decrease the quality of any PDFs a little to drop the sie.  It would be good to have everything self contained, for easy reference.  Was the procedure to carry these on the shuttle for quick lookups?  Hmmm, I'm now wondering about a [http://forum.flightgear.org/viewtopic.php?f=71&amp;t=23204&amp;start=45#p214381 canvas PDF viewer]!|2= {{cite web  | url    = http://forum.flightgear.org/viewtopic.php?p=257936#p257936  | title  = <nowiki>Re: Space Shuttle</nowiki>  | author = <nowiki>bugman</nowiki>  | date  = Sep 18th, 2015  }}}}


{{FGCquote|1= See: [[Canvas Development#PDF]]It may make sense to revisit this idea, supporting a subset of PDF would not be too difficult, but it would be better to really use a PDF library and OSG's built-in suport for rendering a PDF to a texture, which could the be easily turned into a new Canvas Element, as per the example at: [[Canvas Development#Adding a new Element]]The coding part is relatively straightforward (basically copy&amp;paste), but getting the dependencies/cmake magic right for all supported FG platforms would probably require a bit of work.|2= {{cite web  | url    = http://forum.flightgear.org/viewtopic.php?p=258282#p258282  | title  = <nowiki>Re: 777 EFB: initial feedback</nowiki>  | author = <nowiki>Hooray</nowiki>  | date  = Sep 21st, 2015  }}}}
{{FGCquote|1= I checked the OSG source tree and examples there, the C++ code is directly dealing with an osg::Image and the cpp file is just 100 lines, so it seems fairly compact:
*  https://github.com/openscenegraph/osg/blob/master/include/osgWidget/PdfReader
*  https://github.com/openscenegraph/osg/blob/master/src/osgWidget/PdfReader.cpp
Adapting our CanvasImage code to also support PDF files should be fairly straightforward and not even take very long - so we can revisit this post 3.2 and I can also post some patches to get this started.|2= {{cite web  | url    = http://forum.flightgear.org/viewtopic.php?p=214381#p214381  | title  = <nowiki>Canvas Element for rendering PDFs ? (split)</nowiki>  | author = <nowiki>Hooray</nowiki>  | date  = Jul 8th, 2014  }}}}


== Background ==
== Background ==

Navigation menu