---
name: "BIS_fnc_scaleAndTranslate"
type: function
status: ok
groups: ["Systems"]
arma3_since: "1.78"
locality: {"argument": null, "effect": null, "server_exec": false}
source: https://community.bistudio.com/wiki/BIS_fnc_scaleAndTranslate
revid: 364739
updated: 2024-06-04T21:40:23Z
---

# BIS_fnc_scaleAndTranslate

*Function · Systems · Arma 3 v1.78*

## Description

Translates, scales (with pivot) and fades a picture control over time.

## Syntax

```sqf
[picture, scaleFactor, pivot, translation, durationOrSpeed, isDuration, fade] call BIS_fnc_scaleAndTranslate
```

**Parameters:**

- `picture`: [Control](../topics/Control.md) - picture that has to be modified
- `scaleFactor`: [Number](../topics/Number.md) - (Optional, default 1) how much the picture has to be scaled (> 1 makes it bigger, 1 keeps it the same, < 1 makes it smaller)
- `pivot`: [String](../topics/String.md) - (Optional, default "center") select the pivot's position (i.e. center of the scaling process); can be one of:
  - "topLeft"
  - "topCenter"
  - "topRight"
  - "centerLeft"
  - "center"
  - "centerRight"
  - "bottomLeft"
  - "bottomCenter"
  - "bottomRight"
- `translation`: [Array](../topics/Array.md) format [x, y] - (Optional, default [0, 0]) how much the picture has to be moved
- `durationOrSpeed`: [Number](../topics/Number.md) - (Optional, default 2) either the duration of the animation(default) or the speed of the translation, depending on what the next parameter is set to
- `isDuration`: [Boolean](../topics/Boolean.md) - (Optional, default [true](../commands/true.md)) if [true](../commands/true.md), *durationOrSpeed* is considered duration; if [false](../commands/false.md) it is considered speed
- `fade`: [Number](../topics/Number.md) - (Optional, default 0) transparency of the image at the end of the animation (in range 0..1: 0 = visible, 1 = invisible)

**Returns:** [Number](../topics/Number.md) - duration of the animation; useful for determining how much sleep time is needed between animations

## Examples

### Example 1

```sqf
[_controlFront, 0.8, "topLeft"] call BIS_fnc_scaleAndTranslate;
private _t = [_controlFront, 1, "bottomRight", [0.1, 0.1], 0.5, false] call BIS_fnc_scaleAndTranslate;
sleep (_t * 2);
[_controlFront, 0.8, "topRight", [0.5, 0.3]] call BIS_fnc_scaleAndTranslate;
```

## See also

[ctrlSetPosition](../commands/ctrlSetPosition.md) · [ctrlSetFade](../commands/ctrlSetFade.md) · [ctrlCommit](../commands/ctrlCommit.md)

<sub>Source: [BI Community Wiki — BIS fnc scaleAndTranslate](https://community.bistudio.com/wiki/BIS_fnc_scaleAndTranslate) (revision 364739).</sub>
