mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-01-22 23:17:04 +00:00
added background to svg if transparent not set
This commit is contained in:
parent
f34fae5bd8
commit
4370a18763
1
hyper.h
1
hyper.h
@ -1866,6 +1866,7 @@ namespace shot {
|
||||
extern bool make_svg;
|
||||
extern ld gamma, fade;
|
||||
extern string caption;
|
||||
extern bool transparent;
|
||||
void menu();
|
||||
void default_screenshot_content();
|
||||
void take(string fname, const function<void()>& what = default_screenshot_content);
|
||||
|
@ -166,6 +166,8 @@ namespace svg {
|
||||
#endif
|
||||
|
||||
println(f, "<svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"", coord(vid.xres), "\" height=\"", coord(vid.yres), "\">");
|
||||
if(!shot::transparent)
|
||||
println(f, "<rect width=\"", coord(vid.xres), "\" height=\"", coord(vid.yres), "\" ", stylestr((backcolor << 8) | 0xFF, 0, 0));
|
||||
what();
|
||||
println(f, "</svg>");
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user