Hello community,

here is the log from the commit of package wxsvg for openSUSE:Factory checked 
in at 2019-02-27 17:28:13
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/wxsvg (Old)
 and      /work/SRC/openSUSE:Factory/.wxsvg.new.28833 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "wxsvg"

Wed Feb 27 17:28:13 2019 rev:4 rq:674970 version:1.5.16

Changes:
--------
--- /work/SRC/openSUSE:Factory/wxsvg/wxsvg.changes      2018-08-04 
21:54:30.425401397 +0200
+++ /work/SRC/openSUSE:Factory/.wxsvg.new.28833/wxsvg.changes   2019-02-27 
17:28:13.683340593 +0100
@@ -1,0 +2,14 @@
+Thu Feb 14 12:49:45 UTC 2019 - Luigi Baldoni <[email protected]>
+
+- Update to version 1.5.16
+  * wxFfmpegMediaDecoder.SetPosition(): added parameter
+    seekBackward
+  version 1.5.15
+  * added skia backend (experimental) (thanks to Zicheng Yang) 
+
+-------------------------------------------------------------------
+Tue Feb 12 18:15:57 UTC 2019 - [email protected]
+
+- No longer force ffmpeg-3 libs during build.
+
+-------------------------------------------------------------------

Old:
----
  wxsvg-1.5.14.tar.bz2

New:
----
  wxsvg-1.5.16.tar.bz2

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ wxsvg.spec ++++++
--- /var/tmp/diff_new_pack.xWLGc5/_old  2019-02-27 17:28:14.079340452 +0100
+++ /var/tmp/diff_new_pack.xWLGc5/_new  2019-02-27 17:28:14.083340450 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package wxsvg
 #
-# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
 # Copyright (c) 2012-2015 Mariusz Fik <[email protected]>
 # Copyright (c) 2012 Stefan Seyfried <[email protected]>
 #
@@ -14,18 +14,18 @@
 # license that conforms to the Open Source Definition (Version 1.9)
 # published by the Open Source Initiative.
 
-# Please submit bugfixes or comments via http://bugs.opensuse.org/
+# Please submit bugfixes or comments via https://bugs.opensuse.org/
 #
 
 
 %define         sover      3
 Name:           wxsvg
-Version:        1.5.14
+Version:        1.5.16
 Release:        0
 Summary:        Library to create, manipulate and render SVG files
 License:        GPL-2.0-or-later
 Group:          Development/Libraries/C and C++
-Url:            https://wxsvg.sourceforge.net/
+URL:            https://wxsvg.sourceforge.net/
 Source:         
https://prdownloads.sourceforge.net/wxsvg/%{name}-%{version}.tar.bz2
 BuildRequires:  gcc-c++
 BuildRequires:  pkgconfig
@@ -33,11 +33,11 @@
 BuildRequires:  pkgconfig(libart-2.0)
 # WARNING: needs to build with the same ffmpeg libraries as DVDStyler.
 BuildRequires:  wxWidgets-3_0-devel
-BuildRequires:  pkgconfig(libavcodec) = 57.107.100
-BuildRequires:  pkgconfig(libavformat) = 57.83.100
-BuildRequires:  pkgconfig(libavutil) = 55.78.100
+BuildRequires:  pkgconfig(libavcodec)
+BuildRequires:  pkgconfig(libavformat)
+BuildRequires:  pkgconfig(libavutil)
 BuildRequires:  pkgconfig(libexif)
-BuildRequires:  pkgconfig(libswscale) = 4.8.100
+BuildRequires:  pkgconfig(libswscale)
 
 %description
 WxSVG is a C++ library to create, manipulate and render SVG files.

++++++ wxsvg-1.5.14.tar.bz2 -> wxsvg-1.5.16.tar.bz2 ++++++
++++ 2150 lines of diff (skipped)
++++    retrying with extended exclude list
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/wxsvg-1.5.14/ChangeLog new/wxsvg-1.5.16/ChangeLog
--- old/wxsvg-1.5.14/ChangeLog  2018-07-11 12:29:56.000000000 +0200
+++ new/wxsvg-1.5.16/ChangeLog  2019-01-27 20:26:55.000000000 +0100
@@ -1,3 +1,13 @@
+Version 1.5.16 <2019-01-27>
+---------------------------
+
+  * wxFfmpegMediaDecoder.SetPosition(): added parameter seekBackward
+
+Version 1.5.15 <2018-09-15>
+---------------------------
+
+  * added skia backend (experimental) (thanks to Zicheng Yang)
+
 Version 1.5.14 <2018-07-10>
 ---------------------------
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/wxsvg-1.5.14/configure.ac new/wxsvg-1.5.16/configure.ac
--- old/wxsvg-1.5.14/configure.ac       2018-07-11 12:29:56.000000000 +0200
+++ new/wxsvg-1.5.16/configure.ac       2019-01-27 20:26:55.000000000 +0100
@@ -1,8 +1,8 @@
 # Process this file with autoconf to produce a configure script.
 
 # initialization
-AC_PREREQ(2.57)
-AC_INIT([wxsvg], [1.5.14], [http://wxsvg.sourceforge.net/])
+AC_PREREQ(2.59)
+AC_INIT([wxsvg], [1.5.16], [http://wxsvg.sourceforge.net/])
 AC_CONFIG_MACRO_DIR([m4])
 AM_INIT_AUTOMAKE(foreign)
 AM_MAINTAINER_MODE
@@ -15,7 +15,7 @@
 # 4. If any interfaces have been added since the last public release, then 
increment age.
 # 5. If any interfaces have been removed since the last public release then 
set age to 0.
 
-LIBRARY_VERSION=13:6:10 # current:revision:age -> libwxsvg.so.(C-A).(A).(R)
+LIBRARY_VERSION=15:0:12 # current:revision:age -> libwxsvg.so.(C-A).(A).(R)
 AC_SUBST(LIBRARY_VERSION)
 
 # options
@@ -26,6 +26,9 @@
 AC_ARG_ENABLE(libav,
  [  --enable-libav         Enable libav decoder support (default: enabled)],
  [enable_libav=$enableval],[enable_libav=yes])
+AC_ARG_ENABLE(render,
+ [  --enable-render[=render]          Specify the render: cairo (default) or 
skia],
+ [USE_RENDER=$enableval], [USE_RENDER=cairo])
 AC_ARG_WITH(datarootdir,
  [  --with-datarootdir=DIR  Use DIR as the data root [[PREFIX/share]]],
  [datarootdir="\${prefix}/$with_datarootdir"], [datarootdir='$(prefix)/share'])
@@ -67,28 +70,50 @@
   ;;
 esac
 
-# check for cairo
-PKG_CHECK_MODULES(CAIRO, cairo)
-CXXFLAGS="$CXXFLAGS $CAIRO_CFLAGS -DUSE_RENDER_CAIRO"
-LIBS="$LIBS $CAIRO_LIBS"
-case $host_os in
-       *darwin*)
-               font_engine=
-               ;;
+dnl render
+AM_CONDITIONAL(USE_RENDER_SKIA, [test "$USE_RENDER" = "skia"])
+AM_CONDITIONAL(USE_RENDER_CAIRO, [test "$USE_RENDER" = "cairo"])
+case "$USE_RENDER" in
+cairo)
+       # check for cairo
+       PKG_CHECK_MODULES(CAIRO, cairo)
+       CXXFLAGS="$CXXFLAGS $CAIRO_CFLAGS -DUSE_RENDER_CAIRO"
+       LIBS="$LIBS $CAIRO_LIBS"
+       case $host_os in
+               *darwin*)
+                       font_engine=
+                       ;;
+               *)
+                       font_engine=pango
+                       ;;
+       esac
+       
+       # Font_engine
+       case "$font_engine" in
+       pango)
+         PKG_CHECK_MODULES(PANGO, pangocairo)
+         CXXFLAGS="$CXXFLAGS $PANGO_CFLAGS"
+         LIBS="$LIBS $PANGO_LIBS"
+         ;;
        *)
