X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali-toolkit%2Finternal%2Ftext%2Frendering%2Fatlas%2Fatlas-glyph-manager.h;h=cf663c32197a5e85a81631fe3420cf0c2e7c3a88;hb=refs%2Fchanges%2F28%2F38928%2F2;hp=a90efdb42d6f259173a286bdcf12284944df087a;hpb=3b1fb566901d21b8303d9be3308e3920f5182e6d;p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git diff --git a/dali-toolkit/internal/text/rendering/atlas/atlas-glyph-manager.h b/dali-toolkit/internal/text/rendering/atlas/atlas-glyph-manager.h index a90efdb..cf663c3 100644 --- a/dali-toolkit/internal/text/rendering/atlas/atlas-glyph-manager.h +++ b/dali-toolkit/internal/text/rendering/atlas/atlas-glyph-manager.h @@ -34,11 +34,20 @@ class AtlasGlyphManager; } -class DALI_IMPORT_API AtlasGlyphManager : public BaseHandle +class AtlasGlyphManager : public BaseHandle { public: /** + * Description of GlyphManager state + */ + struct Metrics + { + uint32_t mGlyphCount; // number of glyphs being managed + AtlasManager::Metrics mAtlasMetrics; // metrics from the Atlas Manager + }; + + /** * @brief Create a AtlasGlyphManager handle. * * Calling member functions with an uninitialised handle is not allowed. @@ -79,7 +88,7 @@ public: */ void GenerateMeshData( uint32_t imageId, const Vector2& position, - MeshData& meshData ); + Toolkit::AtlasManager::Mesh2D& mesh ); /** * @brief Stitch Two Meshes together @@ -87,8 +96,8 @@ public: * @param[in] first first mesh * @param[in] second second mesh */ - void StitchMesh( MeshData& first, - const MeshData& second ); + void StitchMesh( Toolkit::AtlasManager::Mesh2D& first, + const Toolkit::AtlasManager::Mesh2D& second ); /** * @brief Check to see if a glyph is being cached @@ -102,13 +111,23 @@ public: AtlasManager::AtlasSlot& slot ); /** - * @brief Set the Atlas size and block size for subsequent atlas generation + * @brief Retrieve the size of an atlas + * + * @param[in] atlasId Id of the atlas to interrogate * - * @param[in] size size of the atlas in pixels - * @param[in] blockSize size of a block in this atlas in pixels + * @return The pixel size of the atlas */ - void SetAtlasSize( const Vector2& size, - const Vector2& blockSize ); + Vector2 GetAtlasSize( uint32_t atlasId ); + + /** + * @brief Set the atlas size and block size for subsequent Atlas generation + * + * @param[in] width width of atlas in pixels + * @param[in] height height of atlas in pixels + * @param[in] blockWidth width of a block in pixels + * @param[in] blockHeight height of a block in pixels + */ + void SetNewAtlasSize( uint32_t width, uint32_t height, uint32_t blockWidth, uint32_t blockHeight ); /** * @brief Unreference an image from the atlas and remove from cache if no longer needed @@ -120,11 +139,28 @@ public: /** * @brief Get the Pixel Format used by an atlas * - * @param atlasId Id of atlas to check + * @param[in] atlasId Id of atlas to check + * * @return The pixel format of the atlas */ Pixel::Format GetPixelFormat( uint32_t atlasId ); + /** + * @brief Get the material used by an atlas + * + * @param[in] atlasId Id of an atlas + * + * @return The material used by the atlas + */ + Material GetMaterial( uint32_t atlasId ) const; + + /** + * @brief Get Glyph Manager metrics + * + * @return const reference to glyph manager metrics + */ + const Metrics& GetMetrics(); + private: explicit DALI_INTERNAL AtlasGlyphManager(Internal::AtlasGlyphManager *impl);