36 for (
int i=0; i<nstops; i++) {
37 float pos = (1.f/(float) nstops) * i;
46#ifndef IGRAPHICS_NANOVG
50 g.
DrawText(mText,
"UNSUPPORTED", mRECT);
This file contains the base IControl implementation, along with some base classes for specific types ...
The lowest level base class of an IGraphics control.
IControl * SetTooltip(const char *str)
Set a tooltip for the control.
The lowest level base class of an IGraphics context.
virtual void PathFill(const IPattern &pattern, const IFillOptions &options=IFillOptions(), const IBlend *pBlend=0)=0
Fill the current current path.
void DrawText(const IText &text, const char *str, const IRECT &bounds, const IBlend *pBlend=0)
Draw some text to the graphics context in a specific rectangle.
void PathRect(const IRECT &bounds)
Add a rectangle to the current path.
virtual void DrawDottedRect(const IColor &color, const IRECT &bounds, const IBlend *pBlend=0, float thickness=1.f, float dashLen=2.f)
Draw a dotted rectangle to the graphics context.
void OnResize() override
Called when IControl is constructed or resized using SetRect().
void Draw(IGraphics &g) override
Draw the control to the graphics context.
static IColor FromHSLA(float h, float s, float l, float a=1.f)
Create an IColor from Hue Saturation and Luminance values.
Used to store pattern information for gradients.
void AddStop(IColor color, float offset)
Add an IColorStop to the IPattern.
static IPattern CreateLinearGradient(float x1, float y1, float x2, float y2, const std::initializer_list< IColorStop > &stops={})
Create a linear gradient IPattern.
Used to manage a rectangular area, independent of draw class/platform.