34 pattern.
AddStop(COLOR_BLACK, 0.f);
35 pattern.
AddStop(COLOR_WHITE, 1.f);
37 IShadow shadow(pattern, 0.f, mRECT.
W() / 2.f, mRECT.
H() / 2.f, 1.f,
false);
38 IRECT bounds(mRECT.L, mRECT.T, mRECT.L + mRECT.
W() / 2.f, mRECT.T + mRECT.
H() / 2.f);
This file contains the base IControl implementation, along with some base classes for specific types ...
The lowest level base class of an IGraphics control.
The lowest level base class of an IGraphics context.
void DrawLayer(const ILayerPtr &layer, const IBlend *pBlend=nullptr)
Draw a layer to the main IGraphics context.
virtual void FillRect(const IColor &color, const IRECT &bounds, const IBlend *pBlend=0)
Fill a rectangular region of the graphics context with a color.
void ApplyLayerDropShadow(ILayerPtr &layer, const IShadow &shadow)
Applies a drop shadow directly onto a layer.
void StartLayer(IControl *pOwner, const IRECT &r, bool cacheable=false)
Create an IGraphics layer.
ILayerPtr EndLayer()
End an IGraphics layer.
Control to test drawing shadows with gradients.
void Draw(IGraphics &g) override
Draw the control to the graphics context.
std::unique_ptr< ILayer > ILayerPtr
ILayerPtr is a managed pointer for transferring the ownership of layers.
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.
Used to specify properties of a drop-shadow to a layer.