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),
40 mCharacterList.clear();
43 void GlyphSet::AddCharacter(BitmapPtr bitmapData, const GlyphMetrics& glyphMetrics)
45 mCharacterList.push_back(Character(bitmapData, glyphMetrics));
48 void GlyphSet::AddCharacter(const Character& character)
50 mCharacterList.push_back(character);
53 const GlyphSet::CharacterList& GlyphSet::GetCharacterList() const
55 return mCharacterList;
58 bool GlyphSet::HasCharacter(const uint32_t charCode) const
60 for (CharacterConstIter iter = mCharacterList.begin(), endIter = mCharacterList.end(); iter != endIter; ++iter)
62 if (iter->second.code == charCode)
70 bool GlyphSet::HasCharacter(const Character& character) const
72 return HasCharacter(character.second.code);
75 ResourceId GlyphSet::GetAtlasResourceId() const
80 void GlyphSet::SetAtlasResourceId(ResourceId resourceId)
82 mAtlasId = resourceId;
85 } //namespace Integration