Presentation is loading. Please wait.

Presentation is loading. Please wait.

ROOT’s graphics on iOS. ROOT’s graphics (general scheme):

Similar presentations


Presentation on theme: "ROOT’s graphics on iOS. ROOT’s graphics (general scheme):"— Presentation transcript:

1 ROOT’s graphics on iOS

2 ROOT’s graphics (general scheme):

3 iOS features: Typical application has one window (takes the full device’s screen), uses views (views are not windows) to arrange its contents. No X11, so no full TVirtualX implementation possible, no ROOT’s GUI. Rich set of libraries and frameworks: CoreGraphics, CoreFoundations, CoreText, CoreAnimation, UIKit, GLES, etc. Very specific GUI, different from Windows/X11/MacOS X. Touches instead of mouse event (this affects how user can interact with ROOT’s objects). Objective-C/Objective-C++ to create native GUI.

4 1. Non-gui graphics’ port Non-GUI graphics is mainly based on TVirtualPad interface (works via gPad). TPad/TCanvas internally calls TVirtualPadPainter methods (which has X11/Win32 GDI/OpenGL implementations). Implemented:  IOSPad (I had to add iOS-specific extentions to standard TPad).  IOSPainter to do actual painting.

5 Non-GUI graphics: implementation details  2D graphics (lines, polygons, fill patterns, etc.) – done by CoreGraphics (Quartz 2D API): rich 2D API (paths, strokes, blending, gradients, etc.) advanced text rendering anti-aliasing the same code can draw to a window, to a bitmap, to a PDF file. Etc.  Text is done by CoreText framework (ROOT needs font metrics, and Quartz 2D does not support them).  CoreFoundation (different data structures used both by Quartz and CoreText).

6 ROOT’s graphics on iPad (screenshots from device):

7 GUI on iOS 1. ROOT’s GUI classes can not be ported on iOS – no X11 or similar window management system. 2. To develop GUI for iOS you have to use UIKit - object oriented framework, written in Objective-C, which can be used from Objective-C or Objective-C++. UIKit strongly relies on MVC pattern. 3. You can use InterfaceBuilder to create user interface (Apple's analogue for QT-builder or ROOT's GUI builder) or create UI programmatically.

8 Native iOS application consists of: Run loop (done by UIKit) Main window One or more controller objects Views, managed by controllers (views are rectangular areas, roughly speaking similar to TPad, but they contain not TObjects, but other views - widgets or sub-views).

9 2. ROOT’s apps for iOS:  “Tutorials” – small application, demonstrates how to use IOSPad and UIKit, simplified version of $ROOTSYS/tutorials/demos.C  “RootBrowser” – mixture of simplified TBrowser and TCanvas, to browser ROOT files’ content and visualize objects like histograms (similar to Photos application, but works with ROOT’s objects, not pictures).

10 ROOT’s applications for iOS - “Tutorals” app:

11 "Tutorials": Split-view based application. Has several demos. Supports zooming and scrolling (pinch gesture, taps, pan) Supports picking (initial version). Has TCanvas editor prototype - in a popover window. 3D objects can be rotated with a pan gesture. Has different animations. Mainly was a testbed for different features.

12 “RootBrowser” application: Based on navigation controller and view hierarchy: top view to open/close/select ROOT files (using TFile and TWebFile) view with file contents (with thumbnails for objects, contained in a file) detailed object view with IOSPad to draw object, selected from file; editor (“object inspector”) to modify object’s properties.

13 Top level view:

14 File contents:

15 Detailed view with editor:

16 3. OpenGL to OpenGLES (plans)  Port GL-based 3D plots (TGLHistPainter)  Simplified version of EVE (“EVE for iPad”).


Download ppt "ROOT’s graphics on iOS. ROOT’s graphics (general scheme):"

Similar presentations


Ads by Google