RAMSES Documentation  27.0.130
Information for RAMSES users and developers
LayoutUtils.h
Go to the documentation of this file.
1 // -------------------------------------------------------------------------
2 // Copyright (C) 2018 BMW Car IT GmbH
3 // -------------------------------------------------------------------------
4 // This Source Code Form is subject to the terms of the Mozilla Public
5 // License, v. 2.0. If a copy of the MPL was not distributed with this
6 // file, You can obtain one at https://mozilla.org/MPL/2.0/.
7 // -------------------------------------------------------------------------
8 
9 #ifndef RAMSES_LAYOUTUTILS_H
10 #define RAMSES_LAYOUTUTILS_H
11 
13 
14 namespace ramses
15 {
16  namespace LayoutUtils
17  {
30  {
32  int32_t offsetX;
34  int32_t offsetY;
36  uint32_t width;
38  uint32_t height;
40  int32_t combinedAdvance;
41  };
42 
49  RAMSES_API StringBoundingBox GetBoundingBoxForString(GlyphMetricsVector::const_iterator first, GlyphMetricsVector::const_iterator last);
50 
54  RAMSES_API StringBoundingBox GetBoundingBoxForString(const GlyphMetricsVector::const_reverse_iterator& first, const GlyphMetricsVector::const_reverse_iterator& last);
55  }
56 }
57 
58 #endif
#define RAMSES_API
Definition: APIExport.h:35
RAMSES_API StringBoundingBox GetBoundingBoxForString(GlyphMetricsVector::const_iterator first, GlyphMetricsVector::const_iterator last)
Compute a bounding box for a string represented by a range of GlyphMetrics.
The RAMSES namespace contains all client side objects and functions used to implement RAMSES applicat...
Definition: AnimatedProperty.h:15
Helper data structure describing multiple glyphs metrics.
Definition: LayoutUtils.h:30
uint32_t height
Bounding box height.
Definition: LayoutUtils.h:38
int32_t combinedAdvance
Advance to next StringBoundingBox.
Definition: LayoutUtils.h:40
int32_t offsetY
Y axis offset of bounding box from origin.
Definition: LayoutUtils.h:34
uint32_t width
Bounding box width.
Definition: LayoutUtils.h:36
int32_t offsetX
X axis offset of bounding box from origin.
Definition: LayoutUtils.h:32