5 * Copyright (c) 2016 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/object/handle.h> // Dali::Handle
23 #include <dali/public-api/actors/sampling.h>
28 namespace Internal DALI_INTERNAL
34 * @brief Sampler is a handle to an object that can be used to provide the sampling parameters to sample textures
38 class DALI_IMPORT_API Sampler : public BaseHandle
43 * @brief Creates a new Sampler object
50 * @brief Default constructor, creates an empty handle
64 * @brief Copy constructor, creates a new handle to the same object
67 * @param[in] handle Handle to an object
69 Sampler( const Sampler& handle );
72 * @brief Downcast to a sampler handle.
73 * If not the returned handle is left uninitialized.
76 * @param[in] handle Handle to an object
77 * @return Handle or an uninitialized handle
79 static Sampler DownCast( BaseHandle handle );
82 * @brief Assignment operator, changes this handle to point at the same object
85 * @param[in] handle Handle to an object
86 * @return Reference to the assigned object
88 Sampler& operator=( const Sampler& handle );
92 * @brief Set the filter modes for this sampler
93 * Calling this function sets the properties MINIFICATION_FILTER and MAGNIFICATION_FILTER.
96 * @param[in] minFilter The minification filter that will be used
97 * @param[in] magFilter The magnification filter that will be used
99 void SetFilterMode( FilterMode::Type minFilter, FilterMode::Type magFilter );
102 * @brief Set the wrap modes for this sampler
105 * param[in] uWrap Wrap mode for u coordinates
106 * param[in] vWrap Wrap mode for v coordinates
108 void SetWrapMode( WrapMode::Type uWrap, WrapMode::Type vWrap );
111 * @brief Set the wrap modes for this sampler
114 * param[in] rWrap Wrap mode for the z direction
115 * param[in] sWrap Wrap mode for the x direction
116 * param[in] tWrap Wrap mode for the y direction
118 void SetWrapMode( WrapMode::Type rWrap, WrapMode::Type sWrap, WrapMode::Type tWrap );
123 * @brief The constructor
124 * @note Not intended for application developers.
126 * @param[in] pointer A pointer to a newly allocated Sampler
128 explicit DALI_INTERNAL Sampler( Internal::Sampler* pointer );
133 #endif // DALI_SAMPLER_H