13#include "GuiGeometry.h"
48 GuiPaint& shadow(
float blur,
PixelColor c,
float dx = 0.0f,
float dy = 0.0f,
float spread = 0.0f);
50 GuiPaint& glow(
float blur,
PixelColor c,
float spread = 0.0f);
53 bool operator==(
const GuiPaint& o)
const;
54 bool operator!=(
const GuiPaint& o)
const {
return !(*
this == o); }
61 static GuiPaint mix(
const GuiPaint& a,
const GuiPaint& b,
float t);
89 GuiShapeStyle(
const GuiPaint& normalPaint = GuiPaint());
90 GuiShapeStyle& onFocus(
const GuiPaint& p);
91 GuiShapeStyle& onPress(
const GuiPaint& p);
92 GuiShapeStyle& onDisable(
const GuiPaint& p);
Accumulates shapes as a triangle list of MeshVertex.
bool hasFill
The look of a shape: an optional fill, an optional outline and an optional shadow or glow.
STROKE
Where a stroke sits relative to the shape's geometric edge.
SHAPE_STATE
The states a styled shape distinguishes.
void GuiAddPaintedShape(GuiMesh &mesh, SHAPE shape, const GuiRect &r, const GuiCorners &corners, const GuiPaint &paint)
Adds a painted shape to a mesh: shadow first, then fill, then outline.
SHAPE
Basic shape kinds a paint can be applied to.
PixelColor GuiMixColor(PixelColor a, PixelColor b, float t)
Blends two colors per channel (alpha included): t = 0 gives a, t = 1 gives b.
@ INSIDE
Entirely inside the edge (the shape keeps its size)
@ FOCUSED
Highlighted: under the cursor, or selected with the D-pad.
@ ELLIPSE
Ellipse inscribed in the rectangle (a circle when it is square)
@ RECTANGLE
Rectangle, with optional rounded corners (see GuiCorners)
Per-corner radii, in the order top-left, top-right, bottom-right, bottom-left.
A solid color or a two-color linear gradient.
An axis-aligned rectangle (top-left origin) in design-canvas pixels.
const GuiPaint & forState(SHAPE_STATE s) const
Gets the paint for a state, falling back to normal when none was set.
8-bit-per-channel RGBA color used by the video interfaces.