OpenTTD Source
12.0-beta2
|
#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. More... | |
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. More... | |
static int | ScaleByZoomLower (int value, ZoomLevel zoom) |
Scale by zoom level, usually shift left (when zoom > ZOOM_LVL_NORMAL) More... | |
static int | UnScaleByZoomLower (int value, ZoomLevel zoom) |
Scale by zoom level, usually shift right (when zoom > ZOOM_LVL_NORMAL) More... | |
static int | UnScaleGUI (int value) |
Short-hand to apply GUI zoom level. More... | |
static int | ScaleGUITrad (int value) |
Scale traditional pixel dimensions to GUI zoom level. More... | |
static int | UnScaleFont (int value) |
Short-hand to apply font zoom level. More... | |
static int | ScaleFontTrad (int value) |
Scale traditional pixel dimensions to Font zoom level. More... | |
Functions related to zooming.
Definition in file zoom_func.h.
|
inlinestatic |
Scale by zoom level, usually shift left (when zoom > ZOOM_LVL_NORMAL) When shifting right, value is rounded up.
value | value to shift |
zoom | zoom level to shift to |
Definition at line 22 of file zoom_func.h.
Referenced by Blitter_8bppSimple::Draw(), Blitter_32bppSimple::Draw(), ViewportSign::MarkDirty(), ExtraViewportWindow::OnScroll(), MainWindow::OnScroll(), NWidgetViewport::UpdateViewportCoordinates(), and ViewportAddString().
|
inlinestatic |
Scale by zoom level, usually shift left (when zoom > ZOOM_LVL_NORMAL)
value | value to shift |
zoom | zoom level to shift to |
Definition at line 45 of file zoom_func.h.
|
inlinestatic |
Scale traditional pixel dimensions to Font zoom level.
value | Pixel amount at #ZOOM_LVL_BASE (traditional "normal" interface size). |
Definition at line 96 of file zoom_func.h.
References UnScaleFont().
Referenced by SpriteFontCache::ClearFontCache(), BuildIndustryWindow::DrawWidget(), PaymentRatesGraphWindow::OnInit(), SpriteFontCache::SpriteFontCache(), CompanyStationsWindow::UpdateWidgetSize(), and BuildIndustryWindow::UpdateWidgetSize().
|
inlinestatic |
Scale traditional pixel dimensions to GUI zoom level.
value | Pixel amount at #ZOOM_LVL_BASE (traditional "normal" interface size). |
Definition at line 76 of file zoom_func.h.
References UnScaleGUI().
Referenced by ClickVolumeSliderWidget(), BuildTreesWindow::DrawWidget(), DepotWindow::DrawWidget(), BuildRoadDepotWindow::DrawWidget(), BuildRailWaypointWindow::DrawWidget(), WindowDesc::GetDefaultHeight(), WindowDesc::GetDefaultWidth(), VehicleDetailsWindow::GetRoadVehDetailsHeight(), GetVehicleListHeight(), HighlightDragPosition(), EndGameWindow::OnPaint(), HighScoreWindow::OnPaint(), BuildDocksDepotWindow::OnPaint(), NWidgetResizeBase::SetMinimalSize(), NWidgetResizeBase::SetMinimalTextLines(), NWidgetPIPContainer::SetPIP(), BuildTreesWindow::UpdateWidgetSize(), BuildObjectWindow::UpdateWidgetSize(), BuildDocksDepotWindow::UpdateWidgetSize(), ScenarioEditorLandscapeGenerationWindow::UpdateWidgetSize(), TooltipsWindow::UpdateWidgetSize(), RefitWindow::UpdateWidgetSize(), SpriteAlignerWindow::UpdateWidgetSize(), BuildRoadDepotWindow::UpdateWidgetSize(), BuildRoadStationWindow::UpdateWidgetSize(), BuildRailStationWindow::UpdateWidgetSize(), BuildRailDepotWindow::UpdateWidgetSize(), and BuildRailWaypointWindow::UpdateWidgetSize().
|
inlinestatic |
Scale by zoom level, usually shift right (when zoom > ZOOM_LVL_NORMAL) When shifting right, value is rounded up.
value | value to shift |
zoom | zoom level to shift to |
Definition at line 34 of file zoom_func.h.
Referenced by MarkViewportDirty(), UnScaleFont(), and UnScaleGUI().
|
inlinestatic |
Scale by zoom level, usually shift right (when zoom > ZOOM_LVL_NORMAL)
value | value to shift |
zoom | zoom level to shift to |
Definition at line 56 of file zoom_func.h.
Referenced by MarkViewportDirty().
|
inlinestatic |
Short-hand to apply font zoom level.
value | Pixel amount at ZOOM_LVL_BEGIN (full zoom in). |
Definition at line 86 of file zoom_func.h.
References UnScaleByZoom().
Referenced by ScaleFontTrad().
|
inlinestatic |
Short-hand to apply GUI zoom level.
value | Pixel amount at ZOOM_LVL_BEGIN (full zoom in). |
Definition at line 66 of file zoom_func.h.
References UnScaleByZoom().
Referenced by GetSingleVehicleWidth(), and ScaleGUITrad().