cgv
Loading...
Searching...
No Matches
color_storage.cxx
1#include "color_storage.h"
2
3namespace cgv {
4 namespace media {
5
7 : color_type(_color_type)
8 {
9 }
10
14
16 {
17 return color_type;
18 }
19
22 {
23 size_t sizes[] = { sizeof(rgb8), sizeof(rgba8), sizeof(rgb),sizeof(rgba)};
24 return sizes[color_type];
25 }
26 }
27}
abst_color_storage(ColorType _color_type)
construct from color type enumerate
ColorType get_color_type() const
return color type of color storage
virtual ~abst_color_storage()
virtual destructor ensures that std::vector defined in template class color_storage is destructed too
size_t get_color_size() const
return size of a single color in byte
represent a color with components of given type and color and alpha model as specified.
Definition color.h:574
the cgv namespace
Definition print.h:11
cgv::media::color< float, cgv::media::RGB > rgb
declare rgb color type with 32 bit components
Definition color.h:853
cgv::media::color< cgv::type::uint8_type, cgv::media::RGB > rgb8
declare rgb color type with 8 bit components
Definition color.h:857