mirror of
https://gitlab.uni-freiburg.de/opensourcevdi/spice
synced 2025-12-26 22:48:19 +00:00
Add RedDrawable::Format get_format()
This is useful because we can e.g. create pixmaps in the same format as a window.
This commit is contained in:
parent
cfa250caa2
commit
5c2d9a3e32
@ -105,6 +105,7 @@ public:
|
||||
OP_XOR,
|
||||
};
|
||||
|
||||
virtual RedDrawable::Format get_format() = 0;
|
||||
void copy_pixels(const PixelsSource& src, int src_x, int src_y, const SpiceRect& dest);
|
||||
void blend_pixels(const PixelsSource& src, int src_x, int src_y, const SpiceRect& dest);
|
||||
void combine_pixels(const PixelsSource& src, int src_x, int src_y, const SpiceRect& dest,
|
||||
|
||||
@ -34,6 +34,7 @@ public:
|
||||
int get_stride() { return _stride;}
|
||||
uint8_t* get_data() { return _data;}
|
||||
bool is_big_endian_bits();
|
||||
virtual RedDrawable::Format get_format() { return _format; }
|
||||
|
||||
protected:
|
||||
Format _format;
|
||||
|
||||
@ -50,6 +50,7 @@ public:
|
||||
void activate();
|
||||
void set_title(std::wstring& title);
|
||||
void set_icon(Icon *icon);
|
||||
virtual RedDrawable::Format get_format();
|
||||
|
||||
enum Type {
|
||||
TYPE_INVALID,
|
||||
|
||||
@ -1930,6 +1930,11 @@ int RedWindow::get_screen_num()
|
||||
return _screen;
|
||||
}
|
||||
|
||||
RedDrawable::Format RedWindow::get_format()
|
||||
{
|
||||
return XPlatform::get_screen_format(_screen);
|
||||
}
|
||||
|
||||
void RedWindow::set_type_gl()
|
||||
{
|
||||
PixelsSource_p *pix_source = (PixelsSource_p*)get_opaque();
|
||||
|
||||
Loading…
Reference in New Issue
Block a user