Go to the documentation of this file.
37 const unsigned pWidth,
const unsigned pHeight,
153 const int pX,
const int pY,
const int pWidth,
const int pHeight);
276 const int pX,
const int pY,
const int pVPW,
const int pVPH)
const;
FGAPI fg_image get() const
Get the handle to internal implementation of Image.
FGAPI ~Image()
Image Destructor.
dtype
Definition: defines.h:188
void * fg_image
Definition: defines.h:43
FGAPI fg_err fg_get_image_size(unsigned *pOut, const fg_image pImage)
Get the image buffer size in bytes.
Image is plain rendering of an image over the window or sub-region of it.
Definition: image.h:174
FGAPI unsigned pixels() const
Get the resource id of image buffer.
fg_err
Definition: defines.h:49
FGAPI fg_err fg_get_image_width(unsigned *pOut, const fg_image pImage)
Get the width of the image.
FGAPI ChannelFormat pixelFormat() const
Get Image's channel format.
FGAPI fg_err fg_get_image_type(fg_dtype *pOut, const fg_image pImage)
Get the pixel data type of the image.
FGAPI fg_err fg_get_image_height(unsigned *pOut, const fg_image pImage)
Get the height of the image.
FGAPI fg_err fg_get_image_pixelformat(fg_channel_format *pOut, const fg_image pImage)
Get the channel format of the image.
Window is where other objects such as Images, Plots etc. are rendered.
Definition: window.h:300
FGAPI unsigned height() const
Get Image height.
FGAPI unsigned size() const
Get the image data size in bytes.
FGAPI fg_err fg_release_image(fg_image pImage)
Destroy image object.
@ FG_RGBA
Four(Red, Green, Blue & Alpha) channels.
Definition: defines.h:113
FGAPI fg_err fg_set_image_aspect_ratio(fg_image pImage, const bool pKeepRatio)
Set option to inform whether to maintain aspect ratio of original image.
void * fg_window
Definition: defines.h:40
fg_dtype
Definition: defines.h:150
FGAPI void keepAspectRatio(const bool pKeep)
Set option to inform whether to maintain aspect ratio of original image.
FGAPI void setAlpha(const float pAlpha)
Set a global alpha value for rendering the image.
FGAPI Image(const fg_image pHandle)
Construct Image ojbect from fg_image resource handle.
FGAPI Image(const unsigned pWidth, const unsigned pHeight, const ChannelFormat pFormat=FG_RGBA, const dtype pDataType=f32)
Creates a Image object.
FGAPI void render(const Window &pWindow, const int pX, const int pY, const int pVPW, const int pVPH) const
Render the image to given window.
FGAPI fg_err fg_retain_image(fg_image *pOut, fg_image pImage)
Increment the internal reference counter for image resource.
FGAPI fg_err fg_render_image(const fg_window pWindow, const fg_image pImage, const int pX, const int pY, const int pWidth, const int pHeight)
Render the image to given window.
FGAPI dtype channelType() const
Get Image's integral data type.
FGAPI Image(const Image &pOther)
Copy constructor of Image.
FGAPI fg_err fg_create_image(fg_image *pImage, const unsigned pWidth, const unsigned pHeight, const fg_channel_format pFormat, const fg_dtype pType)
Create a Image object.
FGAPI fg_err fg_get_pixel_buffer(unsigned *pOut, const fg_image pImage)
Get the image buffer resource identifier.
fg_channel_format
Definition: defines.h:108
FGAPI fg_err fg_set_image_alpha(fg_image pImage, const float pAlpha)
Set a global alpha value for rendering the image.
#define FGAPI
Definition: defines.h:28
@ f32
Definition: defines.h:193
FGAPI unsigned width() const
Get Image width.