## enlightenment-devel

 [E-devel] edje aspect calculation From: Andreas Volz - 2012-01-05 18:50:16 ```Hello, I just noticed that edje has a problem regarding aspect calculation. It seems there is a difference how aspect is defined for an image. It's easy to demonstrate with a small example. The opposite problem shows up if user has an image of size where width is smaller than hight. image size: 73x50 (image width larger than height) aspect1: 73/50 = 1.46 aspect2: 50/73 = 0.684931507 group { name: "MenuIcon"; data { item: "pref_size" "327x330"; } parts { part { name: "Image01"; type: IMAGE; description { state: "default" 0; aspect: 1.46 1; // this works, but not: 1 0.684931507 aspect_preference: BOTH; rel2 { offset: 0 0; } image { normal: "menu_icon.png"; middle: DEFAULT; } fill { } } } } } Btw: is it possible that edje just calculates the aspect automatic in a way that fits to image size? I didn't find out how to set this. regards Andreas -- Technical Blog ; ```
 Re: [E-devel] edje aspect calculation From: Carsten Haitzler (The Rasterman) - 2012-01-07 14:49:41 ```On Thu, 5 Jan 2012 19:47:16 +0100 Andreas Volz said: ummmm.. you know aspect: X X2 is: aascpet: MINIMUM MAXIMUM; and they are width/wight... you are making maximum LESS than minimum... :) > Hello, > > I just noticed that edje has a problem regarding aspect calculation. > > It seems there is a difference how aspect is defined for an image. It's > easy to demonstrate with a small example. The opposite problem shows up > if user has an image of size where width is smaller than hight. > > image size: 73x50 (image width larger than height) > > aspect1: 73/50 = 1.46 > aspect2: 50/73 = 0.684931507 > > group { name: "MenuIcon"; > data { > item: "pref_size" "327x330"; > } > parts { > part { name: "Image01"; > type: IMAGE; > description { state: "default" 0; > aspect: 1.46 1; // this works, but not: 1 0.684931507 > aspect_preference: BOTH; > rel2 { > offset: 0 0; > } > image { > normal: "menu_icon.png"; > middle: DEFAULT; > } > fill { > } > } > } > } > } > > Btw: is it possible that edje just calculates the aspect automatic in a > way that fits to image size? I didn't find out how to set this. > > regards > Andreas > > > -- > Technical Blog ; > > ------------------------------------------------------------------------------ > Ridiculously easy VDI. With Citrix VDI-in-a-Box, you don't need a complex > infrastructure or vast IT resources to deliver seamless, secure access to > virtual desktops. With this all-in-one solution, easily deploy virtual > desktops for less than the cost of PCs and save 60% on VDI infrastructure > costs. Try it free! http://p.sf.net/sfu/Citrix-VDIinabox > _______________________________________________ > enlightenment-devel mailing list > enlightenment-devel@... > https://lists.sourceforge.net/lists/listinfo/enlightenment-devel > -- ------------- Codito, ergo sum - "I code, therefore I am" -------------- The Rasterman (Carsten Haitzler) raster@... ```
 Re: [E-devel] edje aspect calculation From: Andreas Volz - 2012-01-07 20:35:11 ```Am Fri, 6 Jan 2012 20:18:07 +0900 schrieb Carsten Haitzler (The Rasterman): > On Thu, 5 Jan 2012 19:47:16 +0100 Andreas Volz > said: > > ummmm.. you know aspect: X X2 is: > > aascpet: MINIMUM MAXIMUM; > > and they are width/wight... you are making maximum LESS than > minimum... :) Ah, ok. Now I see the failure I've done! Thanks for pointing it out. Is there a way to let edje calculate correct aspect to fit original image size without specifying it? > > Hello, > > > > I just noticed that edje has a problem regarding aspect calculation. > > > > It seems there is a difference how aspect is defined for an image. > > It's easy to demonstrate with a small example. The opposite problem > > shows up if user has an image of size where width is smaller than > > hight. > > > > image size: 73x50 (image width larger than height) > > > > aspect1: 73/50 = 1.46 > > aspect2: 50/73 = 0.684931507 > > > > group { name: "MenuIcon"; > > data { > > item: "pref_size" "327x330"; > > } > > parts { > > part { name: "Image01"; > > type: IMAGE; > > description { state: "default" 0; > > aspect: 1.46 1; // this works, but not: 1 0.684931507 > > aspect_preference: BOTH; > > rel2 { > > offset: 0 0; > > } > > image { > > normal: "menu_icon.png"; > > middle: DEFAULT; > > } > > fill { > > } > > } > > } > > } > > } > > > > Btw: is it possible that edje just calculates the aspect automatic > > in a way that fits to image size? I didn't find out how to set this. > > > > regards > > Andreas > > > > > > -- > > Technical Blog ; > > > > ------------------------------------------------------------------------------ > > Ridiculously easy VDI. With Citrix VDI-in-a-Box, you don't need a > > complex infrastructure or vast IT resources to deliver seamless, > > secure access to virtual desktops. With this all-in-one solution, > > easily deploy virtual desktops for less than the cost of PCs and > > save 60% on VDI infrastructure costs. Try it free! > > http://p.sf.net/sfu/Citrix-VDIinabox > > _______________________________________________ enlightenment-devel > > mailing list enlightenment-devel@... > > https://lists.sourceforge.net/lists/listinfo/enlightenment-devel > > > > > -- > ------------- Codito, ergo sum - "I code, therefore I am" > -------------- The Rasterman (Carsten Haitzler) > raster@... > > > ------------------------------------------------------------------------------ > Ridiculously easy VDI. With Citrix VDI-in-a-Box, you don't need a > complex infrastructure or vast IT resources to deliver seamless, > secure access to virtual desktops. With this all-in-one solution, > easily deploy virtual desktops for less than the cost of PCs and save > 60% on VDI infrastructure costs. Try it free! > http://p.sf.net/sfu/Citrix-VDIinabox > _______________________________________________ enlightenment-devel > mailing list enlightenment-devel@... > https://lists.sourceforge.net/lists/listinfo/enlightenment-devel > -- Technical Blog ; ```
 Re: [E-devel] edje aspect calculation From: Cedric BAIL - 2012-01-07 21:38:35 ```On Sat, Jan 7, 2012 at 9:32 PM, Andreas Volz wrote: > Am Fri, 6 Jan 2012 20:18:07 +0900 schrieb Carsten Haitzler (The > Rasterman): > >> On Thu, 5 Jan 2012 19:47:16 +0100 Andreas Volz >> said: >> >> ummmm.. you know aspect: X X2 is: >> >> aascpet: MINIMUM MAXIMUM; >> >> and they are width/wight... you are making maximum LESS than >> minimum... :) > > Ah, ok. Now I see the failure I've done! Thanks for pointing it out. > > Is there a way to let edje calculate correct aspect to fit original > image size without specifying it? Now their is (well, not sure if it work in fact). If you set aspect_preference to SOURCE, it will take the aspect ratio of the source image. -- Cedric BAIL ```
 Re: [E-devel] edje aspect calculation From: Andreas Volz - 2012-01-08 19:30:10 ```Am Sat, 7 Jan 2012 22:38:29 +0100 schrieb Cedric BAIL: > On Sat, Jan 7, 2012 at 9:32 PM, Andreas Volz > wrote: > > Am Fri, 6 Jan 2012 20:18:07 +0900 schrieb Carsten Haitzler (The > > Rasterman): > > > >> On Thu, 5 Jan 2012 19:47:16 +0100 Andreas Volz > >> said: > >> > >> ummmm.. you know aspect: X X2 is: > >> > >> aascpet: MINIMUM MAXIMUM; > >> > >> and they are width/wight... you are making maximum LESS than > >> minimum... :) > > > > Ah, ok. Now I see the failure I've done! Thanks for pointing it out. > > > > Is there a way to let edje calculate correct aspect to fit original > > image size without specifying it? > > Now their is (well, not sure if it work in fact). If you set > aspect_preference to SOURCE, it will take the aspect ratio of the > source image. This new feature works really nice! I just looked over the API and don't understand this: Edje.h: typedef enum _Edje_Aspect_Control { EDJE_ASPECT_CONTROL_NONE = 0, EDJE_ASPECT_CONTROL_NEITHER = 1, EDJE_ASPECT_CONTROL_HORIZONTAL = 2, EDJE_ASPECT_CONTROL_VERTICAL = 3, EDJE_ASPECT_CONTROL_BOTH = 4 } Edje_Aspect_Control; Shouldn't there be a EDJE_ASPECT_CONTROL_SOURCE = 5 also in the public API? And why is there an explicit int assignment in this enum? And what is NEITHER? Never used it and it's not in edje_private.h enum Edje_Internal_Aspect. Is this all correct but I don't understand it? regards Andreas -- Technical Blog ; ```
 Re: [E-devel] edje aspect calculation From: Cedric BAIL - 2012-01-08 20:17:49 ```On Sun, Jan 8, 2012 at 8:27 PM, Andreas Volz wrote: > Am Sat, 7 Jan 2012 22:38:29 +0100 schrieb Cedric BAIL: >> On Sat, Jan 7, 2012 at 9:32 PM, Andreas Volz >> wrote: >> > Am Fri, 6 Jan 2012 20:18:07 +0900 schrieb Carsten Haitzler (The >> > Rasterman): >> > >> >> On Thu, 5 Jan 2012 19:47:16 +0100 Andreas Volz >> >> said: >> >> >> >> ummmm.. you know aspect: X X2 is: >> >> >> >> aascpet: MINIMUM MAXIMUM; >> >> >> >> and they are width/wight... you are making maximum LESS than >> >> minimum... :) >> > >> > Ah, ok. Now I see the failure I've done! Thanks for pointing it out. >> > >> > Is there a way to let edje calculate correct aspect to fit original >> > image size without specifying it? >> >> Now their is (well, not sure if it work in fact). If you set >> aspect_preference to SOURCE, it will take the aspect ratio of the >> source image. > > This new feature works really nice! > > I just looked over the API and don't understand this: > > Edje.h: > typedef enum _Edje_Aspect_Control > { >   EDJE_ASPECT_CONTROL_NONE = 0, >   EDJE_ASPECT_CONTROL_NEITHER = 1, >   EDJE_ASPECT_CONTROL_HORIZONTAL = 2, >   EDJE_ASPECT_CONTROL_VERTICAL = 3, >   EDJE_ASPECT_CONTROL_BOTH = 4 > } Edje_Aspect_Control; > > Shouldn't there be a EDJE_ASPECT_CONTROL_SOURCE = 5 also in the public > API? And why is there an explicit int assignment in this enum? And what > is NEITHER? Never used it and it's not in edje_private.h > enum Edje_Internal_Aspect. > > Is this all correct but I don't understand it? I don't thing so. This enum is for external object from my understanding and source only work on IMAGE part. -- Cedric BAIL ```