[maemo-developers] [maemo-developers] Nokia SDL color format for pixels
From: Michael Stepanov michael at stepanoff.orgDate: Mon Feb 12 10:08:44 EET 2007
- Previous message: [maemo-developers] Nokia SDL color format for pixels
- Next message: [maemo-developers] Nokia SDL color format for pixels
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Thanks for your answer, Tarani. On 2/12/07, Tapani Pälli <tapani.palli at nokia.com> wrote: > > ext Michael Stepanov wrote: > > Well, there is a open source system for home automation - Plutohome > > (www.plutohome.com <http://www.plutohome.com>). This system can use > > Nokia770/800 as a control panel - Orbiter. The Orbiter is based on > > SDL. So, after some hack it started work on Nokia (os2005/os2006) but > > there is a problem. Icons on the Orbiter should change their color > > according to some events. > > Are you missing icon 'highlight' effect when mouse is moved on top of > icon? Please specify exactly what the 'some events' are. The color of icon should be changed according to status of real device which represented by this icon. For example, there is a lighting switch and its icon. If switch is ON icon should be yellow, otherwise it should be black. But in real device icon every time is pink. I suspect that something wrong with pixels coloring using SDL. There is a method OrbiterRenderer_SDL::ReplaceColorInRectangle in the OrbiterRenderer_SDL.cpp which changes colors of icons. Maybe SDL for nokia 770 uses different color format for pixels? > Initially they are pink. Using SDL functionality their color can be > > changed. It works fine for Debian but it didn't work for Nokia (either > > scratchbox emulator or real device). All icons are pink every time. > > I'm not developer. I'm integrator. So, it's difficult for me to > > understand where is the problem. Have a look attached files. Maybe you > > can help me. > > > > I couldn't spot bugs in the code you sent, maybe OrbiterLogic has some > calls to renderer to change icon colors?. One thing which should be > changed in renderer class is the colordepth used for surfaces. Right now > it seems to be hardcoded to certain places as 32. Code should read the > correct depth using SDL_GetVideoInfo and make sure all the newly created > surfaces use the same depth to avoid amount of needed conversions. Thanks, I check it. > Thanks in advanced. > > > > On 2/9/07, *Tapani.Palli at nokia.com <mailto:Tapani.Palli at nokia.com>* > > <Tapani.Palli at nokia.com <mailto:Tapani.Palli at nokia.com>> wrote: > > > > Hello, > > Could you be more specific what are you trying todo and how? Are you > > going through pixelvalues and accessing them? See > > surface->format->BytesPerPixel. SDL_GetRGB and SDL_MapRGB should > work > > allright. > > > > // Tapani > > > > > > --- 8< ----- > > // T > > -- Cheers, Michael -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.maemo.org/pipermail/maemo-developers/attachments/20070212/40262f2e/attachment.htm
- Previous message: [maemo-developers] Nokia SDL color format for pixels
- Next message: [maemo-developers] Nokia SDL color format for pixels
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]