# zoom_func.h File Reference

Functions related to zooming. More...

`#include "zoom_type.h"`

Go to the source code of this file.

## Functions
static int | ScaleByZoom (int value, ZoomLevel zoom)
| Scale by zoom level, usually shift left (when zoom > ZOOM_LVL_NORMAL) When shifting right, value is rounded up.
static int | UnScaleByZoom (int value, ZoomLevel zoom)
| Scale by zoom level, usually shift right (when zoom > ZOOM_LVL_NORMAL) When shifting right, value is rounded up.
static int | ScaleByZoomLower (int value, ZoomLevel zoom)
| Scale by zoom level, usually shift left (when zoom > ZOOM_LVL_NORMAL).
static int | UnScaleByZoomLower (int value, ZoomLevel zoom)
| Scale by zoom level, usually shift right (when zoom > ZOOM_LVL_NORMAL).

## Detailed Description

Functions related to zooming.

Definition in file zoom_func.h.

## Function Documentation

static int ScaleByZoom | ( | int | value,
|  | ZoomLevel | zoom |
| ) |  |  | `[inline, static]`

Scale by zoom level, usually shift left (when zoom > ZOOM_LVL_NORMAL) When shifting right, value is rounded up.

Parameters:

  | value | value to shift
  | zoom | zoom level to shift to

Returns:
  shifted value

Definition at line 17 of file zoom_func.h.

Referenced by HandleAutoscroll(), InitializeWindowViewport(), LargeWorldCallback(), Station::MarkDirty(), MarkSignDirty(), RelocateAllWindows(), ResizeSprite(), TranslateXYToTileCoord(), and ViewportDrawChk().

static int ScaleByZoomLower | ( | int | value,
|  | ZoomLevel | zoom |
| ) |  |  | `[inline, static]`

Scale by zoom level, usually shift left (when zoom > ZOOM_LVL_NORMAL).

Parameters:

  | value | value to shift
  | zoom | zoom level to shift to

Returns:
  shifted value

Definition at line 44 of file zoom_func.h.

static int UnScaleByZoom | ( | int | value,
|  | ZoomLevel | zoom |
| ) |  |  | `[inline, static]`

Scale by zoom level, usually shift right (when zoom > ZOOM_LVL_NORMAL) When shifting right, value is rounded up.

Parameters:

  | value | value to shift
  | zoom | zoom level to shift to

Returns:
  shifted value

Definition at line 31 of file zoom_func.h.

Referenced by MarkViewportDirty(), and ResizeSprite().

static int UnScaleByZoomLower | ( | int | value,
|  | ZoomLevel | zoom |
| ) |  |  | `[inline, static]`

Scale by zoom level, usually shift right (when zoom > ZOOM_LVL_NORMAL).

Parameters:

  | value | value to shift
  | zoom | zoom level to shift to

Returns:
  shifted value

Definition at line 57 of file zoom_func.h.

Referenced by MarkViewportDirty().