Gamestudio Links
Zorro Links
Newest Posts
Trading Journey
by howardR. 04/28/24 09:55
Zorro Trader GPT
by TipmyPip. 04/27/24 13:50
Help with plotting multiple ZigZag
by M_D. 04/26/24 20:03
Data from CSV not parsed correctly
by jcl. 04/26/24 11:18
M1 Oversampling
by jcl. 04/26/24 11:12
Why Zorro supports up to 72 cores?
by jcl. 04/26/24 11:09
Eigenwerbung
by jcl. 04/26/24 11:08
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (AndrewAMD, Nymphodora), 485 guests, and 3 spiders.
Key: Admin, Global Mod, Mod
Newest Members
wandaluciaia, Mega_Rod, EternallyCurious, howardR, 11honza11
19049 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Panel scale and buttons #452174
06/05/15 09:22
06/05/15 09:22
Joined: Sep 2003
Posts: 9,859
F
FBL Offline OP
Senior Expert
FBL  Offline OP
Senior Expert
F

Joined: Sep 2003
Posts: 9,859
Not sure if this can be called a bug, but for sure it's an annoying limitation.

Consider a panel with various buttons on it. They are placed with no pixel gap next to each other (because they share a big bitmap or the like). This looks and works fine so far.

Now we change the resolution, and for having the panel not appear out of place because it's too big, it is scaled to the right size.
While the panel scales fine - and with it all the buttons, gaps can appear between the buttons. I assume because they are bound to integer positions.
Is it possible to have a "real" scaled panel, where buttons won't leave gaps?

The workaround is somewhat... ugly and annoying: scale all position and size variables, and use integer(), scale the bitmaps, recreate the buttons and correct the gaps by using the rounded position/size data.
There has to be a nicer, faster way.

This was tested with FILTER flag applied.

Re: Panel scale and buttons [Re: FBL] #452393
06/11/15 10:31
06/11/15 10:31
Joined: Jul 2000
Posts: 27,986
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,986
Frankfurt
Yes, all graphics elements on a panel are positioned at integer positions. The reason was that the 2D graphics primitives all use integer, but I see that this can cause scaling problems. I'll have put this on our growing list of small things to improve in one of the next updates.


Moderated by  jcl, Nems, Spirit, Tobias 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1