2 * Copyright (c) 2014 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.
19 #include <dali/integration-api/glyph-set.h>
32 mUnderlinePosition(0.0f),
33 mUnderlineThickness(0.0f),
41 mCharacterList.clear();
44 void GlyphSet::AddCharacter(BitmapPtr bitmapData, const GlyphMetrics& glyphMetrics)
46 mCharacterList.push_back(Character(bitmapData, glyphMetrics));
49 void GlyphSet::AddCharacter(const Character& character)
51 mCharacterList.push_back(character);
54 const GlyphSet::CharacterList& GlyphSet::GetCharacterList() const
56 return mCharacterList;
59 bool GlyphSet::HasCharacter(const uint32_t charCode) const
61 for (CharacterConstIter iter = mCharacterList.begin(), endIter = mCharacterList.end(); iter != endIter; ++iter)
63 if (iter->second.code == charCode)
71 bool GlyphSet::HasCharacter(const Character& character) const
73 return HasCharacter(character.second.code);
76 ResourceId GlyphSet::GetAtlasResourceId() const
81 void GlyphSet::SetAtlasResourceId(ResourceId resourceId)
83 mAtlasId = resourceId;
86 } //namespace Integration