Languages

Menu
Sites
Language
Min&Max parameter in EDC

Hi, 

can any experts give an clear definition for this Min&Max parameter. 

for example, if only use min or only use max or use both of the team, what's the function of this parameter? thanks.

part { name: "bottom_line_base";
            type: RECT;
            scale: 1;
            description { state: "default" 0.0;
               min: 0 50;     ----//max 50,50
               fixed: 0 1;
               rel1.relative: 0.0 1.0;
               rel2.relative: 1.0 1.0;
               align: 0.5 1.0;
               color: 255 0 0 128;
            }
         }

Responses

3 Replies
colin Rao

Hi,

You can search "min" or "max" in below link page to check details.

https://build.enlightenment.org/job/nightly_efl_gcc_x86_64/lastSuccessfulBuild/artifact/doc/html/edcref.html

 

As your sample here,

the edje use the min and the relative settings to calculate the actually width and height of this part.

min: 0 50, means the minimum with is 0 and height is 50 pixels of part "bottom_line_base"

rel1.relative: 0.0 1.0;
rel2.relative: 1.0 1.0;

these two settings make its width is the real width of the device, and make its height is zero and located at the bottom of the device

By both of upper two settings, the actuall width and height is:

width: full device of your real device or emulator

height: 50 pixels

also this part is located at the bottom.  

Alex Ashirov

These min and max parameters define the minimum and the maximum size of a part in pixels. You can read more about these parameters here:

https://developer.tizen.org/dev-guide/2.3.0/org.tizen.mobile.native.appprogramming/html/guide/ui/edc_guide.htm

colin Rao

Seems there're some mistake in my previous comments as Alex comments. https://developer.tizen.org/dev-guide/2.3.0/org.tizen.mobile.native.appprogramming/html/guide/ui/edc_guide.htm

 

Calculating Edje Object Total Size

When the EDC file is composed of a lot of parts, Edje calculates the size of the global Edje object, by taking all the parts and their parameters into account. Some parameters have an role in this calculation and affect the global size:

  • min and max: these define the minimum and the maximum size of a part.
  • rel1 and rel2: these specify the relative position of a part.
  • align: this relates to the alignment of the part in the parent's object.
  • fixed: this defines if the part has a fixed size.