Browse Source

Text,TextureTools: doc++

pull/674/head
Vladimír Vondruš 1 year ago
parent
commit
f365febb2b
  1. 4
      src/Magnum/Text/Direction.h
  2. 2
      src/Magnum/Text/Feature.h
  3. 13
      src/Magnum/Text/Renderer.h
  4. 2
      src/Magnum/TextureTools/Atlas.h

4
src/Magnum/Text/Direction.h

@ -99,9 +99,11 @@ MAGNUM_TEXT_EXPORT Debug& operator<<(Debug& debug, ShapeDirection value);
@brief Direction a text is laid out in @brief Direction a text is laid out in
@m_since_latest @m_since_latest
@see @ref ShapeDirection @see @ref RendererCore::setLayoutDirection(),
@ref RendererCore::layoutDirection(), @ref ShapeDirection
*/ */
enum class LayoutDirection: UnsignedByte { enum class LayoutDirection: UnsignedByte {
/** Unspecified */
Unspecified = 0, Unspecified = 0,
/** Horizontal text with lines advancing from top to bottom */ /** Horizontal text with lines advancing from top to bottom */

2
src/Magnum/Text/Feature.h

@ -179,7 +179,7 @@ enum class Feature: UnsignedInt {
* `blwm`, [Below-base Mark Positioning](https://learn.microsoft.com/typography/opentype/spec/features_ae#blwm). * `blwm`, [Below-base Mark Positioning](https://learn.microsoft.com/typography/opentype/spec/features_ae#blwm).
* Intended for South-Asian scripts. * Intended for South-Asian scripts.
* @m_keywords{blwm} * @m_keywords{blwm}
*/ */
BelowBaseMarkPositioning = Utility::Endianness::fourCC('b', 'l', 'w', 'm'), BelowBaseMarkPositioning = Utility::Endianness::fourCC('b', 'l', 'w', 'm'),
/** /**

13
src/Magnum/Text/Renderer.h

@ -541,7 +541,10 @@ class MAGNUM_TEXT_EXPORT RendererCore {
* Splits @p text into individual lines and shapes each with given * Splits @p text into individual lines and shapes each with given
* @p shaper. Places and aligns the text according to @ref cursor(), * @p shaper. Places and aligns the text according to @ref cursor(),
* @ref alignment() and @ref layoutDirection(), continuing from the * @ref alignment() and @ref layoutDirection(), continuing from the
* state left after the previous @ref add(), if any. * state left after the previous @ref add(), if any. Expects that
* @p shaper font is present in @ref glyphCache(), either added
* explicitly via @ref AbstractGlyphCache::addFont() or through
* @ref AbstractFont::fillGlyphCache().
* *
* After calling this function, @ref isRendering() returns * After calling this function, @ref isRendering() returns
* @cpp true @ce, @ref renderingGlyphCount() and @ref renderingRunCount() * @cpp true @ce, @ref renderingGlyphCount() and @ref renderingRunCount()
@ -565,6 +568,7 @@ class MAGNUM_TEXT_EXPORT RendererCore {
* overload to pass a string as a whole. * overload to pass a string as a whole.
* *
* The function uses @ref AbstractShaper::shape(), * The function uses @ref AbstractShaper::shape(),
* @ref AbstractGlyphCache::glyphIdsInto(),
* @ref renderLineGlyphPositionsInto(), @ref alignRenderedLine() and * @ref renderLineGlyphPositionsInto(), @ref alignRenderedLine() and
* @ref glyphQuadBounds() internally, see their documentation for more * @ref glyphQuadBounds() internally, see their documentation for more
* information. * information.
@ -1211,13 +1215,18 @@ class MAGNUM_TEXT_EXPORT Renderer: public RendererCore {
* @brief Set index type * @brief Set index type
* @return Reference to self (for method chaining) * @return Reference to self (for method chaining)
* *
* Sets the smallest possible index type to be used. Initially * Expects that rendering is currently not in progress. Sets the
* smallest possible index type to be used. Initially
* @ref MeshIndexType::UnsignedByte, a larger type is automatically * @ref MeshIndexType::UnsignedByte, a larger type is automatically
* switched to once @ref glyphCapacity() exceeds @cpp 64 @ce and * switched to once @ref glyphCapacity() exceeds @cpp 64 @ce and
* @cpp 16384 @ce glyphs. Set to a larger type if you want it to be * @cpp 16384 @ce glyphs. Set to a larger type if you want it to be
* used even if the glyph capacity is smaller. Setting it back to a * used even if the glyph capacity is smaller. Setting it back to a
* smaller type afterwards uses the type only if the glyph capacity * smaller type afterwards uses the type only if the glyph capacity
* allows it. * allows it.
*
* Note that the @ref RendererGL subclass changes the default index
* type to @ref MeshIndexType::UnsignedShort, as use of 8-bit indices
* is discouraged on contemporary GPUs.
*/ */
Renderer& setIndexType(MeshIndexType atLeast); Renderer& setIndexType(MeshIndexType atLeast);

2
src/Magnum/TextureTools/Atlas.h

@ -364,7 +364,7 @@ class MAGNUM_TEXTURETOOLS_EXPORT AtlasLandfill {
* *
* The @p sizes, @p offsets and @p rotations views are expected to have * The @p sizes, @p offsets and @p rotations views are expected to have
* the same size. The @p sizes are all expected to be not larger than * the same size. The @p sizes are all expected to be not larger than
* @ref size() after appying padding and then a rotation based on * @ref size() after applying padding and then a rotation based on
* @ref AtlasLandfillFlag::RotatePortrait or * @ref AtlasLandfillFlag::RotatePortrait or
* @relativeref{AtlasLandfillFlag,RotateLandscape} being set. If * @relativeref{AtlasLandfillFlag,RotateLandscape} being set. If
* neither @relativeref{AtlasLandfillFlag,RotatePortrait} nor * neither @relativeref{AtlasLandfillFlag,RotatePortrait} nor

Loading…
Cancel
Save