mirror of
https://projects.vdr-developer.org/git/vdr-plugin-skindesigner.git
synced 2023-10-19 17:58:31 +02:00
Merge branch 'pbiering/fix-rsvg'
This commit is contained in:
commit
894b5865cd
@ -178,14 +178,22 @@ cImageImporterSVG::cImageImporterSVG() {
|
|||||||
|
|
||||||
cImageImporterSVG::~cImageImporterSVG() {
|
cImageImporterSVG::~cImageImporterSVG() {
|
||||||
if (handle) {
|
if (handle) {
|
||||||
rsvg_handle_read_stream_sync(handle, NULL, NULL, NULL);
|
#if LIBRSVG_CHECK_VERSION (2, 46, 0)
|
||||||
|
// rsvg_handle_close is deprecated since version 2.46 and looks like even not required if used with rsvg_handle_new_from_file
|
||||||
|
#else
|
||||||
|
rsvg_handle_close(handle, NULL);
|
||||||
|
#endif
|
||||||
g_object_unref(handle);
|
g_object_unref(handle);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool cImageImporterSVG::LoadImage(const char *path) {
|
bool cImageImporterSVG::LoadImage(const char *path) {
|
||||||
if (handle) {
|
if (handle) {
|
||||||
rsvg_handle_read_stream_sync(handle, NULL, NULL, NULL);
|
#if LIBRSVG_CHECK_VERSION (2, 46, 0)
|
||||||
|
// rsvg_handle_close is deprecated since version 2.46 and looks like even not required if used with rsvg_handle_new_from_file
|
||||||
|
#else
|
||||||
|
rsvg_handle_close(handle, NULL);
|
||||||
|
#endif
|
||||||
g_object_unref(handle);
|
g_object_unref(handle);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -521,3 +529,5 @@ void cSVGTemplate::ReplaceTokens(string &line, size_t tokenStart, size_t tokenEn
|
|||||||
std::replace( svgAlpha.begin(), svgAlpha.end(), ',', '.');
|
std::replace( svgAlpha.begin(), svgAlpha.end(), ',', '.');
|
||||||
line.replace(hitAlpha, hitAlphaEnd - hitAlpha + 2, svgAlpha);
|
line.replace(hitAlpha, hitAlphaEnd - hitAlpha + 2, svgAlpha);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// vim: ts=4 sw=4 et
|
||||||
|
Loading…
Reference in New Issue
Block a user