Start
Previous Next

3. Basics of PhotoLine / 3.3 User Interface Elements

### 3.3.7 Unit Text Fields

Unit text fields are used in PhotoLine, if you have to enter values, which allow different units. If there is an abbreviation behind a value, the text field is a unit text field:

Unit text field have some advantages:

- They show the current value in the desired unit.
- You are able to change the unit by right clicking with the mouse (or Ctrl+mouse click on macOS). After that a menu appears with the available units:
The current unit is checked. Each unit shows its name and - in brackets - its abbreviation.
- You can always enter a value in one of the available units by appending the corresponding abbreviation. After finishing the input PhotoLine converts the value into the current unit.
- Unit text fields can be used to calculate simple terms like "(3 + 4) * 5". You can use several units in one term like "12 in + 7 pt", too.
Some functions even allow calculations using variables. "Scale Layer" (see chapter 7.5.3) is using "w" as a substitution for the layer width and "h" for the layer height. In these cases one of the predefined functions may be useful:
- sin(radiant)
- cos(radiant)
- tan(radiant)
- sqrt(value)
- min(value1; value2[;...])
- max(value1; value2 [;...])
- if(condition;value1;value2)
- floor(value): round down the value
- ceil(value): round up the value
- round(value): round the value
Aside from that the comparison operators "<", "<=", "=", ">" and ">=" are supported.
- You can modify the value by using the mouse wheel. Holding Shift reduces the step size, holding Ctrl (Windows) or Command (macOS) enlarges it.
- If you hold the Ctrl key or press the middle mouse key (Windows) or the Command key (macOS), you can change the value of a unit text field by dragging.