84 void setImagePng(
const void* png,
size_t png_size,
bool alpha_only =
false,
DsColor color = OPAQUE);
119 void onPaint(
DsRenderer &renderer)
override final;
120 void onPaintOver(
DsRenderer &renderer)
override final;
121 DsSize fitContent(
void)
override final;
127 bool mIsSurfaceFreeable;
DsAlignment is a class representing both horizontal and vertical alignment type.
Definition ds_types.h:130
DsColor is a class that represents a 4 channel color (Alpha, Red, Green, Blue).
Definition ds_color.h:53
DsImage is a class that implements a view capable of displaying an image.
Definition ds_image.h:18
void setImageJpg(const void *jpg, size_t jpg_size)
Initializes the image using raw JPEG data.
void setImageColor(DsColor color)
Sets the color used for drawing images that contain the alpha channel only (A8 type).
DsImage(DsView *parent, const DsPoint &pos, const DsSize &size, const DsSurface &surface, DsColor color=OPAQUE, const DsAlignment &alignment=DS_ALIGN_CENTER)
Creates a DsImage view using a surface.
DsImage(DsView *parent, const DsPoint &pos=DsPoint(), const DsSize &size=DsSize())
Creates a DsImage view without any surface attached (no content).
void setImage(const DsSurface *surface, DsColor color=OPAQUE)
Initializes the image using a surface.
DsImage(DsView *parent, const DsPoint &pos, const DsSize &size, const void *jpg, size_t jpg_size, const DsAlignment &alignment=DS_ALIGN_CENTER)
Creates a DsImage view using raw JPEG data.
DsImage(DsView *parent, const DsPoint &pos, const DsSize &size, const void *png, size_t png_size, bool alpha_only, DsColor color=OPAQUE, const DsAlignment &alignment=DS_ALIGN_CENTER)
Creates a DsImage view using raw PNG data.
void setImagePng(const void *png, size_t png_size, bool alpha_only=false, DsColor color=OPAQUE)
Initializes the image using PNG data.
void setAlignment(const DsAlignment &alignment)
Sets the alignment used for the image inside the view.
DsPoint is a class that represents the X and Y 2D coordinates of a point as integer numbers.
Definition ds_geometry.h:24
DsRenderer is a class that implements all the drawing operations.
Definition ds_renderer.h:42
DsSize is class that represents the 2D size of a graphic object (width, height) as integer values.
Definition ds_geometry.h:780
DsSurface is a class that represents a drawing surface.
Definition ds_surface.h:30
DsView is a base class that represents any view on the screen.
Definition ds_view.h:40