class
MCheckerCanvas
- Module
- Miri
- Header
#include "Miri/Widgets/MCheckerCanvas.h"- Namespace
Miri
Properties
| Type | Name | Description |
|---|---|---|
static constexpr float | kMinZoom | Default 40.0f. |
static constexpr float | kMaxZoom | Default 6000.0f. |
Public functions
| Returns | Name | Description |
|---|---|---|
MIRI_WIDGET_ARGS | ||
float | CheckerCellUv | The checker cell size in UV for a zoom of pxPerUv: a power of two whose screen size is nearest the design's 48 px. |
void | PaintBackdrop | |
void | PaintSquare | The 0-1 square: fill, the checker when asked, and its frame. |
void | PaintSquareFrame | |
void | PaintAxisLabels | |
void | PaintIsland | An island polygon in screen space. |
void | PaintFill | A convex polygon filled in one colour, row by row (the island fill without its border): a stretch or density overlay over an island. |
void | PaintSeam | |
void | PaintVertex | |
void | SetIslands | |
void | SetSeams | |
void | SetView | |
void | FrameBox | |
float | GetPixelsPerUv | |
const MiriVec2& | GetPan | |
MiriVec2 | ToScreen | |
MiriVec2 | ToUv | |
MiriVec2 | ComputeDesiredSize | |
int32_t | OnPaint | |
CReply | OnMouseButtonDown | |
CReply | OnMouseMove | |
CReply | OnMouseButtonUp | |
CReply | OnMouseWheel | |
void | OnMouseCaptureLost | |
const char* | GetTypeName |
Function details
MIRI_WIDGET_ARGS
C++
MIRI_WIDGET_ARGS(MCheckerCanvas) MIRI_WIDGET_ARGS_END() void Construct(const CArguments& args)CheckerCellUv
C++
static float CheckerCellUv(float pxPerUv)The checker cell size in UV for a zoom of pxPerUv: a power of two whose screen size is nearest the design's 48 px.
PaintBackdrop
C++
static void PaintBackdrop(CMiriRenderer& renderer, const MiriRect& rect, float opacity)PaintSquare
C++
static void PaintSquare(CMiriRenderer& renderer, const MiriRect& square, bool checker, float opacity)The 0-1 square: fill, the checker when asked, and its frame.
PaintSquareFrame
C++
static void PaintSquareFrame(CMiriRenderer& renderer, const MiriRect& square, float opacity)PaintAxisLabels
C++
static void PaintAxisLabels(CMiriRenderer& renderer, const MiriRect& square, float opacity)PaintIsland
C++
static void PaintIsland(CMiriRenderer& renderer, const MiriVec2* points, size_t count, EMiriUvIslandState state, float opacity, const MiriColor* edge = nullptr, bool fill = true)An island polygon in screen space. edge overrides the state's border colour (island tinting); fill draws the state's fill.
PaintFill
C++
static void PaintFill(CMiriRenderer& renderer, const MiriVec2* points, size_t count, const MiriColor& color)A convex polygon filled in one colour, row by row (the island fill without its border): a stretch or density overlay over an island.
PaintSeam
C++
static void PaintSeam(CMiriRenderer& renderer, const MiriVec2& a, const MiriVec2& b, float opacity)PaintVertex
C++
static void PaintVertex(CMiriRenderer& renderer, const MiriVec2& p, float opacity)SetIslands
C++
void SetIslands(std::vector<FMiriUvIsland> islands)SetSeams
C++
void SetSeams(std::vector<MiriVec2> seamPoints)SetView
C++
void SetView(const MiriVec2& panUv, float pxPerUv)FrameBox
C++
void FrameBox(const MiriVec2& minUv, const MiriVec2& maxUv, const MiriRect& rect)GetPixelsPerUv
C++
float GetPixelsPerUv() constGetPan
C++
const MiriVec2& GetPan() constToScreen
C++
MiriVec2 ToScreen(const MiriRect& rect, const MiriVec2& uv) constToUv
C++
MiriVec2 ToUv(const MiriRect& rect, const MiriVec2& screen) constComputeDesiredSize
C++
MiriVec2 ComputeDesiredSize(float scale) const overrideOnPaint
C++
int32_t OnPaint(const CMiriPaintArgs& args, const CGeometry& geo, CMiriRenderer& renderer, int32_t layerId) const overrideOnMouseButtonDown
C++
CReply OnMouseButtonDown(const CGeometry& geo, const CPointerEvent& event) overrideOnMouseMove
C++
CReply OnMouseMove(const CGeometry& geo, const CPointerEvent& event) overrideOnMouseButtonUp
C++
CReply OnMouseButtonUp(const CGeometry& geo, const CPointerEvent& event) overrideOnMouseWheel
C++
CReply OnMouseWheel(const CGeometry& geo, const CPointerEvent& event) overrideOnMouseCaptureLost
C++
void OnMouseCaptureLost() overrideGetTypeName
C++
const char* GetTypeName() const overrideGenerated from Miri/Widgets/MCheckerCanvas.h via miri.json · Dec 5, 2026Version 1.1.0