-               font_engine=pango
-               ;;
-esac
-
-# Font_engine
-case "$font_engine" in
-pango)
-  PKG_CHECK_MODULES(PANGO, pangocairo)
-  CXXFLAGS="$CXXFLAGS $PANGO_CFLAGS"
-  LIBS="$LIBS $PANGO_LIBS"
-  ;;
+         ;;
+       esac
+       ;;
+skia)
+       # check skia
+       AC_ARG_WITH([skia-dir],
+               AS_HELP_STRING([--with-skia-dir=PATH], [Set path to the SKIA 
directory]),
+               [CXXFLAGS+=" -I${withval}/include/ -I${withval}/include/config/ 
-I${withval}/include/core/ -I${withval}/include/effects/ 
-I${withval}/include/private -I${withval}/src/core"
+               LIBS+=" -L${withval}/out/Static"],
+               [AC_MSG_ERROR(Missing --with-skia-dir that specifies path to 
the SKIA directory.)]
+       )
+       AC_CHECK_LIB([skia], [main], [], [AC_MSG_ERROR([Could not find skia 
library])])
+       AC_CHECK_HEADER([SkUserConfig.h], [], [AC_MSG_ERROR([Could not find 
skia header files])])
+       AC_CHECK_HEADER([SkCanvas.h], [], [AC_MSG_ERROR([Could not find skia 
header files])])
+       ;;
 *)
-  ;;
+       AC_MSG_ERROR([*** Unknown render "$USE_RENDER"])
+       ;;
 esac
 
 # check wxWidgets >= 2.6.3
@@ -139,6 +164,7 @@
   src/svgxml/Makefile
   src/Makefile
   src/cairo/Makefile
+  src/skia/Makefile
   svgview/Makefile
 ])
 AC_OUTPUT
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/wxsvg-1.5.14/include/wxSVG/mediadec_ffmpeg.h 
new/wxsvg-1.5.16/include/wxSVG/mediadec_ffmpeg.h
--- old/wxsvg-1.5.14/include/wxSVG/mediadec_ffmpeg.h    2018-07-11 
12:29:56.000000000 +0200
+++ new/wxsvg-1.5.16/include/wxSVG/mediadec_ffmpeg.h    2019-01-27 
20:26:55.000000000 +0100
@@ -49,7 +49,7 @@
        int GetBitrate(unsigned int streamIndex);
        
        double GetDuration();
-       bool SetPosition(double pos, bool keyFrame = true);
+       bool SetPosition(double pos, bool keyFrame = true, bool seekBackward = 
true);
        double GetPosition();
        
        virtual wxSize GetVideoSize();
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/wxsvg-1.5.14/src/Makefile.am new/wxsvg-1.5.16/src/Makefile.am
--- old/wxsvg-1.5.14/src/Makefile.am    2018-07-11 12:29:56.000000000 +0200
+++ new/wxsvg-1.5.16/src/Makefile.am    2019-01-27 20:26:55.000000000 +0100
@@ -1,4 +1,13 @@
-SUBDIRS = svgxml cairo
+
+if USE_RENDER_SKIA
+RENDER_DIR = skia
+RENDER_LIB = skia/libwxsvg_skia.la $(SKIA_LIBS)
+else
+RENDER_DIR = cairo
+RENDER_LIB = cairo/libwxsvg_cairo.la $(CAIRO_LIBS)
+endif
+
+SUBDIRS = svgxml $(RENDER_DIR)
 
 if USE_LIBAV
 LIBAV_SRC = mediadec_ffmpeg.cpp
@@ -23,7 +32,7 @@
   CSSValue.cpp CSSStyleDeclaration.cpp\
   SVGCanvas.cpp SVGCanvasItem.cpp NodeList.cpp $(LIBAV_SRC)
 
-libwxsvg_la_LIBADD = svgxml/libwxsvgxml.la cairo/libwxsvg_cairo.la 
$(CAIRO_LIBS)
+libwxsvg_la_LIBADD = svgxml/libwxsvgxml.la $(RENDER_LIB)
 libwxsvg_la_LDFLAGS = -no-undefined -version-info @LIBRARY_VERSION@
 
 AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_srcdir)/include/wxSVG
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/wxsvg-1.5.14/src/SVGCanvas.cpp new/wxsvg-1.5.16/src/SVGCanvas.cpp
--- old/wxsvg-1.5.14/src/SVGCanvas.cpp  2018-07-11 12:29:56.000000000 +0200
+++ new/wxsvg-1.5.16/src/SVGCanvas.cpp  2019-01-27 20:26:55.000000000 +0100
@@ -182,9 +182,12 @@
        stop_elem = (wxSVGStopElement*) gradElem->GetChildren();
        int i = 0;
        while (stop_elem) {
-               if (stop_elem->GetDtd() == wxSVG_STOP_ELEMENT)
-                       SetStopValue(i++, stop_elem->GetOffset(), 
stop_elem->GetStopOpacity() * opacity,
-                                       
stop_elem->GetStopColor().GetRGBColor());
+               if (stop_elem->GetDtd() == wxSVG_STOP_ELEMENT) {
+                       wxSVGColor color = stop_elem->GetStopColor();
+                       if (color.GetColorType() == wxSVG_COLORTYPE_UNKNOWN)
+                               color = wxSVGColor(0, 0, 0);
+                       SetStopValue(i++, stop_elem->GetOffset(), 
stop_elem->GetStopOpacity() * opacity, color.GetRGBColor());
+               }
                stop_elem = (wxSVGStopElement*) stop_elem->GetNext();
        }
        return stop_count;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/wxsvg-1.5.14/src/SVGDocument.cpp new/wxsvg-1.5.16/src/SVGDocument.cpp
