Doly C++ SDK v1.00
Loading...
Searching...
No Matches
VContent.h
Go to the documentation of this file.
1#pragma once
2#include <stdio.h>
3#include <string.h>
4#include <string>
5#include <stdint.h>
6#include <vector>
7
26
31{
32public:
33 VContent() = default;
34 ~VContent() = default;
35
40 bool isReady();
41
50 std::vector<std::vector<uint8_t>> frames;
51
53 uint16_t active_frame_id = 0;
54
56 uint16_t ft = 0;
57
59 uint16_t width = 0;
60
62 uint16_t height = 0;
63
65 std::string path;
66
68 bool alpha;
69
72
79 uint8_t ratio = 1;
80
87 uint16_t loop = 0;
88
107 static VContent getImage(std::string path, bool isRGBA, bool set12Bit);
108
109private:
111 bool loaded = false;
112};
113 // end of group doly_common_vcontent
bool isReady()
Check whether the visual content is loaded and ready.
uint16_t width
Frame width in pixels.
Definition VContent.h:59
static VContent getImage(std::string path, bool isRGBA, bool set12Bit)
Load a PNG image and create a VContent instance.
uint16_t height
Frame height in pixels.
Definition VContent.h:62
~VContent()=default
std::string path
Source path of the image/animation.
Definition VContent.h:65
bool alpha
True if the source image has an alpha channel.
Definition VContent.h:68
VContent()=default
uint16_t active_frame_id
Selected frame index on load.
Definition VContent.h:53
bool color12Bit
True if image color depth is 12-bit.
Definition VContent.h:71
uint16_t ft
Total number of frames in the sequence.
Definition VContent.h:56
std::vector< std::vector< uint8_t > > frames
Image frame buffers.
Definition VContent.h:50
uint16_t loop
Loop count for animations.
Definition VContent.h:87
uint8_t ratio
Frame rate divider.
Definition VContent.h:79