Functions related to (drawing on) viewports. More...
#include "gfx_type.h"
#include "viewport_type.h"
#include "window_type.h"
#include "tile_type.h"
Go to the source code of this file.
Enumerations | |
enum | ScrollMaxOutsideMap { MAXSCROLL_OLD = 0, MAXSCROLL_NEW = 3424 } |
Indexed by GetMaxScrollOutsideMap(). More... | |
Functions | |
void | SetSelectionRed (bool) |
void | DeleteWindowViewport (Window *w) |
void | InitializeWindowViewport (Window *w, int x, int y, int width, int height, uint32 follow_flags, ZoomLevel zoom) |
Initialize viewport of the window for use. | |
ViewPort * | IsPtInWindowViewport (const Window *w, int x, int y) |
Is a xy position inside the viewport of the window? | |
Point | GetTileBelowCursor () |
void | UpdateViewportPosition (Window *w) |
Update the viewport position being displayed. | |
void | MarkAllViewportsDirty (int left, int top, int right, int bottom) |
Mark all viewports that display an area as dirty (in need of repaint). | |
bool | DoZoomInOutWindow (ZoomStateChange how, Window *w) |
Zooms a viewport in a window in or out. | |
void | ZoomInOrOutToCursorWindow (bool in, Window *w) |
Point | GetTileZoomCenterWindow (bool in, Window *w) |
void | HandleZoomMessage (Window *w, const ViewPort *vp, byte widget_zoom_in, byte widget_zoom_out) |
Update the status of the zoom-buttons according to the zoom-level of the viewport. | |
static void | MaxZoomInOut (ZoomStateChange how, Window *w) |
Zoom a viewport as far as possible in the given direction. | |
void | OffsetGroundSprite (int x, int y) |
Called when a foundation has been drawn for the current tile. | |
void | DrawGroundSprite (SpriteID image, PaletteID pal, const SubSprite *sub=NULL, int extra_offs_x=0, int extra_offs_y=0) |
Draws a ground sprite for the current tile. | |
void | DrawGroundSpriteAt (SpriteID image, PaletteID pal, int32 x, int32 y, int z, const SubSprite *sub=NULL, int extra_offs_x=0, int extra_offs_y=0) |
Draws a ground sprite at a specific world-coordinate relative to the current tile. | |
void | AddSortableSpriteToDraw (SpriteID image, PaletteID pal, int x, int y, int w, int h, int dz, int z, bool transparent=false, int bb_offset_x=0, int bb_offset_y=0, int bb_offset_z=0, const SubSprite *sub=NULL) |
Draw a (transparent) sprite at given coordinates with a given bounding box. | |
void | AddChildSpriteScreen (SpriteID image, PaletteID pal, int x, int y, bool transparent=false, const SubSprite *sub=NULL) |
Add a child sprite to a parent sprite. | |
void | ViewportAddString (const DrawPixelInfo *dpi, ZoomLevel small_from, const ViewportSign *sign, StringID string_normal, StringID string_small, StringID string_small_shadow, uint64 params_1, uint64 params_2=0, Colours colour=INVALID_COLOUR) |
Add a string to draw in the viewport. | |
void | StartSpriteCombine () |
Starts a block of sprites, which are "combined" into a single bounding box. | |
void | EndSpriteCombine () |
Terminates a block of sprites started by StartSpriteCombine. | |
bool | HandleViewportClicked (const ViewPort *vp, int x, int y) |
void | SetRedErrorSquare (TileIndex tile) |
Set a tile to display a red error square. | |
void | SetTileSelectSize (int w, int h) |
Highlight w by h tiles at the cursor. | |
void | SetTileSelectBigSize (int ox, int oy, int sx, int sy) |
void | ViewportDoDraw (const ViewPort *vp, int left, int top, int right, int bottom) |
bool | ScrollWindowToTile (TileIndex tile, Window *w, bool instant=false) |
Scrolls the viewport in a window to a given location. | |
bool | ScrollWindowTo (int x, int y, int z, Window *w, bool instant=false) |
Scrolls the viewport in a window to a given location. | |
uint16 | GetMaxScrollOutsideMap () |
How far should I allow scrolling outside the map? | |
bool | ScrollMainWindowToTile (TileIndex tile, bool instant=false) |
Scrolls the viewport of the main window to a given location. | |
bool | ScrollMainWindowTo (int x, int y, int z=-1, bool instant=false) |
Scrolls the main window to given coordinates. | |
void | UpdateAllVirtCoords () |
Update the viewport coordinates of all signs. | |
void | MarkTileDirtyByTile (TileIndex tile) |
Mark a tile given by its index dirty for repaint. | |
void | MarkTileDirtyByTileOutsideMap (int x, int y) |
int | GetRowAtTile (int viewport_y, Point tile) |
Given a tile coordinate ignoring height, this returns the row actually painted at this tile coordinate if one recognizes height. | |
Variables | |
static const int | TILE_HEIGHT_STEP = 50 |
One Z unit tile height difference is displayed as 50m. | |
Point | _tile_fract_coords |
Functions related to (drawing on) viewports.
Definition in file viewport_func.h.
enum ScrollMaxOutsideMap |
Indexed by GetMaxScrollOutsideMap().
Considering,when increasing height at tile (1, 1) the first overlapping tile on tile(1, 1, 0) is tile(4, 4, 1), or the first tile completely drawn outside the map(no height) is tile(1, 1, 4), value below has been calculated as follows:
extra_pixels_needed_for heightlevels = (max_possible_height / overlap * TILE_SIZE / 2) eg. 256 / 4 * 8 / 2 = 256 pixels for tile(1, 1, 255) to be inside viewport when fully zoomed in 22 pixels for the toolbar. 150 pixels to be safe with tall buildings on tile(1, 1, 255).
Definition at line 38 of file viewport_func.h.
void AddChildSpriteScreen | ( | SpriteID | image, | |
PaletteID | pal, | |||
int | x, | |||
int | y, | |||
bool | transparent, | |||
const SubSprite * | sub | |||
) |
Add a child sprite to a parent sprite.
image | the image to draw. | |
pal | the provided palette. | |
x | sprite x-offset (screen coordinates) relative to parent sprite. | |
y | sprite y-offset (screen coordinates) relative to parent sprite. | |
transparent | if true, switch the palette between the provided palette and the transparent palette, | |
sub | Only draw a part of the sprite. |
Definition at line 804 of file viewport.cpp.
References SmallVector< T, S >::Append(), ViewportDrawer::last_foundation_child, SmallVector< T, S >::Length(), MAX_SPRITES, ChildScreenSpriteToDraw::next, PALETTE_MODIFIER_TRANSPARENT, PALETTE_TO_TRANSPARENT, SetBit(), SPRITE_MASK, and ChildScreenSpriteToDraw::sub.
Referenced by AddChildSpriteToFoundation(), AddCombinedSprite(), and DrawCommonTileSeq().
void AddSortableSpriteToDraw | ( | SpriteID | image, | |
PaletteID | pal, | |||
int | x, | |||
int | y, | |||
int | w, | |||
int | h, | |||
int | dz, | |||
int | z, | |||
bool | transparent, | |||
int | bb_offset_x, | |||
int | bb_offset_y, | |||
int | bb_offset_z, | |||
const SubSprite * | sub | |||
) |
Draw a (transparent) sprite at given coordinates with a given bounding box.
The bounding box extends from (x + bb_offset_x, y + bb_offset_y, z + bb_offset_z) to (x + w - 1, y + h - 1, z + dz - 1), both corners included. Bounding boxes with bb_offset_x == w or bb_offset_y == h or bb_offset_z == dz are allowed and produce thin slices.
image | the image to combine and draw, | |
pal | the provided palette, | |
x | position X (world) of the sprite, | |
y | position Y (world) of the sprite, | |
w | bounding box extent towards positive X (world), | |
h | bounding box extent towards positive Y (world), | |
dz | bounding box extent towards positive Z (world), | |
z | position Z (world) of the sprite, | |
transparent | if true, switch the palette between the provided palette and the transparent palette, | |
bb_offset_x | bounding box extent towards negative X (world), | |
bb_offset_y | bounding box extent towards negative Y (world), | |
bb_offset_z | bounding box extent towards negative Z (world) | |
sub | Only draw a part of the sprite. |
Definition at line 649 of file viewport.cpp.
References AddCombinedSprite(), SmallVector< T, S >::Append(), ViewportDrawer::combine_sprites, ParentSpriteToDraw::comparison_done, ParentSpriteToDraw::first_child, Sprite::height, ParentSpriteToDraw::image, ParentSpriteToDraw::left, max(), MAX_SPRITES, min(), ParentSpriteToDraw::pal, PALETTE_MODIFIER_TRANSPARENT, PALETTE_TO_TRANSPARENT, RemapCoords(), SetBit(), SPRITE_COMBINE_ACTIVE, SPRITE_COMBINE_PENDING, SPRITE_MASK, ST_NORMAL, ParentSpriteToDraw::sub, ParentSpriteToDraw::top, Sprite::width, ParentSpriteToDraw::x, Sprite::x_offs, ParentSpriteToDraw::xmax, ParentSpriteToDraw::xmin, ParentSpriteToDraw::y, Sprite::y_offs, ParentSpriteToDraw::ymax, ParentSpriteToDraw::ymin, ParentSpriteToDraw::zmax, and ParentSpriteToDraw::zmin.
Referenced by DoDrawVehicle(), DrawBridgeMiddle(), DrawBridgeTramBits(), DrawCatenary(), DrawCatenaryOnBridge(), DrawCatenaryOnTunnel(), DrawCatenaryRailway(), DrawCommonTileSeq(), DrawFoundation(), DrawPillar(), DrawRoadDetail(), DrawTile_Town(), DrawTile_TunnelBridge(), DrawTrackFence_NS_1(), DrawTrackFence_NS_2(), DrawTrackFence_WE_1(), DrawTrackFence_WE_2(), DrawTramCatenary(), and DrawWaterTileStruct().
bool DoZoomInOutWindow | ( | ZoomStateChange | how, | |
Window * | w | |||
) |
Zooms a viewport in a window in or out.
how | Zooming direction. | |
w | Window owning the viewport. |
true
if zooming step could be done, false
if further zooming is not possible. Definition at line 138 of file main_gui.cpp.
References ViewportData::dest_scrollpos_x, ViewportData::dest_scrollpos_y, ViewportData::follow_vehicle, INVALID_VEHICLE, Window::InvalidateData(), ViewportData::scrollpos_x, ViewportData::scrollpos_y, Window::viewport, ViewPort::virtual_height, ViewPort::virtual_left, ViewPort::virtual_top, ViewPort::virtual_width, ViewPort::zoom, ZOOM_IN, ZOOM_LVL_MAX, ZOOM_LVL_MIN, ZOOM_NONE, and ZOOM_OUT.
Referenced by MaxZoomInOut(), WatchCompany::OnClick(), and ExtraViewportWindow::OnClick().
void DrawGroundSprite | ( | SpriteID | image, | |
PaletteID | pal, | |||
const SubSprite * | sub, | |||
int | extra_offs_x, | |||
int | extra_offs_y | |||
) |
Draws a ground sprite for the current tile.
If the current tile is drawn on top of a foundation the sprite is added as child sprite to the "foundation"-ParentSprite.
image | the image to draw. | |
pal | the provided palette. | |
sub | Only draw a part of the sprite. | |
extra_offs_x | Pixel X offset for the sprite position. | |
extra_offs_y | Pixel Y offset for the sprite position. |
Definition at line 565 of file viewport.cpp.
References DrawGroundSpriteAt().
Referenced by DrawCommonTileSeq(), DrawRoadBits(), DrawSeaWater(), DrawTile_Road(), DrawTile_Town(), DrawTile_TunnelBridge(), DrawTileLayout(), DrawTrackBits(), DrawWaterLock(), and DrawWaterSprite().
void DrawGroundSpriteAt | ( | SpriteID | image, | |
PaletteID | pal, | |||
int32 | x, | |||
int32 | y, | |||
int | z, | |||
const SubSprite * | sub, | |||
int | extra_offs_x, | |||
int | extra_offs_y | |||
) |
Draws a ground sprite at a specific world-coordinate relative to the current tile.
If the current tile is drawn on top of a foundation the sprite is added as child sprite to the "foundation"-ParentSprite.
image | the image to draw. | |
pal | the provided palette. | |
x | position x (world coordinates) of the sprite relative to current tile. | |
y | position y (world coordinates) of the sprite relative to current tile. | |
z | position z (world coordinates) of the sprite relative to current tile. | |
sub | Only draw a part of the sprite. | |
extra_offs_x | Pixel X offset for the sprite position. | |
extra_offs_y | Pixel Y offset for the sprite position. |
Definition at line 542 of file viewport.cpp.
References AddChildSpriteToFoundation(), AddTileSpriteToDraw(), ViewportDrawer::foundation, ViewportDrawer::foundation_part, FOUNDATION_PART_NONE, RemapCoords(), TileInfo::x, TileInfo::y, and TileInfo::z.
Referenced by DrawBridgeMiddle(), DrawGroundSprite(), and DrawRoadBits().
void EndSpriteCombine | ( | ) |
Terminates a block of sprites started by StartSpriteCombine.
Take a look there for details.
Definition at line 756 of file viewport.cpp.
References ViewportDrawer::combine_sprites, and SPRITE_COMBINE_NONE.
Referenced by DrawBridgeMiddle(), DrawBridgeTramBits(), and DrawTile_TunnelBridge().
uint16 GetMaxScrollOutsideMap | ( | ) |
How far should I allow scrolling outside the map?
Definition at line 1949 of file viewport.cpp.
References AllowMoreHeightlevels().
int GetRowAtTile | ( | int | viewport_y, | |
Point | tile | |||
) |
Given a tile coordinate ignoring height, this returns the row actually painted at this tile coordinate if one recognizes height.
The problem concerning this calculation is that we have not enough information to calculate this in one closed formula. Which row we search rather depends on the height distribution on the map. So we have to search.
First, the searched tile may be located outside map. Then, we know that we are not too far outside map, so we can step tile by tile, starting at the given tile, until we have passed the searched tile.
If the searched tile is inside map, searching is more difficult. A linear search on some thousand tiles would be not that efficient. But, we can solve the problem by interval intersection. We know for sure, that the searched tile is south of the given tile, simply because mountains of height > 0 (and we have only such mountains) are always painted north of their tile. So we choose a tile half way between the given tile and the southern end of the map, have a look wether it is north or south of the given position, and intersect again. Until our interval has length 1, then we take the upper one.
tile | some tile coordinate. | |
viewport_y | the viewport y corresponding to tile, if one assumes height zero for that tile. |
Definition at line 1291 of file viewport.cpp.
References DEBUG, GetMiddleTile(), GetNorthernEndOfColumn(), GetSouthernEndOfColumn(), and GetViewportY().
void HandleZoomMessage | ( | Window * | w, | |
const ViewPort * | vp, | |||
byte | widget_zoom_in, | |||
byte | widget_zoom_out | |||
) |
Update the status of the zoom-buttons according to the zoom-level of the viewport.
This will update their status and invalidate accordingly
w | Window pointer to the window that has the zoom buttons | |
vp | pointer to the viewport whose zoom-level the buttons represent | |
widget_zoom_in | widget index for window with zoom-in button | |
widget_zoom_out | widget index for window with zoom-out button |
Definition at line 467 of file viewport.cpp.
References Window::SetWidgetDirty(), Window::SetWidgetDisabledState(), ViewPort::zoom, ZOOM_LVL_MAX, and ZOOM_LVL_MIN.
Referenced by WatchCompany::OnInvalidateData(), ExtraViewportWindow::OnInvalidateData(), ScenarioEditorToolbarWindow::OnInvalidateData(), and MainToolbarWindow::OnInvalidateData().
void InitializeWindowViewport | ( | Window * | w, | |
int | x, | |||
int | y, | |||
int | width, | |||
int | height, | |||
uint32 | follow_flags, | |||
ZoomLevel | zoom | |||
) |
Initialize viewport of the window for use.
w | Window to use/display the viewport in | |
x | Offset of left edge of viewport with respect to left edge window w | |
y | Offset of top edge of viewport with respect to top edge window w | |
width | Width of the viewport | |
height | Height of the viewport | |
follow_flags | Flags controlling the viewport.
| |
zoom | Zoomlevel to display |
Definition at line 185 of file viewport.cpp.
References ViewportData::dest_scrollpos_x, ViewportData::dest_scrollpos_y, ViewportData::follow_vehicle, Pool< Titem, Tindex, Tgrowth_step, Tmax_size, Tpool_type, Tcache, Tzero >::PoolItem<&_vehicle_pool >::Get(), ViewPort::height, INVALID_VEHICLE, Window::left, ViewPort::left, ScaleByZoom(), ViewportData::scrollpos_x, ViewportData::scrollpos_y, TILE_SIZE, TileX(), TileY(), Window::top, ViewPort::top, Window::viewport, ViewPort::virtual_height, ViewPort::virtual_left, ViewPort::virtual_top, ViewPort::virtual_width, ViewPort::width, Vehicle::x_pos, Vehicle::y_pos, Vehicle::z_pos, and ViewPort::zoom.
Referenced by NWidgetViewport::InitializeViewport().
Is a xy position inside the viewport of the window?
w | Window to examine its viewport | |
x | X coordinate of the xy position | |
y | Y coordinate of the xy position |
NULL
is returned. Definition at line 356 of file viewport.cpp.
References ViewPort::height, IsInsideMM(), ViewPort::left, ViewPort::top, Window::viewport, and ViewPort::width.
Referenced by HandleAutoscroll(), and WatchCompany::OnScroll().
static void MaxZoomInOut | ( | ZoomStateChange | how, | |
Window * | w | |||
) | [inline, static] |
Zoom a viewport as far as possible in the given direction.
how | Zooming direction. | |
w | Window owning the viewport. |
Definition at line 64 of file viewport_func.h.
References DoZoomInOutWindow().
Referenced by MainWindow::OnKeyPress().
void OffsetGroundSprite | ( | int | x, | |
int | y | |||
) |
Called when a foundation has been drawn for the current tile.
Successive ground sprites for the current tile will be drawn as child sprites of the "foundation"-ParentSprite, not as TileSprites.
x | sprite x-offset (screen coordinates) of ground sprites relative to the "foundation"-ParentSprite. | |
y | sprite y-offset (screen coordinates) of ground sprites relative to the "foundation"-ParentSprite. |
Definition at line 577 of file viewport.cpp.
References ViewportDrawer::foundation, ViewportDrawer::foundation_offset, ViewportDrawer::foundation_part, FOUNDATION_PART_NONE, FOUNDATION_PART_NORMAL, ViewportDrawer::last_foundation_child, and SmallVector< T, S >::Length().
Referenced by DrawFoundation().
bool ScrollMainWindowTo | ( | int | x, | |
int | y, | |||
int | z, | |||
bool | instant | |||
) |
Scrolls the main window to given coordinates.
x | x coordinate | |
y | y coordinate | |
z | z coordinate; -1 to scroll to terrain height | |
instant | scroll instantly (meaningful only when smooth_scrolling is active) |
Definition at line 3951 of file smallmap_gui.cpp.
References FindWindowById(), and ScrollWindowTo().
Referenced by HandleViewportScroll(), VehicleViewWindow::OnClick(), NewsWindow::OnClick(), MainWindow::OnKeyPress(), and ScrollMainWindowToTile().
bool ScrollMainWindowToTile | ( | TileIndex | tile, | |
bool | instant | |||
) |
Scrolls the viewport of the main window to a given location.
tile | Desired tile to center on. | |
instant | Jump to the location instead of slowly moving to it. |
Definition at line 2421 of file viewport.cpp.
References ScrollMainWindowTo(), TILE_SIZE, TileX(), and TileY().
Referenced by DEF_CONSOLE_CMD(), GenerateWorld(), WaypointWindow::OnClick(), VehicleViewWindow::OnClick(), TownDirectoryWindow::OnClick(), TownViewWindow::OnClick(), StationViewWindow::OnClick(), CompanyStationsWindow::OnClick(), ProgramWindow::OnClick(), OrdersWindow::OnClick(), NewsWindow::OnClick(), IndustryDirectoryWindow::OnClick(), IndustryViewWindow::OnClick(), DepotWindow::OnClick(), and CompanyWindow::OnClick().
bool ScrollWindowTo | ( | int | x, | |
int | y, | |||
int | z, | |||
Window * | w, | |||
bool | instant | |||
) |
Scrolls the viewport in a window to a given location.
x | Desired x location of the map to scroll to (world coordinate). | |
y | Desired y location of the map to scroll to (world coordinate). | |
z | Desired z location of the map to scroll to (world coordinate). Use -1 to scroll to the height of the map at the x, y location. | |
w | Window containing the viewport. | |
instant | Jump to the location instead of slowly moving to it. |
Definition at line 2376 of file viewport.cpp.
References ViewportData::dest_scrollpos_x, ViewportData::dest_scrollpos_y, ViewportData::follow_vehicle, INVALID_VEHICLE, MapSizeX(), MapSizeY(), ViewportData::scrollpos_x, ViewportData::scrollpos_y, TILE_SIZE, TileHeightOutsideMap(), and Window::viewport.
Referenced by ScrollMainWindowTo(), and ScrollWindowToTile().
Scrolls the viewport in a window to a given location.
tile | Desired tile to center on. | |
w | Window containing the viewport. | |
instant | Jump to the location instead of slowly moving to it. |
Definition at line 2410 of file viewport.cpp.
References ScrollWindowTo(), TILE_SIZE, TileX(), and TileY().
Referenced by WaypointWindow::OnInvalidateData(), WaypointWindow::OnResize(), TownViewWindow::OnResize(), and IndustryViewWindow::OnResize().
void SetRedErrorSquare | ( | TileIndex | tile | ) |
Set a tile to display a red error square.
tile | Tile that should show the red error square. |
Definition at line 2430 of file viewport.cpp.
References INVALID_TILE, MarkTileDirtyByTile(), and TileHighlightData::redsq.
Referenced by CcBuildRailTunnel(), and CcBuildRoadTunnel().
void SetTileSelectSize | ( | int | w, | |
int | h | |||
) |
Highlight w by h tiles at the cursor.
w | Width of the highlighted tiles rectangle. | |
h | Height of the highlighted tiles rectangle. |
Definition at line 2448 of file viewport.cpp.
References TileHighlightData::new_outersize, TileHighlightData::new_size, and TILE_SIZE.
Referenced by BuildRailClick_Remove(), CopyPasteWindow::OnClick(), CompanyWindow::OnClick(), ScenarioEditorLandscapeGenerationWindow::OnPaint(), BuildRoadStationWindow::OnPaint(), BuildRailStationWindow::OnPaint(), BuildDocksStationWindow::OnPaint(), and VpHandlePlaceSizingDrag().
void StartSpriteCombine | ( | ) |
Starts a block of sprites, which are "combined" into a single bounding box.
Subsequent calls to AddSortableSpriteToDraw will be drawn into the same bounding box. That is: The first sprite that is not clipped by the viewport defines the bounding box, and the following sprites will be child sprites to that one.
That implies:
The block is terminated by EndSpriteCombine.
You cannot nest "combined" blocks.
Definition at line 746 of file viewport.cpp.
References ViewportDrawer::combine_sprites, and SPRITE_COMBINE_NONE.
Referenced by DrawBridgeMiddle(), DrawBridgeTramBits(), and DrawTile_TunnelBridge().
void UpdateViewportPosition | ( | Window * | w | ) |
Update the viewport position being displayed.
w | Window owning the viewport. |
Definition at line 1986 of file viewport.cpp.
References _settings_client, Clamp(), ViewportData::dest_scrollpos_x, ViewportData::dest_scrollpos_y, ViewportData::follow_vehicle, Pool< Titem, Tindex, Tgrowth_step, Tmax_size, Tpool_type, Tcache, Tzero >::PoolItem<&_vehicle_pool >::Get(), ClientSettings::gui, INVALID_VEHICLE, ScaleByMapSize1D(), ViewportData::scrollpos_x, ViewportData::scrollpos_y, GUISettings::smooth_scroll, Window::viewport, Vehicle::x_pos, Vehicle::y_pos, and Vehicle::z_pos.
Referenced by UpdateWindows().
void ViewportAddString | ( | const DrawPixelInfo * | dpi, | |
ZoomLevel | small_from, | |||
const ViewportSign * | sign, | |||
StringID | string_normal, | |||
StringID | string_small, | |||
StringID | string_small_shadow, | |||
uint64 | params_1, | |||
uint64 | params_2, | |||
Colours | colour | |||
) |
Add a string to draw in the viewport.
dpi | current viewport area | |
small_from | Zoomlevel from when the small font should be used | |
sign | sign position and dimension | |
string_normal | String for normal and 2x zoom level | |
string_small | String for 4x and 8x zoom level | |
string_small_shadow | Shadow string for 4x and 8x zoom level; or STR_NULL if no shadow | |
colour | colour of the sign background; or 0 if transparent |
Definition at line 1553 of file viewport.cpp.
References ViewportSign::center, FONT_HEIGHT_NORMAL, ScaleByZoom(), ViewportSign::top, VPSM_BOTTOM, VPSM_TOP, ViewportSign::width_normal, and ViewportSign::width_small.