Bitmap on pushbutton oddity

This forum is for eXpress++ general support.
Post Reply
Message
Author
reganc
Posts: 259
Joined: Thu Jan 28, 2010 3:08 am
Location: Hersham, Surrey, UK
Contact:

Bitmap on pushbutton oddity

#1 Post by reganc »

I use a couple of bitmaps as captions to pushbuttons.

Just recently one of our guys used a new set of bitmaps to replace our original ones and he found a very odd thing and asked me to look at it.

One bitmap is a 100 x 80 GIF showing a standard cube type cardboard box in a 3d corner to front angle (I'm sure there's a word for that...isometric comes to mind but I don't know for sure). The top of the box is open. There are lots of straight lines in the image.

When we put this image on a pushbutton we can clearly see that the lines in the image are not 'straight', even though when you look at the image Paint, for instance, they are.

I had a look and found that when you take this image and put it on the button, you can see the break(s) in the lines (it looks a little like the type of 'tearing' you get onscreen in games).

When you take the same image and put it onto a simple static, the image displays fine. No sign that the lines are broken. This happens on a couple of the images, not just that one.

Has anyone else seen this?
Regan Cawkwell
Real Business Applications Ltd
http://www.rbauk.com

skiman
Posts: 1199
Joined: Thu Jan 28, 2010 1:22 am
Location: Sijsele, Belgium
Contact:

Re: Bitmap on pushbutton oddity

#2 Post by skiman »

Hi Regan,

Is the bitmap resized to fit the button? I noticed that the resize sometimes gives an ugly result. I have al my bitmaps in three sizes, so I can use the size according to the button.

Creating a font is also a solution, this way you can use every size.
Best regards,

Chris.
www.aboservice.be

User avatar
rdonnay
Site Admin
Posts: 4813
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

Re: Bitmap on pushbutton oddity

#3 Post by rdonnay »

What kind of button are you using? DCPUSHBUTTON or DCPUSHBUTTONXP?

DCPUSHBUTTONXP will try to fit the bitmap to the button by sizing it.
This can cause the effect you are seeing.

If you use CAPTIONARRAY with DCPUSHBUTTONXP, you can specify the exact size you want the bitmap on the button and where you want it placed on the button.
The eXpress train is coming - and it has more cars.

reganc
Posts: 259
Joined: Thu Jan 28, 2010 3:08 am
Location: Hersham, Surrey, UK
Contact:

Re: Bitmap on pushbutton oddity

#4 Post by reganc »

skiman wrote:Hi Regan,

Is the bitmap resized to fit the button? I noticed that the resize sometimes gives an ugly result. I have al my bitmaps in three sizes, so I can use the size according to the button.

Creating a font is also a solution, this way you can use every size.
Hi Chris

No, there is no scaling involved.
Regan Cawkwell
Real Business Applications Ltd
http://www.rbauk.com

reganc
Posts: 259
Joined: Thu Jan 28, 2010 3:08 am
Location: Hersham, Surrey, UK
Contact:

Re: Bitmap on pushbutton oddity

#5 Post by reganc »

rdonnay wrote:What kind of button are you using? DCPUSHBUTTON or DCPUSHBUTTONXP?

DCPUSHBUTTONXP will try to fit the bitmap to the button by sizing it.
This can cause the effect you are seeing.

If you use CAPTIONARRAY with DCPUSHBUTTONXP, you can specify the exact size you want the bitmap on the button and where you want it placed on the button.
Hi Roger

It was originally a DCPUSHBUTTON but I tried DCPUSHBUTTONXP as well with the same result.

I could give you a copy of the bitmap on Tuesday (Monday is a bank holiday here) so you could see for yourself... I didn't think there was any point in me giving you code...
Regan Cawkwell
Real Business Applications Ltd
http://www.rbauk.com

User avatar
rdonnay
Site Admin
Posts: 4813
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

Re: Bitmap on pushbutton oddity

#6 Post by rdonnay »

I could give you a copy of the bitmap on Tuesday (Monday is a bank holiday here)
Bank holiday? Those holidays never stop me from my appointed rounds.

Ok, send it to me on Tuesday.
The eXpress train is coming - and it has more cars.

Post Reply