We want to present individual Epaath projects through a web-browser and want to do away with the sugar navigation bar so we can use the screen real-estate for html navigation.
Removing the bar itself isn't the problem, but the hole it leaves behind is, as is the coordinate system. So I'm looking for a way to crop the display. There seems to be some provision for this in the Display classes (the instance variable clippingBox for example, and zooming functions), but I'm having difficulty finding where, and/or how to change the code so as to do some actual cropping.
Any help would be welcome, /Ties
Am 14.10.2008 um 10:46 schrieb Ties Stuij:
We want to present individual Epaath projects through a web-browser and want to do away with the sugar navigation bar so we can use the screen real-estate for html navigation.
Removing the bar itself isn't the problem, but the hole it leaves behind is, as is the coordinate system. So I'm looking for a way to crop the display. There seems to be some provision for this in the Display classes (the instance variable clippingBox for example, and zooming functions), but I'm having difficulty finding where, and/or how to change the code so as to do some actual cropping.
The regular DisplayScreen cannot do this, but you could certainly hack OLPCVirtualScreen to do cropping. The magic happens in #forceToScreen: and currently only uses a scale and offset, which are calculated to center the full virtual display in the actual display.
- Bert -
On Tue, Oct 14, 2008 at 2:56 PM, Bert Freudenberg bert@freudenbergs.de wrote:
Am 14.10.2008 um 10:46 schrieb Ties Stuij: The regular DisplayScreen cannot do this, but you could certainly hack OLPCVirtualScreen to do cropping. The magic happens in #forceToScreen: and currently only uses a scale and offset, which are calculated to center the full virtual display in the actual display.
Thanks for that bit of background. Subclassing/fumbling around with width, height and boundingBox did the trick.
/Ties
etoys-dev@lists.squeakfoundation.org