...
The other way is to write custom C++ code that requires some more actions but has more potential regarding when and how it is executed. The first step is to specify a native Java method that can be called from the app side but must be implemented on C++ side. This native method can be linked with a onClickListener() of simple Button. When the View is updated programmatically without a core command, it must be executed from the working thread and the refresh refreshing of the GA ( graphics area ) must be addressed manually. The JNI method accesses the C++ part of the applicationĀ and must be executed within the working thread. A suitable method runOnWorkingThread() is provided by CFxARESInstance.instance() .
Refreshing the GA can be achieved with a modeless operation. The modeless helper class CModellessOperationHelper is implemented as a guard. When the object is getting destroyed it takes care about refreshing the graphics area.
Code Block |
---|
public static native void ZoomFit(); |
...