Search Results for

    Show / Hide Table of Contents

    Class FontTextureAtlas

    Texture resource that contains an atlas of cached font glyphs.

    Inheritance
    Object
    ScriptingObject
    ManagedScriptingObject
    Asset
    BinaryAsset
    TextureBase
    Texture
    FontTextureAtlas
    Inherited Members
    TextureBase::_customData
    Asset::_deleteFileOnUnload
    BinaryAsset::_dependantAssets
    ScriptingObject::_gcHandle
    BinaryAsset::_header
    ScriptingObject::_id
    BinaryAsset::_isSaving
    Asset::_isVirtual
    Asset::_loadingTask
    Asset::_loadState
    TextureBase::_parent
    Asset::_refCount
    BinaryAsset::_storageRef
    TextureBase::_texture
    ScriptingObject::_type
    BinaryAsset::AddDependency(BinaryAsset* asset)
    Asset::AddReference()
    Asset::Asset(const SpawnParams& params, const AssetInfo* info)
    TextureBase::CalculateChunkIndex(int32 mipIndex)
    ScriptingObject::CanCast(const ScriptingTypeHandle& from, const ScriptingTypeHandle& to)
    ScriptingObject::CanCast(const MClass* from, const MClass* to)
    TextureBase::CancelStreaming()
    ScriptingObject::Cast(ScriptingObject* obj)
    Asset::ChangeID(const Guid& newId)
    BinaryAsset::ClearDependencies()
    Asset::const
    BinaryAsset::createLoadingTask()
    Asset::CreateManaged()
    ScriptingObject::CreateManagedInternal()
    Asset::DECLARE_ENUM_7(LoadResult, Ok, Failed, MissingDataChunk, CannotLoadData, CannotLoadStorage, CannotLoadInitData, InvalidData)
    ScriptingObject::Deleted
    Asset::DeleteManaged()
    Object::DeleteObject(float timeToLive = 0.0f, bool useGameTime=false)
    Object::DeleteObjectNow()
    BinaryAsset::Dependencies
    Asset::DEPRECATED("Use GetReferences with assets and files parameter instead")
    Asset::DestroyManaged()
    FontTextureAtlas
    FontTextureAtlas
    Object::Flags
    TextureBase::Format()
    Texture::FromFile(const StringView& path, bool generateMips=false)
    ScriptingObject::FromInterface(void* interfaceObj, const ScriptingTypeHandle& interfaceType)
    ScriptingObject::FromInterface(T* interfaceObj)
    TextureBase::GetArraySize()
    BinaryAsset::GetChunk(int32 index)
    BinaryAsset::GetChunkData(int32 index, BytesContainer& data)
    BinaryAsset::GetChunkSize(int32 index)
    BinaryAsset::getChunksToPreload()
    ScriptingObject::GetClass()
    TextureBase::GetCurrentMemoryUsage()
    ScriptingObject::GetID()
    BinaryAsset::GetImportMetadata(String& path, String& username)
    BinaryAsset::GetImportPath()
    ScriptingObject::GetManagedInstance()
    TextureBase::GetMemoryUsage()
    TextureBase::GetMipData(int32 mipIndex, int32& rowPitch, int32& slicePitch)
    TextureBase::GetMipData(int32 mipIndex, BytesContainer& data)
    TextureBase::GetMipDataCustomPitch(int32 mipIndex, uint32& rowPitch, uint32& slicePitch)
    TextureBase::GetMipDataWithLoading(int32 mipIndex, BytesContainer& data)
    TextureBase::GetMipLevels()
    BinaryAsset::GetOrCreateChunk(int32 index)
    ScriptingObject::GetOrCreateManagedInstance()
    TextureBase::GetOwnerLocker()
    BinaryAsset::GetPath()
    TextureBase::GetPixels(Array<Color32>& pixels, int32 mipIndex = 0, int32 arrayIndex = 0)
    TextureBase::GetPixels(Array<Color>& pixels, int32 mipIndex = 0, int32 arrayIndex = 0)
    Asset::GetReferences(Array<Guid, HeapAllocation>& assets, Array<String, HeapAllocation>& files)
    Asset::GetReferences()
    Asset::GetReferencesCount()
    TextureBase::GetResidentMipLevels()
    BinaryAsset::GetSerializedVersion()
    TextureBase::GetTexture()
    TextureBase::GetTextureData(TextureData& result, bool copyData=true)
    TextureBase::GetTextureGroup()
    TextureBase::GetTextureMipData(TextureMipData& result, int32 mipIndex = 0, int32 arrayIndex = 0, bool copyData=true)
    TextureBase::GetTotalMemoryUsage()
    ScriptingObject::GetType()
    ScriptingObject::GetTypeHandle()
    Asset::GetTypeName()
    BinaryAsset::HasChunk(int32 index)
    BinaryAsset::HasChunkLoaded(int32 index)
    BinaryAsset::HasDependenciesModified()
    ScriptingObject::HasManagedInstance()
    TextureBase::HasStreamingError()
    TextureBase::Height()
    TextureBase::init(AssetInitData& initData)
    TextureBase::Init(InitData* initData)
    TextureBase::Init(InitData&& initData)
    BinaryAsset::Init(const FlaxStorageReference& storage, AssetHeader& header)
    BinaryAsset::Init(AssetInitData& initData)
    Asset::InitAsVirtual()
    BinaryAsset::InitVirtual(AssetInitData& initData)
    ScriptingObject::Is(const ScriptingTypeHandle& type)
    ScriptingObject::Is(const MClass* type)
    ScriptingObject::Is()
    Asset::IsInternalType()
    Asset::IsLoaded()
    ScriptingObject::IsRegistered()
    Asset::IsVirtual()
    Asset::LastLoadFailed()
    TextureBase::load()
    BinaryAsset::loadAsset()
    BinaryAsset::LoadChunk(int32 chunkIndex)
    BinaryAsset::LoadChunks(AssetChunksFlag chunks)
    Texture::LoadFile(const StringView& path, bool generateMips=false)
    FontTextureAtlas
    TextureBase::LockData()
    Asset::Locker
    ManagedScriptingObject::ManagedScriptingObject(const SpawnParams& params)
    BinaryAsset::Metadata
    ScriptingObject::NewObject(const ScriptingTypeHandle& typeHandle)
    ScriptingObject::NewObject()
    FontTextureAtlas
    Asset::OnCheckSave(const StringView& path=StringView::Empty)
    BinaryAsset::OnDeleteObject()
    BinaryAsset::OnDependencyModified(BinaryAsset* asset)
    Asset::onLoad(LoadAssetTask* task)
    Asset::OnLoaded
    Asset::onLoaded()
    Asset::onLoaded_MainThread()
    Asset::OnManagedInstanceDeleted()
    Asset::OnReloading
    BinaryAsset::onRename(const StringView& newPath)
    Asset::OnScriptingDispose()
    Asset::onUnload_MainThread()
    Asset::OnUnloaded
    FontTextureAtlas
    FontTextureAtlas
    ScriptingObject::RegisterObject()
    BinaryAsset::Reimport()
    BinaryAsset::ReleaseChunk(int32 index)
    BinaryAsset::ReleaseChunks()
    BinaryAsset::releaseStorage()
    Asset::Reload()
    Asset::RemoveReference()
    BinaryAsset::RequestChunkDataAsync(int32 index)
    TextureBase::RequestMipDataAsync(int32 mipIndex)
    Texture::Save(const StringView& path, const InitData* customData)
    Texture::Save(const StringView& path=StringView::Empty)
    BinaryAsset::SaveAsset(AssetInitData& data, bool silentMode=false)
    BinaryAsset::SaveAsset(const StringView& path, AssetInitData& data, bool silentMode=false)
    BinaryAsset::SaveToAsset(const StringView& path, AssetInitData& data, bool silentMode=false)
    ScriptingObject::ScriptingObject(const SpawnParams& params)
    BinaryAsset::SetChunk(int32 index, const Span<byte>& data)
    ManagedScriptingObject::SetManagedInstance(MObject* instance)
    TextureBase::SetPixels(const Span<Color32>& pixels, int32 mipIndex = 0, int32 arrayIndex = 0, bool generateMips=false)
    TextureBase::SetPixels(const Span<Color>& pixels, int32 mipIndex = 0, int32 arrayIndex = 0, bool generateMips=false)
    TextureBase::SetTextureGroup(int32 textureGroup)
    Asset::ShouldDeleteFileOnUnload()
    TextureBase::Size()
    FontTextureAtlas
    Asset::startLoading()
    BinaryAsset::Storage
    TextureBase::StreamingTexture()
    ScriptingObject::ToInterface(ScriptingObject* obj, const ScriptingTypeHandle& interfaceType)
    ScriptingObject::ToInterface(ScriptingObject* obj)
    ScriptingObject::ToManaged(const ScriptingObject* obj)
    ScriptingObject::ToNative(MObject* obj)
    Asset::ToString()
    ScriptingObject::UnregisterObject()
    Asset::WaitForLoaded(double timeoutInMilliseconds=30000.0)
    TextureBase::Width()
    BinaryAsset::~BinaryAsset()
    Object::~Object()
    ScriptingObject::~ScriptingObject()
    Assembly: FlaxEngine.dll
    File: Engine/Render2D/FontTextureAtlas.h
    Syntax
    public class FontTextureAtlas : public Texture

    Constructors

    FontTextureAtlas(PixelFormat format, PaddingStyle paddingStyle, int32 index)

    Initializes a new instance of the FontTextureAtlas class.

    Declaration
    public FontTextureAtlas(PixelFormat format, PaddingStyle paddingStyle, int32 index)
    Parameters
    PixelFormat format

    The texture pixels format.

    PaddingStyle paddingStyle

    The texture entries padding style.

    int32 index

    The atlas index.

    Methods

    AddEntry(uint32 width, uint32 height, const Array<byte>& data)

    Adds the new entry to the atlas

    Declaration
    public FontTextureAtlasSlot* AddEntry(uint32 width, uint32 height, const Array<byte>& data)
    Parameters
    uint32 width

    Width of the entry.

    uint32 height

    Height of the entry.

    Array<byte> data

    The data.

    Returns
    FontTextureAtlasSlot

    The atlas slot occupied by the new entry.

    Clear()

    Clears this atlas entries data (doesn't change size/texture etc.).

    Declaration
    public void Clear()

    CopyDataIntoSlot(const FontTextureAtlasSlot* slot, const Array<byte>& data)

    Copies the data into the slot.

    Declaration
    public void CopyDataIntoSlot(const FontTextureAtlasSlot* slot, const Array<byte>& data)
    Parameters
    FontTextureAtlasSlot slot

    The slot.

    Array<byte> data

    The data.

    EnsureTextureCreated()

    Ensures that texture has been created for that atlas.

    Declaration
    public void EnsureTextureCreated() const

    Flush()

    Flushes this atlas data to the GPU

    Declaration
    public void Flush()

    GetHeight()

    Gets the atlas height.

    Declaration
    public uint32 GetHeight() const
    Returns
    uint32

    GetPaddingAmount()

    Gets amount of pixels to pad textures inside an atlas.

    Declaration
    public uint32 GetPaddingAmount() const
    Returns
    uint32

    GetPaddingStyle()

    Gets padding style for textures in the atlas.

    Declaration
    public PaddingStyle GetPaddingStyle() const
    Returns
    PaddingStyle

    GetSize()

    Gets the atlas size.

    Declaration
    public Float2 GetSize() const
    Returns
    Float2

    GetSlotData(const FontTextureAtlasSlot* slot, uint32& width, uint32& height, uint32& stride)

    Returns glyph's bitmap data of the slot.

    Declaration
    public byte* GetSlotData(const FontTextureAtlasSlot* slot, uint32& width, uint32& height, uint32& stride)
    Parameters
    FontTextureAtlasSlot slot

    The slot in atlas.

    uint32 width

    The width of the slot.

    uint32 height

    The height of the slot.

    uint32 stride

    The stride of the slot.

    Returns
    byte

    The pointer to the bitmap data of the given slot.

    GetWidth()

    Gets the atlas width.

    Declaration
    public uint32 GetWidth() const
    Returns
    uint32

    HasDataSyncWithGPU()

    Determines whether atlas has data synchronized with the GPU.

    Declaration
    public bool HasDataSyncWithGPU() const
    Returns
    bool

    true if atlas has data synchronized with the GPU; otherwise, false.

    Init(uint32 width, uint32 height)

    Initializes the atlas.

    Declaration
    public void Init(uint32 width, uint32 height)
    Parameters
    uint32 width

    The width.

    uint32 height

    The height.

    Invalidate(const FontTextureAtlasSlot* slot)

    Invalidates the cached dynamic entry from the atlas.

    Declaration
    public bool Invalidate(const FontTextureAtlasSlot* slot)
    Parameters
    FontTextureAtlasSlot slot

    The slot to invalidate.

    Returns
    bool

    True if slot has been freed, otherwise false.

    Invalidate(uint32 x, uint32 y, uint32 width, uint32 height)

    Invalidates the cached dynamic entry from the atlas.

    Declaration
    public bool Invalidate(uint32 x, uint32 y, uint32 width, uint32 height)
    Parameters
    uint32 x

    The slot location (X coordinate in atlas pixels).

    uint32 y

    The slot location (Y coordinate in atlas pixels).

    uint32 width

    The slot width (size in atlas pixels).

    uint32 height

    The slot height (size in atlas pixels).

    Returns
    bool

    True if slot has been freed, otherwise false.

    IsDirty()

    Determines whether this atlas is dirty and data need to be flushed.

    Declaration
    public bool IsDirty() const
    Returns
    bool

    Setup(PixelFormat format, PaddingStyle paddingStyle)

    Setups the atlas after creation.

    Declaration
    public void Setup(PixelFormat format, PaddingStyle paddingStyle)
    Parameters
    PixelFormat format

    The pixel format.

    PaddingStyle paddingStyle

    The padding style.

    unload(bool isReloading)

    Unloads asset data

    Declaration
    protected virtual void unload(bool isReloading) override
    Parameters
    bool isReloading

    True if asset is reloading data, otherwise false.

    Overrides
    TextureBase::unload(bool isReloading)
    • Improve this Doc
    • View Source
    In This Article
    Back to top Copyright © 2012-2024 Wojciech Figat