--- old/wxsvg-1.5.14/src/SVGDocument.cpp        2018-07-11 12:29:56.000000000 
+0200
+++ new/wxsvg-1.5.16/src/SVGDocument.cpp        2019-01-27 20:26:55.000000000 
+0100
@@ -10,15 +10,12 @@
 
 #include "SVGDocument.h"
 
-#ifdef USE_RENDER_AGG
-#include "agg/SVGCanvasAgg.h"
-#define WX_SVG_CANVAS wxSVGCanvasAgg
-#elif defined USE_RENDER_CAIRO
+#ifdef HAVE_LIBSKIA
+#include "skia/SVGCanvasSkia.h"
+#define WX_SVG_CANVAS wxSVGCanvasSkia
+#else //USE_RENDER_CAIRO
 #include "cairo/SVGCanvasCairo.h"
 #define WX_SVG_CANVAS wxSVGCanvasCairo
-#else //USE_RENDER_LIBART
-#include "libart/SVGCanvasLibart.h"
-#define WX_SVG_CANVAS wxSVGCanvasLibart
 #endif
 
 #include <wx/log.h>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/wxsvg-1.5.14/src/SVGTransformable.cpp 
new/wxsvg-1.5.16/src/SVGTransformable.cpp
--- old/wxsvg-1.5.14/src/SVGTransformable.cpp   2018-07-11 12:29:56.000000000 
+0200
+++ new/wxsvg-1.5.16/src/SVGTransformable.cpp   2019-01-27 20:26:55.000000000 
+0100
@@ -74,6 +74,7 @@
        GET_TRANSFORMABLE(wxSVG_A_ELEMENT, wxSVGAElement)
     GET_TRANSFORMABLE(wxSVG_G_ELEMENT, wxSVGGElement)
     GET_TRANSFORMABLE(wxSVG_USE_ELEMENT, wxSVGUseElement)
+       GET_TRANSFORMABLE(wxSVG_IMAGE_ELEMENT, wxSVGImageElement)
     default:
       break;
   }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/wxsvg-1.5.14/src/mediadec_ffmpeg.cpp 
