1 #ifndef __DALI_INTERNAL_BITMAP_UPLOAD_H__
2 #define __DALI_INTERNAL_BITMAP_UPLOAD_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>
31 * Holds a bitmap and a x,y pixel position of where the bitmap
32 * should be uploaded to in a texture.
40 DISCARD_PIXEL_DATA, ///< Delete the pixel data after upload
41 DONT_DISCARD_PIXEL_DATA ///< Don't delete the pixel data after upload
44 typedef unsigned char PixelData; ///< pixel data type
48 * @param data pixel data
49 * @param xPos x position of where to place the bitmap in a texture
50 * @param yPos y position of where to place the bitmap in a texture
51 * @param width bitmap width in pixels
52 * @param height bitmap height in pixels
53 * @param discardMode whether to delete the pixel data after the upload or not
55 BitmapUpload(PixelData* data,
60 DiscardMode discardMode = DISCARD_PIXEL_DATA)
71 PixelData* mPixelData; ///< bitmap data to upload
72 unsigned int mXpos; ///< x position to place the bitmap in the texture
73 unsigned int mYpos; ///< y position to place the bitmap in the texture
74 unsigned int mWidth; ///< width of the bitmap to upload
75 unsigned int mHeight; ///< height of the bitmap to upload
76 DiscardMode mDiscard; ///< whether the pixel data should be discarded after the upload
79 typedef std::vector<BitmapUpload> BitmapUploadArray; ///< typedef for a array of uploads
83 * Structure is used for clearing areas of the atlas prior to loading glyphs
85 typedef std::vector<Vector2> BitmapClearArray;
87 } //namespace Internal