1 #ifndef __DALI_INTERNAL_GLYPH_RESOURCE_REQUEST_H__
2 #define __DALI_INTERNAL_GLYPH_RESOURCE_REQUEST_H__
5 * Copyright (c) 2014 Samsung Electronics Co., Ltd.
7 * Licensed under the Apache License, Version 2.0 (the "License");
8 * you may not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
11 * http://www.apache.org/licenses/LICENSE-2.0
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS,
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
22 #include <dali/public-api/common/vector-wrapper.h>
23 #include <dali/internal/event/text/resource/font-id.h>
24 #include <dali/integration-api/resource-cache.h>
33 * Structure for requesting an array of characters to be loaded
34 * at a certain quality, for a certain font.
35 * Resource requests are generated by glyph-atlas
37 class GlyphResourceRequest
40 typedef Integration::TextResourceType::CharacterList CharacterList;
41 typedef Integration::ResourceId ResourceId;
54 * @param[in] fontId font id
57 GlyphResourceRequest( FontId fontId, GlyphQuality quality );
60 * non-virtual destructor
62 ~GlyphResourceRequest()
69 GlyphResourceRequest( const GlyphResourceRequest& );
74 GlyphResourceRequest& operator=( const GlyphResourceRequest& );
78 * @return the font id of the request
80 FontId GetFontId() const;
83 * Get the request quality
86 GlyphQuality GetQuality() const;
89 * Inserts a character in to the request
90 * @param[in] code character code
92 void InsertCharacter( unsigned int code, unsigned int xPos, unsigned int yPos );
95 * Get the character list in the request
96 * @return character list
98 const CharacterList& GetCharacterList() const;
105 GlyphResourceRequest();
107 FontId mFontId; ///< font id
108 GlyphQuality mQuality; ///< quality
109 CharacterList mCharacterList; ///< character list
112 typedef std::vector< GlyphResourceRequest > GlyphRequestList;
114 } // namespace Internal
118 #endif // __DALI_INTERNAL_GLYPH_RESOURCE_REQUEST_H__