Quoting Ville Syrj�l�: > > > On a somewhat related note scalable layer's could use pixel coordinates > > > in > > > cases where the layer is housed inside a window or otherwise needs > > > accurate positioning. Normalized coordinates are counter productive in > > > those cases. > > > > As the core already uses pixel coordinates, we could add something like > > SetScreenRectangle() in addition to the recently added SetScreenPosition(). > > So we would need some flag(s) to define the current mode. The default for > unscaled layers would be the centering mode, for scaled layers it should > be to use the screen location and the mode could be switched to pixel > coordinates when SetScreenRectangle() gets called. And what about > unscalable layers that have been positioned via SetScreenPosition()? I'm > thinking they should keep their current position when the layer is > resized. > > There should probably be a new layer capability to distinguish scalable > and unscalable layers (DLCAPS_POSITION?).
Thanks for your elaboration. I just commited an implementation. But SetScreenRectangle() is still missing and a few drivers have to change DLCAPS_SCREEN_LOCATION to DLCAPS_SCREEN_POSITION. Comments, more ideas? -------- CVS Log -------------------------------------- Added DLCAPS_SCREEN_POSITION and DLCAPS_SCREEN_SIZE. These are set if DLCAPS_SCREEN_LOCATION is set and vice versa. Unscalable layers just have DLCAPS_SCREEN_POSITION. Store normalized and pixel based destination area in a layer context. Added CoreLayerLayoutMode which defines incorporation of configuration based size changes and destination area values. + CLLM_LOCATION, /* Keep normalized area. */ + CLLM_CENTER, /* Center layer after resizing destination area. */ + CLLM_POSITION, /* Keep pixel position, but resize area. */ + CLLM_RECTANGLE /* Keep pixel based area. */ Default for layers with DLCAPS_SCREEN_POSITION only is CENTER, otherwise it's LOCATION. After calling SetScreenPosition(), mode is POSITION. After calling SetScreenLocation(), mode is LOCATION. -- Best regards, Denis Oliver Kropp .------------------------------------------. | DirectFB - Hardware accelerated graphics | | http://www.directfb.org/ | "------------------------------------------" _______________________________________________ directfb-dev mailing list [email protected] http://www.directfb.org/cgi-bin/mailman/listinfo/directfb-dev
