23BEGIN_IGRAPHICS_NAMESPACE
45 const float v =
static_cast<float>(
GetValue() * 0.65f);
50 g.
DrawEllipse(COLOR_BLACK, innerPart,
nullptr, 1.f);
52 IBlend b = {EBlend::Default, v};
56 void TriggerWithDecay(
int decayTimeMs)
62 pControl->OnEndAnimation();
66 pControl->
SetValue(EaseCubicIn(1. -progress));
75END_IGRAPHICS_NAMESPACE
Easing functions, based on Warren Moore's AHEasing library https://github.com/warrenm/AHEasing See he...
This file contains the base IControl implementation, along with some base classes for specific types ...
The lowest level base class of an IGraphics control.
double GetAnimationProgress() const
Get the progress in a control's animation, in the range 0-1.
virtual void SetValue(double value, int valIdx=0)
Set one of the control's values.
double GetValue(int valIdx=0) const
Get the control's value.
The lowest level base class of an IGraphics context.
virtual void FillEllipse(const IColor &color, const IRECT &bounds, const IBlend *pBlend=0)
Fill an ellipse within a rectangular region of the graphics context.
virtual void DrawEllipse(const IColor &color, const IRECT &bounds, const IBlend *pBlend=0, float thickness=1.f)
Draw an ellipse within a rectangular region of the graphics context.
virtual void PathFill(const IPattern &pattern, const IFillOptions &options=IFillOptions(), const IBlend *pBlend=0)=0
Fill the current current path.
void PathEllipse(const IRECT &bounds)
Add an ellipse to the current path, specifying the rectangular region.
void Draw(IGraphics &g) override
Draw the control to the graphics context.
Used to manage composite/blend operations, independent of draw class/platform.
Used to manage color data, independent of draw class/platform.
static IColor FromHSLA(float h, float s, float l, float a=1.f)
Create an IColor from Hue Saturation and Luminance values.
void GetHSLA(float &h, float &s, float &l, float &a) const
Get the Hue, Saturation and Luminance of the color.
static IPattern CreateRadialGradient(float x1, float y1, float r, const std::initializer_list< IColorStop > &stops={})
Create a radial gradient IPattern.
Used to manage a rectangular area, independent of draw class/platform.
IRECT GetCentredInside(const IRECT &sr) const
Get a rectangle the size of sr but with the same center point as this rectangle.
IRECT GetScaledAboutCentre(float scale) const
Get a copy of this IRECT where the width and height are multiplied by scale without changing the cent...