struct AtlasDescriptor
{
Dali::Atlas mAtlas; // atlas image
- SizeType mWidth; // width of atlas
- SizeType mHeight; // height of atlas
- SizeType mBlockWidth; // width of a block in atlas
- SizeType mBlockHeight; // height of a block in atlas
+ Toolkit::AtlasManager::AtlasSize mSize; // size of atlas
Pixel::Format mPixelFormat; // pixel format used by atlas
+ BufferImage mHorizontalStrip; // Image used to pad upload
+ BufferImage mVerticalStrip; // Image used to pad upload
+ BufferImage mFilledPixelImage; // Image used by atlas for operations such as underline
+ PixelBuffer* mStripBuffer; // Blank image buffer used to pad upload
Material mMaterial; // material used for atlas texture
SizeType mNextFreeBlock; // next free block will be placed here ( actually +1 )
Dali::Vector< SizeType > mFreeBlocksList; // unless there are any previously freed blocks
/**
* @copydoc: Toolkit::AtlasManager::CreateAtlas
*/
- AtlasId CreateAtlas( SizeType width,
- SizeType height,
- SizeType blockWidth,
- SizeType blockHeight,
- Pixel::Format pixelformat );
+ AtlasId CreateAtlas( const Toolkit::AtlasManager::AtlasSize& size, Pixel::Format pixelformat );
/**
* @copydoc Toolkit::AtlasManager::SetAddPolicy
AtlasId GetAtlas( ImageId id ) const;
/**
- * @copydoc Toolkit::AtlasManager::SetAtlasSize
+ * @copydoc Toolkit::AtlasManager::SetNewAtlasSize
+ */
+ void SetNewAtlasSize( const Toolkit::AtlasManager::AtlasSize& size );
+
+ /**
+ * @copydoc Toolkit::AtlasManager::GetAtlasSize
*/
- void SetAtlasSize( const Vector2& size,
- const Vector2& blockSize );
+ const Toolkit::AtlasManager::AtlasSize& GetAtlasSize( AtlasId atlas );
/**
* @copydoc Toolkit::AtlasManager::GetBlockSize
*/
Pixel::Format GetPixelFormat( AtlasId atlas );
+ /**
+ * @copydoc Toolkit::AtlasManager::GetMetrics
+ */
+ void GetMetrics( Toolkit::AtlasManager::Metrics& metrics );
+
private:
std::vector< AtlasDescriptor > mAtlasList; // List of atlases created
void PrintMeshData( const MeshData& meshData );
- Vector2 mNewAtlasSize;
- Vector2 mNewBlockSize;
+ Toolkit::AtlasManager::AtlasSize mNewAtlasSize;
Toolkit::AtlasManager::AddFailPolicy mAddFailPolicy;
+ uint32_t mFilledPixel;
};
} // namespace Internal