Gamestudio Links
Zorro Links
Newest Posts
Help with plotting multiple ZigZag
by degenerate_762. 04/30/24 23:23
M1 Oversampling
by 11honza11. 04/30/24 08:16
Trading Journey
by howardR. 04/28/24 09:55
Zorro Trader GPT
by TipmyPip. 04/27/24 13:50
Data from CSV not parsed correctly
by jcl. 04/26/24 11:18
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
0 registered members (), 522 guests, and 7 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
Page 1 of 2 1 2
troubles with scale_x & scale_y #338403
08/17/10 22:16
08/17/10 22:16
Joined: Dec 2008
Posts: 605
47°19'02.40" N 8°32'54.67" E...
hopfel Offline OP
User
hopfel  Offline OP
User

Joined: Dec 2008
Posts: 605
47°19'02.40" N 8°32'54.67" E...
Hi dear community,

I feel a bit discouraged because I'm to stupid to scale a panel the right way. o.0

I used this little code in one of my functions in my script:

Code:
my_panel.scale_x=12;
my_panel.scale_y=12;



But this happened ingame to my 16*16 panel:



The border should be constant, but here it's deformed.
And it's really just the border, the middle of the panel is scaled right.
This happens with other panels too. I really don't know what the problem could be like...

Anyone an idea?


Hilf mir, dir zu helfen!
Re: troubles with scale_x & scale_y [Re: hopfel] #338428
08/18/10 04:31
08/18/10 04:31
Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
Superku Offline
Senior Expert
Superku  Offline
Senior Expert

Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
The reason could be that the scale parameters only have a valid range from -10 to 10.


"Falls das Resultat nicht einfach nur dermassen gut aussieht, sollten Sie nochmal von vorn anfangen..." - Manual

Check out my new game: Pogostuck: Rage With Your Friends
Re: troubles with scale_x & scale_y [Re: Superku] #338448
08/18/10 11:24
08/18/10 11:24
Joined: Dec 2008
Posts: 605
47°19'02.40" N 8°32'54.67" E...
hopfel Offline OP
User
hopfel  Offline OP
User

Joined: Dec 2008
Posts: 605
47°19'02.40" N 8°32'54.67" E...
The same thing happens with a value from 2 to 10 too. -.o'
Looks like I have to write a scale-function myselfe. smirk


Hilf mir, dir zu helfen!
Re: troubles with scale_x & scale_y [Re: hopfel] #338456
08/18/10 12:37
08/18/10 12:37
Joined: Feb 2008
Posts: 3,232
Australia
EvilSOB Offline
Expert
EvilSOB  Offline
Expert

Joined: Feb 2008
Posts: 3,232
Australia
Nah, just think it through.
I'll try to explain though, its not easy.
[sticking to 'square' scaling for simplicity]

If scales are at 1.0, all pixels are 1x1 in size.
If scales are at 2.0, all pixels are 2x2 in size.
If scales are at 3.0, all pixels are 3x3 in size.
etc...

BUT!!!
If scales are at 1.5, SOME pixels are 1x1, and some are 2X2,
because you cant make a pixel 1.5x1.5

SO.
If you lock your scales to ONLY INTEGERS, the problem will go away.
But the higher your scale gets, the 'chunkier' each step will become...

Get what I mean?


"There is no fate but what WE make." - CEO Cyberdyne Systems Corp.
A8.30.5 Commercial
Re: troubles with scale_x & scale_y [Re: EvilSOB] #338462
08/18/10 13:06
08/18/10 13:06
Joined: Jul 2008
Posts: 1,178
England
M
MrGuest Offline
Serious User
MrGuest  Offline
Serious User
M

Joined: Jul 2008
Posts: 1,178
England
Originally Posted By: EvilSOB
Nah, just think it through.
I'll try to explain though, its not easy.
[sticking to 'square' scaling for simplicity]

If scales are at 1.0, all pixels are 1x1 in size.
If scales are at 2.0, all pixels are 2x2 in size.
If scales are at 3.0, all pixels are 3x3 in size.
etc...

BUT!!!
If scales are at 1.5, SOME pixels are 1x1, and some are 2X2,
because you cant make a pixel 1.5x1.5

SO.
If you lock your scales to ONLY INTEGERS, the problem will go away.
But the higher your scale gets, the 'chunkier' each step will become...

Get what I mean?


AFAIK he is using integers?

just tested it, and having the same issue when scaling with integers, possible temp fix
Code:
pnl.size_x--;pnl.size_y--;

?

Re: troubles with scale_x & scale_y [Re: MrGuest] #338465
08/18/10 13:37
08/18/10 13:37
Joined: Aug 2008
Posts: 482
B
bart_the_13th Offline
Senior Member
bart_the_13th  Offline
Senior Member
B

Joined: Aug 2008
Posts: 482
Maybe it has something to do with pnl.center_x and center_y?

Re: troubles with scale_x & scale_y [Re: bart_the_13th] #338470
08/18/10 14:01
08/18/10 14:01
Joined: Dec 2008
Posts: 605
47°19'02.40" N 8°32'54.67" E...
hopfel Offline OP
User
hopfel  Offline OP
User

Joined: Dec 2008
Posts: 605
47°19'02.40" N 8°32'54.67" E...
First thanks for all responses!

@EvilSOB: How MrGuest said, I'm already using integer. wink
@MrGuest: It's for the zoom-function of a little paint-program. So the only possible temp fix for me is to make an own scale-function using pixel-functions...
@bart_the_13th: No, it hasn't. grin


Hilf mir, dir zu helfen!
Re: troubles with scale_x & scale_y [Re: hopfel] #338475
08/18/10 14:24
08/18/10 14:24
Joined: Oct 2007
Posts: 5,210
Ä°stanbul, Turkey
Quad Offline
Senior Expert
Quad  Offline
Senior Expert

Joined: Oct 2007
Posts: 5,210
Ä°stanbul, Turkey
maybe try using powers of 2?
2 4 16 32 etc (disregard the +10 limit)


3333333333
Re: troubles with scale_x & scale_y [Re: Quad] #338486
08/18/10 14:47
08/18/10 14:47
Joined: Dec 2008
Posts: 605
47°19'02.40" N 8°32'54.67" E...
hopfel Offline OP
User
hopfel  Offline OP
User

Joined: Dec 2008
Posts: 605
47°19'02.40" N 8°32'54.67" E...
It begins already at 2 to deform... o.-'


Hilf mir, dir zu helfen!
Re: troubles with scale_x & scale_y [Re: hopfel] #338491
08/18/10 15:01
08/18/10 15:01
Joined: Oct 2007
Posts: 5,210
Ä°stanbul, Turkey
Quad Offline
Senior Expert
Quad  Offline
Senior Expert

Joined: Oct 2007
Posts: 5,210
Ä°stanbul, Turkey
in that case are you sure it's 16x16 and not 16x17 or 16x15 ?


3333333333
Page 1 of 2 1 2

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