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.


Messages - amuser

Pages: [1]
1
Scripting / Re: Problem with fe.layout + fe.add_surface
« on: September 29, 2016, 11:28:28 PM »
yeah, i can use this:
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(1920, 1080);
imageSurface.set_pos(0, 0, 1920, 1080);
local img = imageSurface.add_image( "image.jpg", 0, 0, flw, flh );
img.set_pos(0, 0, flw, flh);

but if i do this i will go back to the main reason i was thinking to use 640x480: slowdown. If i set the surface and the image to 1920x1080 the wheel scrolls very slow. And if i set the same image to 1920x1080 without surface the wheel scrolls fast, even with the fe.layout in 1920x1080:
Code: [Select]
local flx = fe.layout.width;
local fly = fe.layout.height;
local flw = fe.layout.width;
local flh = fe.layout.height;
local image = fe.add_image( "image.jpg", 0, 0, flw, flh );

But i need the surface to turn the image visible/invisible.
So, for now:

Great image quality, good performance (but no surface):
Code: [Select]
local flx = fe.layout.width; //1920
local fly = fe.layout.height; //1080
local flw = fe.layout.width;
local flh = fe.layout.height;
local image = fe.add_image( "image.jpg", 0, 0, flw, flh );

Poor image quality, good performance:
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);

Great image quality, bad performance:
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(1920, 1080);
imageSurface.set_pos(0, 0, 1920, 1080);
local img = imageSurface.add_image( "image.jpg", 0, 0, flw, flh );
img.set_pos(0, 0, flw, flh);

Why the combination of surface at 1920x1080 + image at 1920x1080 is going to a bad performance if the same image at 1920x1080 without surface do not slowdown? Even converting the image to just 50KB dont speed up...

2
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]