Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - amuser

Pages: [1]
1
Scripting / Problem with fe.layout + fe.add_surface
« on: September 26, 2016, 09:45:09 PM »
The original image.jpg and rpi2 resolution size are both 1920x1080.

This works fine:
Code: [Select]
local flx = fe.layout.width=640;
local fly = fe.layout.height=480;
local flw = fe.layout.width;
local flh = fe.layout.height;
local image = fe.add_image( "image.jpg", 0, 0, flw, flh );

this works fine too:
Code: [Select]
local flx = fe.layout.width;
local fly = fe.layout.height;
local flw = fe.layout.width;
local flh = fe.layout.height;
local imageSurface = fe.add_surface(flx, fly);
imageSurface.set_pos(0, 0, flw, flh);
local img = imageSurface.add_image( "image.jpg", 0, 0, flw, flh );
img.set_pos(0, 0, flw, flh);

but if i try to put the image (or a text) inside a surface and set fe.layout with 640x480 the image (or text) looks pixelated:
Code: [Select]
local flx = fe.layout.width=640;
local fly = fe.layout.height=480;
local flw = fe.layout.width;
local flh = fe.layout.height;
local imageSurface = fe.add_surface(flx, fly);
imageSurface.set_pos(0, 0, flw, flh);
local img = imageSurface.add_image( "image.jpg", 0, 0, flw, flh );
img.set_pos(0, 0, flw, flh);

So, i can't use fe.layout.width=640 and fe.layout.height=480 because the surfaces will look bad, except for surfaces using fade module:
Code: [Select]
local flx = fe.layout.width=640;
local fly = fe.layout.height=480;
local flw = fe.layout.width;
local flh = fe.layout.height;
local surface_flyer = fe.add_surface( flx, fly );
surface_flyer.set_pos(flx*0.01, fly*0.01, flw*0.5, flh*0.8);
local flyer = FadeArt( "flyer", 0, 0, flw, flh, surface_flyer );

Im missing something or it is a bug?

Pages: [1]