Support
Contribute
Contact
Tracker
Navigation
Personal tools
 

Edje Gradient Part


NOTE: this section is incomplete and sometimes just wrong, take with a considerable amount of salt.

The gradient type displays a color spectrum defined in the spectra block in many directions and shapes.

See also: Edje Part, Edje Group, Edje Data Collection, Edje.

part {
  name: "gradient";
  type: GRADIENT;

  description {
    state:  "default" 0.0;

    gradient {
      spectrum: "name";
      rel1{
      }
      rel2{
      }
    }

    fill {
      origin {
      }
      size {
      }
    }

    rel1 {
    }

    rel2 {
    }

  }
}

Contents

Gradient

gradient {
  spectrum: "spectrumName";
  type:     "gradientType";

  rel1 {
  }
  rel2 {
  }
}

The gradient block defines the necessary properties to display the spectrum.

spectrum
The name of the spectrum to display
type
Sets the gradient to one of the valid gradient types.
rel1
Not to be confused with the description block rel1, the gradient block rel1 sets the position of the first color of the spectrum.
rel2
As with rel1, the gradient block rel2 sets the position for the last color listed in the spectrum.

If either rel1 or rel2 is present in the gradient block of a linear gradient, these will override any angle/origin/size specified in the fill block ('spread' is still honored).

Depending on the gradient type, this block rel1 and rel2 might have different effects.

Fill

fill { 
  spread: 0-1; 
  angle:  0-1;
  origin {
  }
  size {
  }
}

The fill block defines the way the gradient fills the container, it works in the same way than image

Gradient types

Linear

keyword: linear

This is the default gradient type, when the gradient block rel1 and rel2 are set, it traces a vector between them and display the colors in following that angle.

Radial

keyword: radial

This gradient type draws the spectrum as a series of concentric rings centered by the origin property of the fill block.