Author Topic: aspect ratio, Q:  (Read 262 times)

jedione

  • Hero Member
  • *****
  • Posts: 699
  • punktoe
    • View Profile
aspect ratio, Q:
« on: May 12, 2019, 03:53:44 PM »

so lest say i set my theme to 4:3     

Code: [Select]
fe.layout.width=640;
fe.layout.height=480;

local flw = fe.add_text( "", 0, 0, 640, 480);
flw.set_bg_rgb( 170, 0, 21);
when i open AM it fills the whole screen even it i stretch it out horizontally,   
is their a way. to set AM to open to the correct size, short of punting it on the monitor i want and making it full size?

should i just put in on a layer,  havent tryed,  to see it..  just some advice would be nice...   alwas used to using

variables ie:  flx*0.200;  kind of one size fits all......
help a friend....

keilmillerjr

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 951
    • View Profile
Re: aspect ratio, Q:
« Reply #1 on: May 12, 2019, 04:29:03 PM »
My method: use native window size and resize a surface that contains all child objects. My helpers module has an aspect function.

jedione

  • Hero Member
  • *****
  • Posts: 699
  • punktoe
    • View Profile
Re: aspect ratio, Q:
« Reply #2 on: May 12, 2019, 04:46:13 PM »


me ading a surface....thats all

so this is what i tryed,, would this be right? 

Code: [Select]
fe.layout.width=640;
fe.layout.height=480;
local surface = fe.add_surface( 640, 480 );
surface.x = 10;
surface.y = 10;
local text = surface.add_artwork( "snap", 0, 0, 620, 460 );

help a friend....

jedione

  • Hero Member
  • *****
  • Posts: 699
  • punktoe
    • View Profile
Re: aspect ratio, Q:
« Reply #3 on: May 12, 2019, 04:54:22 PM »


it would be great if you could elaborate on  "My helpers module has an aspect function."

i have used the module to load your theme,   but not 100% on what its doing, that AM lacks ,,because
imlost when it comes to this topic,,,   though i did look up an aspect to pixel ratio,,   that might help

in short would like to make some themes just for vertical...and want to go abought it in the best way posible...ya know

how would you go abought it,,  to still be user friendley,, cross the board?
help a friend....

keilmillerjr

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 951
    • View Profile
Re: aspect ratio, Q:
« Reply #4 on: May 12, 2019, 05:04:57 PM »


it would be great if you could elaborate on  "My helpers module has an aspect function."

i have used the module to load your theme,   but not 100% on what its doing, that AM lacks ,,because
imlost when it comes to this topic,,,   though i did look up an aspect to pixel ratio,,   that might help

in short would like to make some themes just for vertical...and want to go abought it in the best way posible...ya know

how would you go abought it,,  to still be user friendley,, cross the board?

I just re-read your original question. Kids and wife screaming, so I mis-read. I would think that your original method would work. Perhaps add
Code: [Select]
fe.layout.preserve_aspect_ratio=true;?

My suggestion I recommended was because I mis-read and thought you wanted to utilize multiple aspect ratios. My helpers module, I wrote the following method that pertains to this scenario. Of course, you could do the math yourself, but thats why I wrote a function. I use it so my themes look fine in native aspect and can force a 4x3 window, as well as certain design elements maintaining a certain aspect ratio.

Code: [Select]
// Match Aspect Ratio
matchAspect(aw, ah, dimension, param, obj=null)

jedione

  • Hero Member
  • *****
  • Posts: 699
  • punktoe
    • View Profile
Re: aspect ratio, Q:
« Reply #5 on: May 12, 2019, 05:10:08 PM »
ok thanks bo....... good looking out,

fe.layout.preserve_aspect_ratio=true;   ohh ya,, yes for some reason for got that , thought use it all the time.... peace  and thank you..
help a friend....

jedione

  • Hero Member
  • *****
  • Posts: 699
  • punktoe
    • View Profile
Re: aspect ratio, Q:
« Reply #6 on: May 12, 2019, 05:19:55 PM »



working..and off...

help a friend....

jedione

  • Hero Member
  • *****
  • Posts: 699
  • punktoe
    • View Profile
Re: aspect ratio, Q:
« Reply #7 on: May 12, 2019, 05:22:25 PM »
if it were done or resized in 4:3,,  witch it is not ,,,,cool beans case closed, watson
help a friend....