new/wxsvg-1.5.16/src/mediadec_ffmpeg.cpp
--- old/wxsvg-1.5.14/src/mediadec_ffmpeg.cpp    2018-07-11 12:29:56.000000000 
+0200
+++ new/wxsvg-1.5.16/src/mediadec_ffmpeg.cpp    2019-01-27 20:26:55.000000000 
+0100
@@ -46,7 +46,7 @@
 }
 
 void wxFfmpegMediaDecoder::Init() {
-    av_register_all();
+    // nothing to do
 }
 
 void PrintError(const wxString& msg, int err) {
@@ -110,7 +110,7 @@
        if (st == NULL)
                return -1;
        float frame_aspect_ratio = 1;
-       AVCodecContext *enc = st->codec;
+       AVCodecParameters *enc = st->codecpar;
        if (st->sample_aspect_ratio.num)
                frame_aspect_ratio = av_q2d(st->sample_aspect_ratio);
        else if (enc->sample_aspect_ratio.num)
@@ -136,7 +136,7 @@
 StreamType wxFfmpegMediaDecoder::GetStreamType(unsigned int streamIndex) {
        if (m_formatCtx == NULL || streamIndex >= m_formatCtx->nb_streams)
                return stUNKNOWN;
-       switch (m_formatCtx->streams[streamIndex]->codec->codec_type) {
+       switch (m_formatCtx->streams[streamIndex]->codecpar->codec_type) {
        case AVMEDIA_TYPE_VIDEO:
                return stVIDEO;
        case AVMEDIA_TYPE_AUDIO:
@@ -150,22 +150,23 @@
 }
 
 wxString wxFfmpegMediaDecoder::GetCodecName(unsigned int streamIndex) {
-       char buf[256];
-       avcodec_string(buf, sizeof(buf), 
m_formatCtx->streams[streamIndex]->codec, false);
-       wxString name = wxString(buf, wxConvLocal).BeforeFirst(wxT(','));
-       return name.Index(wxT(':')) > 0 ? name.AfterFirst(wxT(':')).Trim(false) 
: name;
+       AVCodec *codec = 
avcodec_find_decoder(m_formatCtx->streams[streamIndex]->codecpar->codec_id);
+       if (codec) {
+               return wxString(codec->name, wxConvLocal);
+       }
+       return wxT("unknown_codec"); 
 }
 
 int wxFfmpegMediaDecoder::GetChannelNumber(unsigned int streamIndex) {
-       return m_formatCtx ? m_formatCtx->streams[streamIndex]->codec->channels 
: -1;
+       return m_formatCtx ? 
m_formatCtx->streams[streamIndex]->codecpar->channels : -1;
 }
 
 int wxFfmpegMediaDecoder::GetSampleRate(unsigned int streamIndex) {
-       return m_formatCtx ? 
m_formatCtx->streams[streamIndex]->codec->sample_rate : -1;
+       return m_formatCtx ? 
m_formatCtx->streams[streamIndex]->codecpar->sample_rate : -1;
 }
 
 int wxFfmpegMediaDecoder::GetBitrate(unsigned int streamIndex) {
-       return m_formatCtx ? m_formatCtx->streams[streamIndex]->codec->bit_rate 
: -1;
+       return m_formatCtx ? 
m_formatCtx->streams[streamIndex]->codecpar->bit_rate : -1;
 }
 
 double wxFfmpegMediaDecoder::GetDuration() {
@@ -177,21 +178,24 @@
        if (m_codecCtx)
                return true;
        // find the first video stream
-       
        m_videoStream = -1;
-       for (int i=0; i<(int)m_formatCtx->nb_streams; i++) {
-               if (m_formatCtx->streams[i]->codec->codec_type == 
AVMEDIA_TYPE_VIDEO) {
+       for (int i = 0; i < (int) m_formatCtx->nb_streams; i++) {
+               if (m_formatCtx->streams[i]->codecpar->codec_type == 
AVMEDIA_TYPE_VIDEO) {
                        m_videoStream = i;
                        break;
                }
        }
-       if(m_videoStream == -1)
+       if (m_videoStream == -1)
                return false;
-       // get a pointer to the codec context for the video stream 
-       m_codecCtx = m_formatCtx->streams[m_videoStream]->codec;
+       
        // find and open the decoder for the video stream 
-       AVCodec* codec = avcodec_find_decoder(m_codecCtx->codec_id);
-       if (!codec || avcodec_open2(m_codecCtx, codec, NULL) < 0) {
+       AVStream* stream = m_formatCtx->streams[m_videoStream];
+       AVCodec* codec = avcodec_find_decoder(stream->codecpar->codec_id);
+       if (!codec)
+               return false;
+       m_codecCtx = avcodec_alloc_context3(codec);
+       if (avcodec_parameters_to_context(m_codecCtx, stream->codecpar) < 0
+                       || avcodec_open2(m_codecCtx, codec, NULL) < 0) {
                m_codecCtx = NULL;
                return false;
        }
@@ -227,7 +231,7 @@
     return true;
 }
 
-bool wxFfmpegMediaDecoder::SetPosition(double pos, bool keyFrame) {
+bool wxFfmpegMediaDecoder::SetPosition(double pos, bool keyFrame, bool 
seekBackward) {
     if (m_formatCtx == NULL)
         return false;
        if (!m_frame && !BeginDecode())
@@ -236,8 +240,10 @@
     if (m_formatCtx->start_time != (int64_t)AV_NOPTS_VALUE)
         timestamp += m_formatCtx->start_time;
     avcodec_flush_buffers(m_codecCtx);
-    bool res = av_seek_frame(m_formatCtx, -1, timestamp,
-               keyFrame ? AVSEEK_FLAG_BACKWARD : 
AVSEEK_FLAG_ANY|AVSEEK_FLAG_BACKWARD) >= 0;
+    int flags = seekBackward ? AVSEEK_FLAG_BACKWARD : 0;
+    if (!keyFrame)
+       flags = flags|AVSEEK_FLAG_ANY;
+    bool res = av_seek_frame(m_formatCtx, -1, timestamp, flags) >= 0;
     avcodec_flush_buffers(m_codecCtx);
     return res;
 }
@@ -255,6 +261,27 @@
        return ((double)timestamp)/AV_TIME_BASE;
 }
 
+int decode(AVCodecContext *avctx, AVFrame *frame, int *got_frame, AVPacket 
*pkt) {
+       int ret;
+       *got_frame = 0;
+
+       if (pkt) {
+               ret = avcodec_send_packet(avctx, pkt);
+               // In particular, we don't expect AVERROR(EAGAIN), because we 
read all
+               // decoded frames with avcodec_receive_frame() until done.
+               if (ret < 0)
+                       return ret == AVERROR_EOF ? 0 : ret;
+       }
+
+       ret = avcodec_receive_frame(avctx, frame);
+       if (ret < 0 && ret != AVERROR(EAGAIN) && ret != AVERROR_EOF)
+               return ret;
+       if (ret >= 0)
+               *got_frame = 1;
+
+       return 0;
+}
+
 wxImage wxFfmpegMediaDecoder::GetNextFrame() {
        if (!m_frame && !BeginDecode())
                return wxImage();
@@ -265,7 +292,7 @@
                // is this a packet from the video stream?
                if (packet.stream_index == m_videoStream) {
                        // decode video frame
-                       avcodec_decode_video2(m_codecCtx, m_frame, 
&frameFinished, &packet);
+                       decode(m_codecCtx, m_frame, &frameFinished, &packet);
                        if (frameFinished) {
                                SwsContext* imgConvertCtx = 
sws_getContext(m_codecCtx->width, m_codecCtx->height, m_codecCtx->pix_fmt,
                                                m_width, m_height, 
AV_PIX_FMT_RGB24, SWS_BICUBIC, NULL, NULL, NULL);
@@ -309,11 +336,10 @@
        if (m_formatCtx == NULL)
                return wxT("");
        AVStream *st = m_formatCtx->streams[streamIndex];
-       if (st->codec == NULL || st->codec->codec_tag == 0)
+       if (st->codecpar == NULL || st->codecpar->codec_tag == 0)
                return wxT("");
        char buf[32];
-       if (av_get_codec_tag_string(buf, sizeof(buf), st->codec->codec_tag) <= 
0)
-               return wxT("");
+       av_fourcc_make_string(buf, st->codecpar->codec_tag);
        return wxString(buf, wxConvLocal);
 }
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/wxsvg-1.5.14/src/skia/Gradient.cpp new/wxsvg-1.5.16/src/skia/Gradient.cpp
--- old/wxsvg-1.5.14/src/skia/Gradient.cpp      1970-01-01 01:00:00.000000000 
+0100
+++ new/wxsvg-1.5.16/src/skia/Gradient.cpp      2019-01-27 20:26:55.000000000 
+0100
@@ -0,0 +1,174 @@
+#include "Gradient.h"
+
+#include "SkGradientShader.h"
+#include "SkShader.h"
+#include "SkAutoMalloc.h"
+#include <algorithm>
+
+Gradient::Gradient(float x1, float y1, float x2, float y2) :
+    m_radial(false),
+    m_x1(x1),
+    m_y1(y1),
+    m_x2(x2),
+    m_y2(y2),
+    m_r1(0),
+    m_r2(0),
+    m_bStopsSorted(false)
+{
+    m_fMatrix.reset();
+}
+
+Gradient::Gradient(float x1, float y1, float r1, float x2, float y2, float r2) 
:
+    m_radial(true),
+    m_x1(x1),
+    m_y1(y1),
+    m_x2(x2),
+    m_y2(y2),
+    m_r1(r1),
+    m_r2(r2),
+    m_bStopsSorted(false)
+{
+    m_fMatrix.reset();
+}
+
+Gradient::Gradient(float x1, float y1, float r1, float x2, float y2, float r2, 
const float fMatrix[6]) :
+    m_radial(true),
+    m_x1(x1),
+    m_y1(y1),
+    m_x2(x2),
+    m_y2(y2),
+    m_r1(r1),
+    m_r2(r2),
+    m_bStopsSorted(false)
+{
+    m_fMatrix.setAll(fMatrix[0], fMatrix[2], fMatrix[4], fMatrix[1], 
fMatrix[3], fMatrix[5], 0, 0, 1);
+}
+
+Gradient::~Gradient()
+{
+}
+
+Gradient* Gradient::Create(float x1, float y1, float x2, float y2)
+{
+    return new Gradient(x1, y1, x2, y2);
+}
+
+Gradient* Gradient::Create(float x1, float y1, float r1, float x2, float y2, 
float r2, const float fMatrix[6])
+{
+    return new Gradient(x1, y1, r1, x2, y2, r2, fMatrix);
+}
+
+sk_sp<SkShader> Gradient::GetShader()
+{
+    if (m_spShader)
+        return nullptr;
+
+    SortStops();
+    size_t count = m_stops.size();
+    std::vector<ColorStop>::iterator iterStop = m_stops.begin();
+    std::vector<ColorStop>::reverse_iterator riterStop = m_stops.rbegin();
+    switch (count)
+    {
+    case 0:
+        count = 2;
+        break;
+    default:
+        if (iterStop->offset > 0.0)
+            count++;
+        if (riterStop->offset < 1.0)
+            count++;
+        break;
+    }
+
+    SkAutoMalloc data((sizeof(SkColor) + sizeof(SkScalar)) * count);
+    SkColor* colors = (SkColor*)data.get();
+    SkScalar* pos = (SkScalar*)(colors + count);
+
+    size_t start = 0;
+    size_t n = m_stops.size();
+    if (n == 0)
+    {
+        pos[0] = SkFloatToScalar(0.0);
+        colors[0] = SkColorSetARGB(0, 0, 0, 0);
+        start = 1;
+    }
+    else if (iterStop->offset > 0.0)
+    {
+        pos[0] = SkFloatToScalar(0.0);
+        colors[0] = iterStop->color;
+        start = 1;
+    }
+
+    for (size_t i = start; i < start + n; i++)
+    {
+        pos[i] = SkFloatToScalar(iterStop->offset);
+        colors[i] = iterStop->color;
+        ++iterStop;
+    }
+
+    if (n == 0 || riterStop->offset < 1.0)
+    {
+        pos[count - 1] = SkFloatToScalar(1.0);
+        colors[count - 1] = colors[count - 2];
+    }
+    
+    SkShader::TileMode mode = SkShader::kClamp_TileMode;
+
+    SkPoint p1, p2;
+
+    p1.set(SkFloatToScalar(m_x1), SkFloatToScalar(m_y1));
+    p2.set(SkFloatToScalar(m_x2), SkFloatToScalar(m_y2));
+
+    if (m_radial)
+    {
+        /*if (m_x1 == m_x2 && m_y1 == m_y2 && m_r1 <= 0.0f)
+        {
+            SkScalar r1 = m_r2 >= 0.0f ? SkFloatToScalar(m_r2) : 0;
+            m_spShader = SkGradientShader::MakeRadial(p1, r1, colors, pos, 
static_cast<int>(count), mode, NULL, &m_fMatrix);
+        }
+        else*/
+        {
+            SkScalar r1 = m_r1 >= 0.0f ? SkFloatToScalar(m_r1) : 0;
+            SkScalar r2 = m_r2 >= 0.0f ? SkFloatToScalar(m_r2) : 0;
+            if (r1 != r2)
+            {
+                m_spShader = SkGradientShader::MakeTwoPointConical(p1, r1, p2, 
r2, colors, pos, static_cast<int>(count), mode, NULL, &m_fMatrix);
+                /*paint.setShader(SkGradientShader::MakeTwoPointConical(
+                    SkPoint::Make(100, 100), 0, SkPoint::Make(100, 100), 100, 
colors, nullptr, 2,
+                    SkShader::kClamp_TileMode, 0, &matrix));*/
+            }
+        }
+    }
+    else
+    {
+        SkPoint pts[2] = {p1, p2};
+        m_spShader = SkGradientShader::MakeLinear(pts, colors, pos, 
static_cast<int>(count), mode, 0, nullptr);
+    }
+
+    return m_spShader;
+}
+
+void Gradient::AddColorStop(float offset, const SkColor& color)
+{
+    if (offset >= 0.0 && offset <= 1.0)
+    {
+        m_stops.push_back(ColorStop(offset, color));
+        m_bStopsSorted = false;
+        //SkSafeUnref(m_pShader);
+        //m_pShader = nullptr;
+    }
+}
+
+static inline bool compareStops(const Gradient::ColorStop& a, const 
Gradient::ColorStop& b)
+{
+    return a.offset < b.offset;
+}
+
+void Gradient::SortStops()
+{
+    if (m_bStopsSorted)
+        return;
+    if (!m_stops.size())
+        return;
+    stable_sort(m_stops.begin(), m_stops.end(), compareStops);
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/wxsvg-1.5.14/src/skia/Gradient.h new/wxsvg-1.5.16/src/skia/Gradient.h
--- old/wxsvg-1.5.14/src/skia/Gradient.h        1970-01-01 01:00:00.000000000 
+0100
+++ new/wxsvg-1.5.16/src/skia/Gradient.h        2019-01-27 20:26:55.000000000 
+0100
@@ -0,0 +1,50 @@
+#ifndef __GRADIENT_H__
+#define __GRADIENT_H__
+
+
+#include <vector>
+#include "SkMatrix.h"
+#include "SkColor.h"
+#include "SkRefCnt.h"
+class SkShader;
+class Gradient
+{
+public:
+    struct ColorStop
+    {
+        float offset;
+        SkColor color;
+
+        //ColorStop() : offset(0), alpha(0), red(0), green(0), blue(0) {}
+        ColorStop(float o, SkColor col) : offset(o), color(col){}
+    };
+public:
+    Gradient();
+    Gradient(float x1, float y1, float x2, float y2);
+    Gradient(float x1, float y1, float r1, float x2, float y2, float r2);
+    Gradient(float x1, float y1, float r1, float x2, float y2, float r2, const 
float fMatrix[6]);
+    virtual ~Gradient();
+public:
+    static Gradient* Create(float x1, float y1, float x2, float y2);
+    static Gradient* Create(float x1, float y1, float r1, float x2, float y2, 
float r2, const float fMatrix[6]);
+public:
+    sk_sp<SkShader> GetShader();
+public:
+    void AddColorStop(float offset, const SkColor& color);
+protected:
+    void SortStops();
+protected:
+    bool m_radial;
+    float m_x1;
+    float m_y1;
+    float m_x2;
+    float m_y2;
+    float m_r1;
+    float m_r2;
+    SkMatrix m_fMatrix;
+    std::vector<ColorStop> m_stops;
+    bool m_bStopsSorted;
+    sk_sp<SkShader>   m_spShader;
+};
+
+#endif
\ No newline at end of file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/wxsvg-1.5.14/src/skia/Makefile.am new/wxsvg-1.5.16/src/skia/Makefile.am
--- old/wxsvg-1.5.14/src/skia/Makefile.am       1970-01-01 01:00:00.000000000 
+0100
+++ new/wxsvg-1.5.16/src/skia/Makefile.am       2019-01-27 20:26:55.000000000 
+0100
@@ -0,0 +1,5 @@
+noinst_LTLIBRARIES = libwxsvg_skia.la
+libwxsvg_skia_la_SOURCES = SVGCanvasSkia.cpp SVGCanvasPathSkia.cpp Gradient.cpp
+libwxsvg_skia_la_LIBADD = $(CAIRO_LIBS)
+
+AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_srcdir)/include/wxSVG 
$(SKIA_CFLAGS)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/wxsvg-1.5.14/src/skia/SVGCanvasPathSkia.cpp 
new/wxsvg-1.5.16/src/skia/SVGCanvasPathSkia.cpp
--- old/wxsvg-1.5.14/src/skia/SVGCanvasPathSkia.cpp     1970-01-01 
01:00:00.000000000 +0100
+++ new/wxsvg-1.5.16/src/skia/SVGCanvasPathSkia.cpp     2019-01-27 
20:26:55.000000000 +0100
@@ -0,0 +1,56 @@
+#include "iostream"
+#include "SVGCanvasPathSkia.h"
+
+wxSVGCanvasPathSkia::wxSVGCanvasPathSkia()
+{
+    
+}
+
+
+wxSVGCanvasPathSkia::~wxSVGCanvasPathSkia()
+{
+    
+}
+
+SkPath& wxSVGCanvasPathSkia::GetPath()
+{
+    return m_path;
+}
+
+wxSVGRect wxSVGCanvasPathSkia::GetBBox(const wxSVGMatrix * matrix)
+{
+    if (!m_path.isEmpty())
+    {
+        SkRect rc = m_path.getBounds();
+        return wxSVGRect(rc.fLeft, rc.fTop, rc.width(), rc.height());
+    }
+    else
+    {
+        return wxSVGRect(0, 0, 0, 0);
+    }
+}
+
+void wxSVGCanvasPathSkia::MoveToImpl(double x, double y)
+{
+    m_path.moveTo(x, y);
+}
+
+void wxSVGCanvasPathSkia::LineToImpl(double x, double y)
+{
+    m_path.lineTo(x, y);
+}
+
+void wxSVGCanvasPathSkia::CurveToCubicImpl(double x1, double y1, double x2, 
double y2, double x, double y)
+{
+    m_path.cubicTo(x1, y1, x2, y2, x, y);
+}
+
+bool wxSVGCanvasPathSkia::ClosePathImpl()
+{
+    m_path.close();
+    return false;
+}
+
+void wxSVGCanvasPathSkia::End()
+{
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/wxsvg-1.5.14/src/skia/SVGCanvasPathSkia.h 
new/wxsvg-1.5.16/src/skia/SVGCanvasPathSkia.h
--- old/wxsvg-1.5.14/src/skia/SVGCanvasPathSkia.h       1970-01-01 
01:00:00.000000000 +0100
+++ new/wxsvg-1.5.16/src/skia/SVGCanvasPathSkia.h       2019-01-27 
20:26:55.000000000 +0100
@@ -0,0 +1,27 @@
+#pragma once
+#include "SVGCanvasItem.h"
+#include "SkPath.h"
+class wxSVGCanvasPathSkia:public wxSVGCanvasPath
+{
+public:
+    wxSVGCanvasPathSkia();
+    ~wxSVGCanvasPathSkia();
+
+public:
+    SkPath& GetPath();
+    wxSVGRect GetBBox(const wxSVGMatrix* matrix = NULL);
+//private:
+//    HGPATH CreatePath();
+//    void   DestroyPath();
+
+private:
+    virtual void MoveToImpl(double x, double y);
+    virtual void LineToImpl(double x, double y);
+    virtual void CurveToCubicImpl(double x1, double y1, double x2, double y2, 
double x, double y);
+    virtual bool ClosePathImpl();
+    virtual void End();
+
+private:
+    SkPath m_path;
+};
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/wxsvg-1.5.14/src/skia/SVGCanvasSkia.cpp 
new/wxsvg-1.5.16/src/skia/SVGCanvasSkia.cpp
--- old/wxsvg-1.5.14/src/skia/SVGCanvasSkia.cpp 1970-01-01 01:00:00.000000000 
+0100
+++ new/wxsvg-1.5.16/src/skia/SVGCanvasSkia.cpp 2019-01-27 20:26:55.000000000 
+0100
@@ -0,0 +1,266 @@
+#include <iostream>
+#include "SVGCanvasSkia.h"
+#include "SkBitmap.h"
+#include "SkColor.h"
+#include "SkShader.h"
+wxSVGCanvasSkia::~wxSVGCanvasSkia()
+{
+    DestroyGradient();
+    delete m_pCanvas;
+    m_pCanvas = nullptr;
+    delete m_pBitmap;
+    m_pBitmap = nullptr;
+}
+
+wxSVGCanvasSkia::wxSVGCanvasSkia()
+{
+    m_pGraient = nullptr;
+}
+
+void wxSVGCanvasSkia::Init(int width, int height, bool alpha)
+{
+    m_nWidth = width;
+    m_nHeight = height;
+    m_bAlpha = alpha;
+
+    m_pBitmap = new SkBitmap;
+    m_pBitmap->setInfo(SkImageInfo::Make(width, height, 
kBGRA_8888_SkColorType, kOpaque_SkAlphaType));
+    m_pBitmap->allocPixels();
+    m_pBitmap->eraseColor(0x00000000);
+    m_pCanvas = new SkCanvas(*m_pBitmap);
+}
+
+int wxSVGCanvasSkia::GetWidth()
+{
+    return m_nWidth;
+}
+
+int wxSVGCanvasSkia::GetHeight()
+{
+    return m_nHeight;
+}
+
+wxImage wxSVGCanvasSkia::GetImage()
+{
+    wxImage img;
+    img.Create(m_nWidth, m_nHeight);
+    if (m_bAlpha)
+        img.InitAlpha();
+
+    unsigned char* src = (unsigned char*)m_pBitmap->getPixels();
+    unsigned char* dst = img.GetData();
+    unsigned char* dstAlpha = img.GetAlpha();
+    for (int i = 0; i < m_nWidth * m_nHeight; i++) {
+        dst[0] = src[2];
+        dst[1] = src[1];
+        dst[2] = src[0];
+        if (dstAlpha != NULL) {
+            *dstAlpha = src[3];
+            dstAlpha++;
+        }
+        src += 4;
+        dst += 3;
+    }
+    return img;
+}
+
+void wxSVGCanvasSkia::Clear(wxRGBColor color)
+{
+}
+
+wxSVGCanvasPath * wxSVGCanvasSkia::CreateCanvasPath(wxSVGMatrix * matrix)
+{
+    return new wxSVGCanvasPathSkia();
+}
+
+wxSVGCanvasItem * wxSVGCanvasSkia::CreateItem(wxSVGTextElement * element, 
const wxCSSStyleDeclaration * style, wxSVGMatrix * matrix)
+{
+    return nullptr;
+}
+
+wxSVGCanvasItem * wxSVGCanvasSkia::CreateItem(wxSVGImageElement * element, 
const wxCSSStyleDeclaration * style, wxProgressDialog * progressDlg)
+{
+    return nullptr;
+}
+
+wxSVGCanvasItem * wxSVGCanvasSkia::CreateItem(wxSVGVideoElement * element, 
const wxCSSStyleDeclaration * style, wxProgressDialog * progressDlg)
+{
+    return nullptr;
+}
+
+void wxSVGCanvasSkia::DrawItem(wxSVGCanvasItem & item, wxSVGMatrix & matrix, 
const wxCSSStyleDeclaration & style, wxSVGSVGElement & svgElem)
+{
+    if (wxSVG_CANVAS_ITEM_PATH == item.GetType())
+    {
+        DrawCanvasPath((wxSVGCanvasPathSkia&)item, matrix, style, svgElem);
+    }
+}
+
+void wxSVGCanvasSkia::SetStopValue(unsigned int index, float offset, float 
opacity, const wxRGBColor & rgbColor)
+{
+    if (m_pGraient)
+    {
+        unsigned char nOpacity = opacity * 255;
+        m_pGraient->AddColorStop(offset, SkColorSetARGB(nOpacity, 
rgbColor.Red(), rgbColor.Green(), rgbColor.Blue()));
+    }
+}
+
+void wxSVGCanvasSkia::AllocateGradientStops(unsigned int stop_count)
+{
+}
+
+void wxSVGCanvasSkia::DrawCanvasPath(wxSVGCanvasPathSkia & canvasPath, 
wxSVGMatrix & matrix, const wxCSSStyleDeclaration & style, wxSVGSVGElement & 
svgElem)
+{
+    wxCSS_VALUE_EVENODD;
+    wxCSS_VALUE cssFileType = style.GetFillRule();
+    m_pCanvas->save();
+    if (wxCSS_VALUE_EVENODD == cssFileType)
+    {
+        canvasPath.GetPath().setFillType(SkPath::kEvenOdd_FillType);
+    }
+
+    SkMatrix mx;
+    mx.setAll(matrix.GetA(), matrix.GetC(), matrix.GetE(), matrix.GetB(), 
matrix.GetD(), matrix.GetF(), 0, 0, 1);
+    m_pCanvas->setMatrix(mx);
+
+    // Filling
+    SkPaint paint;
+    paint.setAntiAlias(true);
+    if (canvasPath.GetFill() && style.GetFill().Ok() && 
style.GetFill().GetPaintType() != wxSVG_PAINTTYPE_NONE)
+    {
+        paint.setStyle(SkPaint::kFill_Style);
+        SetPaint(style.GetFill(), paint, 
style.GetOpacity()*style.GetFillOpacity(), canvasPath, svgElem, matrix);
+        m_pCanvas->drawPath(canvasPath.GetPath(), paint);
+    }
+
+    // Stroking
+    if (style.GetStroke().Ok() && style.GetStrokeWidth() > 0)
+    {
+        paint.setStyle(SkPaint::kStroke_Style);
+        paint.setStrokeWidth(style.GetStrokeWidth());
+        SetPaint(style.GetStroke(), paint, 
style.GetOpacity()*style.GetStrokeOpacity(), canvasPath, svgElem, matrix);
+        ApplyStrokeStyle(style);
+        m_pCanvas->drawPath(canvasPath.GetPath(), paint);
+    }
+
+    // marker
+    /*if (style.HasMarkerStart()) {
+        DrawMarker(style.GetMarkerStart().GetStringValue(), wxSVGMark::START, 
canvasPath, matrix, style, svgElem);
+    }
+    if (style.HasMarkerMid()) {
+        DrawMarker(style.GetMarkerMid().GetStringValue(), wxSVGMark::MID, 
canvasPath, matrix, style, svgElem);
+    }
+    if (style.HasMarkerEnd()) {
+        DrawMarker(style.GetMarkerEnd().GetStringValue(), wxSVGMark::END, 
canvasPath, matrix, style, svgElem);
+    }*/
+
+    m_pCanvas->restore();
+}
+
+void wxSVGCanvasSkia::SetPaint(const wxSVGPaint & paint, SkPaint& spaint, 
float opacity, wxSVGCanvasPathSkia& canvasPath,
+    wxSVGSVGElement& svgElem, const wxSVGMatrix& matrix)
+{
+    if (paint.GetPaintType() >= wxSVG_PAINTTYPE_URI_NONE && 
paint.GetPaintType() <= wxSVG_PAINTTYPE_URI)
+    {
+        wxSVGGradientElement* gradElem = GetGradientElement(svgElem, 
paint.GetUri());
+        if (nullptr == gradElem) 
+        {
+            return;
+        }
+
+        DestroyGradient();
+        switch (gradElem->GetDtd())
+        {
+        case wxSVG_LINEARGRADIENT_ELEMENT:
+        {
+            wxSVGPoint p1, p2;
+            GetLinearGradientVector(p1, p2, 
(wxSVGLinearGradientElement&)*gradElem, canvasPath);
+            m_pGraient = Gradient::Create(p1.GetX(), p1.GetY(), p2.GetX(), 
p2.GetY());
+            break;
+        }
+        case wxSVG_RADIALGRADIENT_ELEMENT: 
+        {
+            wxSVGRect bbox = canvasPath.GetBBox();
+            wxSVGRadialGradientElement* radialGradElem = 
(wxSVGRadialGradientElement*)gradElem;
+            bool bPercentage = 
radialGradElem->GetCx().GetBaseVal().GetUnitType() == 
wxSVG_LENGTHTYPE_PERCENTAGE;
+            double r = 0, cx = 0, cy = 0, fx = 0, fy = 0;
+            if (bPercentage && (gradElem->GetGradientUnits().GetAnimVal() == 
wxSVG_UNIT_TYPE_UNKNOWN
+                || gradElem->GetGradientUnits().GetAnimVal() == 
wxSVG_UNIT_TYPE_OBJECTBOUNDINGBOX)) 
+            {
+                wxSVGRect bbox = canvasPath.GetBBox();
+                r = (sqrt(bbox.GetWidth() * bbox.GetWidth() + bbox.GetHeight() 
* bbox.GetHeight()))/ sqrt(2.0f);
+                cx = bbox.GetX() + 
radialGradElem->GetCx().GetAnimVal().GetValueInSpecifiedUnits() / 100.0f 
*bbox.GetWidth();
+                cy = bbox.GetY() + 
radialGradElem->GetCy().GetAnimVal().GetValueInSpecifiedUnits() / 100.0f 
*bbox.GetHeight();
+                fx = bbox.GetX() + 
radialGradElem->GetFx().GetAnimVal().GetValueInSpecifiedUnits() / 100.0f 
*bbox.GetWidth();
+                fy = bbox.GetY() + 
radialGradElem->GetFy().GetAnimVal().GetValueInSpecifiedUnits() / 100.0f 
*bbox.GetHeight();
+            }
+            else
+            {
+                r = radialGradElem->GetQualifiedR();
+                cx = radialGradElem->GetQualifiedCx();
+                cy = radialGradElem->GetQualifiedCy();
+                fx = radialGradElem->GetQualifiedFx();
+                fy = radialGradElem->GetQualifiedFy();
+            }
+
+            wxSVGMatrix lg_matrix/* = matrix*/;
+            const wxSVGTransformList& transforms = 
radialGradElem->GetGradientTransform().GetAnimVal();
+            for (int i = 0; i < (int)transforms.Count(); i++)
+                lg_matrix = lg_matrix.Multiply(transforms[i].GetMatrix());
+
+            float fMatrix[6] = { 0 };
+            fMatrix[0] = lg_matrix.GetA();
+            fMatrix[1] = lg_matrix.GetB();
+            fMatrix[2] = lg_matrix.GetC();
+            fMatrix[3] = lg_matrix.GetD();
+            fMatrix[4] = lg_matrix.GetE();
+            fMatrix[5] = lg_matrix.GetF();
+            m_pGraient = Gradient::Create(fx, fy, 0, cx, cy, r, fMatrix);
+            break;
+        }
+        default:
+            break;
+        }
+
+        int nstopCount = GetGradientStops(svgElem, gradElem, opacity);
+        if (nstopCount)
+        {
+            spaint.setShader(m_pGraient->GetShader());
+        }
+    }
+    else
+    {
+        spaint.setShader(nullptr);
+        wxRGBColor color = paint.GetRGBColor();
+        unsigned char nOpacity = opacity ? opacity * 255 : 255;
+        spaint.setColor(SkColorSetARGB(nOpacity, color.Red(), color.Green(), 
color.Blue()));
+    }
+}
+
+void wxSVGCanvasSkia::DestroyGradient()
+{
+    if (m_pGraient)
+    {
+        delete m_pGraient;
+        m_pGraient = nullptr;
+    }
+}
+
+void wxSVGCanvasSkia::ApplyStrokeStyle(const wxCSSStyleDeclaration& style)
+{
+    /*if (style.GetStrokeDasharray().GetLength() > 0)
+    {
+        float* dashed = new float[style.GetStrokeDasharray().GetLength()];
+        for (int i = 0; i < style.GetStrokeDasharray().GetLength(); i++)
+        {
+            dashed[i] = 
static_cast<float>(style.GetStrokeDasharray().Item(i).GetFloatValue());
+        }
+
+        ::SetDashPattern(m_hCanvas, dashed, 
style.GetStrokeDasharray().GetLength());
+        delete[] dashed;
+    }
+    else
+    {
+        ::SetDashStyle(m_hCanvas, DASH_NONE);
+    }*/
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/wxsvg-1.5.14/src/skia/SVGCanvasSkia.h 
new/wxsvg-1.5.16/src/skia/SVGCanvasSkia.h
--- old/wxsvg-1.5.14/src/skia/SVGCanvasSkia.h   1970-01-01 01:00:00.000000000 
+0100
+++ new/wxsvg-1.5.16/src/skia/SVGCanvasSkia.h   2019-01-27 20:26:55.000000000 
+0100
@@ -0,0 +1,47 @@
+#pragma once
+#include "SVGCanvas.h"
+#include "SVGCanvasPathSkia.h"
+#include "SkCanvas.h"
+#include "Gradient.h"
+class wxSVGCanvasSkia : public wxSVGCanvas {
+public:
+    wxSVGCanvasSkia();
+    virtual ~wxSVGCanvasSkia();
+
+    void Init(int width, int height, bool alpha = false);
+    int GetWidth();
+    int GetHeight();
+    wxImage GetImage();
+    void Clear(wxRGBColor color = wxRGBColor(0xFF, 0xFF, 0xFF));
+
+    wxSVGCanvasPath* CreateCanvasPath(wxSVGMatrix* matrix = NULL);
+    wxSVGCanvasItem* CreateItem(wxSVGTextElement* element, const 
wxCSSStyleDeclaration* style = NULL,
+        wxSVGMatrix* matrix = NULL);
+    wxSVGCanvasItem* CreateItem(wxSVGImageElement* element, const 
wxCSSStyleDeclaration* style = NULL,
+        wxProgressDialog* progressDlg = NULL);
+    wxSVGCanvasItem* CreateItem(wxSVGVideoElement* element, const 
wxCSSStyleDeclaration* style = NULL,
+        wxProgressDialog* progressDlg = NULL);
+
+    void DrawItem(wxSVGCanvasItem& item, wxSVGMatrix& matrix, const 
wxCSSStyleDeclaration& style,
+        wxSVGSVGElement& svgElem) override;
+
+protected:
+    void SetStopValue(unsigned int index, float offset, float opacity, const 
wxRGBColor& rgbColor);
+    void AllocateGradientStops(unsigned int stop_count);
+
+private:
+    void DrawCanvasPath(wxSVGCanvasPathSkia& canvasPath, wxSVGMatrix& matrix, 
const wxCSSStyleDeclaration& style,
+        wxSVGSVGElement& svgElem);
+    void SetPaint(const wxSVGPaint & paint, SkPaint& spaint, float opacity, 
wxSVGCanvasPathSkia& canvasPath,
+        wxSVGSVGElement& svgElem, const wxSVGMatrix& matrix);
+    void DestroyGradient();
+    void ApplyStrokeStyle(const wxCSSStyleDeclaration& style);
+
+private:
+    Gradient*   m_pGraient;
+    SkCanvas*   m_pCanvas;
+    SkBitmap*   m_pBitmap;
+    int         m_nWidth;
+    int         m_nHeight;
+    bool        m_bAlpha;
+};


Reply via email to