forums.silverfrost.com Forum Index forums.silverfrost.com
Welcome to the Silverfrost forums
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Greying if %ib bitmaps

 
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> Suggestions
View previous topic :: View next topic  
Author Message
mtwallet



Joined: 06 Jun 2008
Posts: 9

PostPosted: Fri Jun 06, 2008 1:41 pm    Post subject: Greying if %ib bitmaps Reply with quote

I have been trying to get the %ib function to work as it represents a simpler approach to %tb.
I have spent some time testing the different possible combinations and have found an acceptable form apart from the greying option 3. This appears to take the colours and convert them all to the same grey colour which does not achieve the desired result. I have disvovered a forum entry on Thu Jan 24 2008 11:49 pm which raises the same problem but was not commented on by support, so I have included it as a PS below.
All we need is the greying of the bitmap to appear the same as the [flat] parameter which works perfectly.
Also would there be any way of using icons as well as bitmaps as this would further simplify the creation of the correct background colour as I believe that icons are transparent by default.

Regards
Rich




P.S. Previous support question follows;

Thanks Paul, that's a really useful suggestion. I'll try it.

On the basis of further investigation, I see that my bitmaps weren't drawn in a way that meets the full requirements of %ib. Indeed, as I drew them in CorelDraw, and asked for them to be antialiased (which normally makes a better job of conversion of a vector image to bitmap), and CorelDRAW anti-aliased the edges, they were far from ideal.

A certain amount of trial and error has demonstrated (to me at least) that %ib works best for some very simple shapes - it can then automatically generate a reasonable greyed-out equivalent. However, unless the 1-pixel complete border is present, it assumes that the greyed out image is a simple dark grey rectangle. If the image is faily straighforward (for example, the 3 circles for Mickey Mouse) then the greyed out image is still recognizable. However, if the bitmap is carefully-crafted, and antialiased round the edges for maximum legibility at small size, then the greyed-out shape may not be so recognizable.

Eddie
Back to top
View user's profile Send private message
LitusSaxonicum



Joined: 23 Aug 2005
Posts: 2388
Location: Yateley, Hants, UK

PostPosted: Fri Jun 06, 2008 9:37 pm    Post subject: Reply with quote

I wrote the original post. When using %tb, you must start with a rectangle that is colour (192,192,192). When you draw the icon in the middle of this mid-grey rectangle, make sure that there is at least 1 pixel all the way round. If you do this, then when %ib generates the different state button faces, they look the right shape. Say X is a pixel with 192,192,192, and O = 0,0,0 then this is a "good" icon:

XXXXXXXX
XXXXXXXX
XXXOOXXX
XXXOOXXX
XXXOOXXX
XXXOOXXX
XXXXXXXX
XXXXXXXX

If you follow the help file, and make an at least 1-pixel border, but it is any other colour (even say 193,192,192) you get a greyed out icon that loses its shape. Say for example that # = 193,192,192 - you can't tell the difference between this icon and the original one by eye, but it looks very different greyed-out ....

#######
#XXXXXX#
#XXOOXX#
#XXOOXX#
#XXOOXX#
#XXOOXX#
#XXXXXX#
#######

192,192,192 is NOT the default mid grey in PAINT.EXE

If you draw your base icon with anti-aliased drop-shadows (ideal for a %tb button) then the %ib process does not work well. You probably have a background grey that isn't all perfectly 192,192,192

Regards

Eddie
Back to top
View user's profile Send private message
mtwallet



Joined: 06 Jun 2008
Posts: 9

PostPosted: Tue Jun 10, 2008 5:32 pm    Post subject: Reply with quote

Many thanks for your help. I have now spent some time recoding all our use of %tb to %ib. With the use of the 192 grey setting in the bitmaps as well everything is now much simpler.
However, I did have another problem that stopped me in my tracks. I was experiencing unstable bitmaps when first porting to %ib that appeared to arise within windows using the %lw function. Where any item appearing over the bitmap would 'wipe' it, e.g. a tool tip or any other dialog even though the bitmap is still there but not displayed. I made sure all the data items in the window were in Common and this seemed to sort the problem, even though I am sure they were in Common anyway but held in an include file. Not sure what this could be. Any suggestions?
Thanks again
Back to top
View user's profile Send private message
mtwallet



Joined: 06 Jun 2008
Posts: 9

PostPosted: Tue Jun 10, 2008 5:32 pm    Post subject: Reply with quote

Many thanks for your help. I have now spent some time recoding all our use of %tb to %ib. With the use of the 192 grey setting in the bitmaps as well everything is now much simpler.
However, I did have another problem that stopped me in my tracks. I was experiencing unstable bitmaps when first porting to %ib that appeared to arise within windows using the %lw function. Where any item appearing over the bitmap would 'wipe' it, e.g. a tool tip or any other dialog even though the bitmap is still there but not displayed. I made sure all the data items in the window were in Common and this seemed to sort the problem, even though I am sure they were in Common anyway but held in an include file. Not sure what this could be. Any suggestions?
Thanks again
Back to top
View user's profile Send private message
LitusSaxonicum



Joined: 23 Aug 2005
Posts: 2388
Location: Yateley, Hants, UK

PostPosted: Fri Jun 13, 2008 4:36 pm    Post subject: Reply with quote

Me too. I found the answer, but can't remember what it was. I'll investigate and report back!

Eddie
Back to top
View user's profile Send private message
LitusSaxonicum



Joined: 23 Aug 2005
Posts: 2388
Location: Yateley, Hants, UK

PostPosted: Fri Jun 13, 2008 4:59 pm    Post subject: Reply with quote

I think I found what happened to me. I use %th and %?ib. I certainly found that I couldn't work with "dynamic" tool help (using @) and when I put explicit help strings in, the problem may have just "gone away". I think that I experimented with update window (I can never remember whether it is update_window@ or window_update@ - they are quite different!)

You can in any case see which window has the focus, and via clearwin_info discover if it is the one with the toolbar. If it is, a quick window update specifying the handle of an %ib group in the toolbar does the trick.

Eddie
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> Suggestions All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group