11-15-2011 02:22 PM - edited 11-15-2011 02:48 PM
You have always been able to manipulate a display object such as a field or screen by overloading the paint() method. The project that I have been working on requires custom overlays and screen transitions on a browserfield (using RenderingApplication not BrowserField2). Unfortunately the browser field in OS 7 by default gets rendered on top of all other controls. I was able to work around this issue after Garett (gbeukeboom) helped resolve a ticket I submitted to JIRA:
What needed to be done is the following:
1) Create and add an AbsoluteFieldManager
2) Create a ComponentCanvas Manager
3) Add the BrowserField to the AbsoluteFieldManager
4) Add the ComponentCanvas to the AbsoluteFieldManager at the same location as the browser field
5) Add other fields to the ComponentCanvas (or perform custom paint operations)
I am performing all of the steps and am able to paint over the browser field. What I am unable to do at this point is call the paint method on any of the managers and actually get the graphics object that contains the rendered browserfield. I need to be able to do this so I can manipulate the final image that gets rendered. Does anyone have any suggestions?
Here are a couple of things I would like to do. Note: These already work in OS 6 and below:
-mirroring the graphical content of the browser field
-scanning lines of the image to find a "white" line so I can hide cut off text at bottom of the screen with a white rectangle
-animating graphical content of browser field
Thanks in advance!
11-18-2011 11:00 AM
I am investigating whether this is possible in the new BrowserField implementation, were you able to get this to function using the previous implementation? The overlay functionality described in your post will work with the old "BrowserField" implementation.
11-18-2011 11:10 AM
I just confirmed, you will be unable to get access to the graphics object of the BrowserField due to the way it is now rendered using the WebKit rendering engine.
11-22-2011 11:56 AM
I appreciate you looking into this.
If you do happen to find a work-around please let me know as this breaks several features of our app for OS 7 users. I will continue to do the same!