2 * Copyright (c) 2015 Samsung Electronics Co., Ltd.
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
18 #include <dali-toolkit/internal/text/rendering/atlas/atlas-manager.h>
21 #include <dali-toolkit/internal/text/rendering/atlas/atlas-manager-impl.h>
27 AtlasManager::AtlasManager()
31 AtlasManager::~AtlasManager()
35 AtlasManager AtlasManager::New()
37 Internal::AtlasManagerPtr internal = Internal::AtlasManager::New();
38 return AtlasManager(internal.Get());
41 AtlasManager::AtlasManager(Internal::AtlasManager* impl)
46 AtlasManager::AtlasId AtlasManager::CreateAtlas(const AtlasManager::AtlasSize& size, Pixel::Format pixelformat)
48 return GetImplementation(*this).CreateAtlas(size, pixelformat);
51 void AtlasManager::SetAddPolicy(AddFailPolicy policy)
53 GetImplementation(*this).SetAddPolicy(policy);
56 bool AtlasManager::Add(const PixelData& image,
57 AtlasManager::AtlasSlot& slot,
58 AtlasManager::AtlasId atlas)
60 return GetImplementation(*this).Add(image, slot, atlas);
63 bool AtlasManager::Remove(ImageId id)
65 return GetImplementation(*this).Remove(id);
68 void AtlasManager::GenerateMeshData(ImageId id,
69 const Vector2& position,
73 GetImplementation(*this).GenerateMeshData(id,
79 Dali::Texture AtlasManager::GetAtlasContainer(AtlasId atlas) const
81 return GetImplementation(*this).GetAtlasContainer(atlas);
84 AtlasManager::AtlasId AtlasManager::GetAtlas(ImageId id)
86 return GetImplementation(*this).GetAtlas(id);
89 const AtlasManager::AtlasSize& AtlasManager::GetAtlasSize(AtlasId atlas)
91 return GetImplementation(*this).GetAtlasSize(atlas);
94 AtlasManager::SizeType AtlasManager::GetFreeBlocks(AtlasId atlas)
96 return GetImplementation(*this).GetFreeBlocks(atlas);
99 void AtlasManager::SetNewAtlasSize(const AtlasSize& size)
101 GetImplementation(*this).SetNewAtlasSize(size);
104 AtlasManager::SizeType AtlasManager::GetAtlasCount() const
106 return GetImplementation(*this).GetAtlasCount();
109 Pixel::Format AtlasManager::GetPixelFormat(AtlasId atlas) const
111 return GetImplementation(*this).GetPixelFormat(atlas);
114 void AtlasManager::GetMetrics(Metrics& metrics)
116 GetImplementation(*this).GetMetrics(metrics);
119 TextureSet AtlasManager::GetTextures(AtlasId atlas) const
121 return GetImplementation(*this).GetTextures(atlas);
124 void AtlasManager::SetTextures(AtlasId atlas, TextureSet& textureSet)
126 GetImplementation(*this).SetTextures(atlas, textureSet);
129 } // namespace Toolkit