MCPcopy Create free account
hub / github.com/arrayfire/forge / Image

Class Image

include/fg/image.h:174–282  ·  view source on GitHub ↗

\class Image \brief Image is plain rendering of an image over the window or sub-region of it. */

Source from the content-addressed store, hash-verified

172 \brief Image is plain rendering of an image over the window or sub-region of it.
173 */
174class Image {
175 private:
176 fg_image mValue;
177
178 public:
179 /**
180 Creates a Image object
181
182 \param[in] pWidth Width of the image
183 \param[in] pHeight Height of the image
184 \param[in] pFormat Color channel format of image, uses one of the values
185 of \ref ChannelFormat
186 \param[in] pDataType takes one of the values of \ref dtype that indicates
187 the integral data type of histogram data
188 */
189 FGAPI Image(const unsigned pWidth, const unsigned pHeight,
190 const ChannelFormat pFormat=FG_RGBA, const dtype pDataType=f32);
191
192 /**
193 Copy constructor of Image
194
195 \param[in] pOther is the Image of which we make a copy of.
196 */
197 FGAPI Image(const Image& pOther);
198
199 /**
200 Construct Image ojbect from fg_image resource handle
201
202 \param[in] pHandle is the input fg_image resource handle
203
204 \note This kind of construction assumes ownership of the resource handle
205 is released during the Image object's destruction.
206 */
207 FGAPI explicit Image(const fg_image pHandle);
208
209 /**
210 Image Destructor
211 */
212 FGAPI ~Image();
213
214 /**
215 Set a global alpha value for rendering the image
216
217 \param[in] pAlpha
218 */
219 FGAPI void setAlpha(const float pAlpha);
220
221 /**
222 Set option to inform whether to maintain aspect ratio of original image
223
224 \param[in] pKeep
225 */
226 FGAPI void keepAspectRatio(const bool pKeep);
227
228 /**
229 Get Image width
230 \return image width
231 */

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected