diff --git a/src/gui/animation/animator.h b/src/gui/animation/animator.h index 521cb3c6..fe35c7b5 100755 --- a/src/gui/animation/animator.h +++ b/src/gui/animation/animator.h @@ -40,14 +40,14 @@ private: public: static constexpr long DURATION_INFINITE = -1; - class AnimatorListener:virtual public EventSet{ + class AnimatorListener:public EventSet{ public: CallbackBaseonAnimationStart; CallbackBaseonAnimationEnd; CallbackBaseonAnimationCancel; CallbackBaseonAnimationRepeat; }; - class AnimatorPauseListener:virtual public EventSet{ + class AnimatorPauseListener:public EventSet{ public: CallbackBase onAnimationPause; CallbackBase onAnimationResume; @@ -100,7 +100,7 @@ public: virtual void reverse(); }; -class AnimatorListenerAdapter:public Animator::AnimatorListener,Animator::AnimatorPauseListener{ +class AnimatorListenerAdapter:public Animator::AnimatorListener,public Animator::AnimatorPauseListener{ public: AnimatorListenerAdapter(); }; diff --git a/src/gui/drawables/gradientdrawable.cc b/src/gui/drawables/gradientdrawable.cc index 56459b1f..7681f776 100644 --- a/src/gui/drawables/gradientdrawable.cc +++ b/src/gui/drawables/gradientdrawable.cc @@ -854,6 +854,16 @@ static void drawRound(Canvas&canvas,const RectF&r,const std::vector&radii float db=180.f; float pts[8]; double radian = M_PI; + if((r.widthr.height; + RectF rclip = r; + if(insetHoriz==false)rclip.inset(0,(r.height-dd)/2.f); + else rclip.inset((r.width-dd)/2.f,0); + canvas.rectangle(rclip.left,rclip.top,rclip.width,rclip.height); + canvas.clip(); + } pts[0]=r.left + radii[0]; pts[1]=r.top + radii[0]; pts[2]=r.right() - radii[1]; @@ -862,12 +872,12 @@ static void drawRound(Canvas&canvas,const RectF&r,const std::vector&radii pts[5]=r.bottom()- radii[2]; pts[6]=r.left + radii[3]; pts[7]=r.bottom()- radii[3]; - canvas.begin_new_sub_path(); + //canvas.begin_new_sub_path(); for(int i=0,j=0; i<8; i+=2,j++) { canvas.arc(pts[i],pts[i+1],radii[j],radian,radian+M_PI/2.0); radian += M_PI/2.0; } - canvas.close_path(); + //canvas.close_path(); } }