Silverfrost Forums

Welcome to our forums

Gray text background

23 Apr 2010 2:40 (Edited: 28 Apr 2010 12:49) #6329

Is it possible to write the text in Clearwin windows without gray text background which wipes bitmap under it? Same was as in %cw window for example where you can define your own background color and the text is written over it without the gray underneath (by the way, the new feature local_font can now use different fonts and scale their size inside %cw, thanks to Paul for that).

In the windows though if the background is bitmap the things are different.

Example of the way it is needed marked by the arrow here (made of course with photoshop)

http://img202.imageshack.us/img202/2738/textgraybackground.png

Hope it is doable.

27 Apr 2010 10:03 #6333

One more example. The present background under the text and formulas forces to use only approximately the same overall grayish bitmaps for the window. And even then sometimes the window look a bit ugly or at least amateurish and limiting us in bitmap windows backgrounds choices

http://img535.imageshack.us/img535/9797/uglytextbackgr.png

28 Apr 2010 8:09 #6335

I do not know of an easy way to do this. In some cases you may be able to include the text in the bitmap for %wp but the result could vary with screen resolutions etc.

At the moment I also do not know how this feature might be added to ClearWin+. The context in the ClearWin+ code is the response to the WM_CTLCOLORSTATIC message and this normally involves calls to SetBkColor and SetTextColor with the background brush used as the return value. Inthis context is no direct way to write the text on to an existing background bitmap.

So the best you can do is to set the background colour as close as you can to the dominant colour of the %wp background.

Another possibility is to represent the text as an icon image with a transparent background to the icon. In theory icons can have a user-defined size. Off hand I do not remember if ClearWin+ can handle such icons. Try %im.

28 Apr 2010 5:39 #6338

Further to Paul's response as to why, I want to pick up on the use of images and icons. The one you may wish to use is %gi, which will place a GIF, which can have a transparent background. If you are using an older version of FTN95 (such as the 4.90 I use) %gi doesn't work, but Paul fixed that a version or two later.

I found the %eq output to be ugly, and instead have used a hand-crafted bitmap instead. MS Paint isn't really up to this job, and you may need something a bit more sophisticated. I also use bitmaps that change in a context sensitive way in a graphics region - they can contain text just as easily as drawings.

Eddie

14 May 2010 2:02 #6373

Well, this background text issue which restricts graphics designs to grayish styles only is substantial disadvantage of Clearwin. Using gifs for each and every single output is not a viable option. It's OK, say, for formulas, some fancy buttons and some rear enclosures but not for literally everything on the page. Imagine if all webpages on the internet had such a problem! By default they use transparent texts so you can use any background you want.

I do not know what and how something has to be changed but there should exist some solution. I've just asked folks who use other fortran GUI builders, and they told me that they can do that. Winteracter for example can do both, but by default last 5 something years it's using transparent texts like the whole web is doing.

18 May 2010 11:11 #6380

Have you thought of using OpenGL, you should be able to create a graduated window by specifiying the colour at each vertex and a smooth type fill. Ian PS don't ask me how it is actually done.

19 May 2010 11:10 #6389

I am not a pro in OpenGL. Otherwise i'd make windows like that http://blogs.pcworld.co.nz/pcworld/tux-love/beryl2.jpg

http://blogs.pcworld.co.nz/pcworld/tux-love/beryl1.jpg

Please login to reply.