소스 정보
- 저장소
- tomevault-io/skills-registry
- 최근 소스 활동
- 2026년 5월 11일 15:30
- 감지된 SKILL.md 언어
- 영어
- 스타
- 0
- 포크
- 0
설치 방법
기본적으로 소스를 먼저 확인하는 Prompt가 선택됩니다. 직접 명령으로 전환하거나 로컬 사본을 다운로드할 수도 있습니다.
소스 파일 검토
설치 여부를 결정하기 전에 SKILL.md와 SkillsMP에 표시된 보조 파일을 읽어 보세요.
메뉴
기본적으로 소스를 먼저 확인하는 Prompt가 선택됩니다. 직접 명령으로 전환하거나 로컬 사본을 다운로드할 수도 있습니다.
설치 여부를 결정하기 전에 SKILL.md와 SkillsMP에 표시된 보조 파일을 읽어 보세요.
SOC 직업 분류 기준
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
직접 명령은 검토 Prompt를 거치지 않습니다. 실행하기 전에 소스를 확인하세요.
npx skills add https://github.com/tomevault-io/skills-registry --skill maui-graphics-drawing명령은 한 줄로 유지됩니다. 복사하기 전에 가로로 스크롤해 전체 내용을 확인하세요.
로컬 사본을 원하시나요? SkillsMP에서 현재 제공할 수 있는 파일을 다운로드하세요.
SKILL.md 표시 중
| Use when this capability is needed.
> Use when this capability is needed.
Review architecture and API design for the vfs-s3 project. Use when the user mentions @architect, asks to review an issue's design, discuss module boundaries, API shape, or architectural decisions for vfs-s3. Also trigger when the user wants to create an ADR (Architecture Decision Record) or evaluate a technical approach for the project. Intended for dispatch from Codex automation or Claude routines; GitHub trigger phrase: @vfs-s3-bot please prepare design doc Use when this capability is needed.
| name | maui-graphics-drawing |
| description | > Use when this capability is needed. |
| Issue | Fix |
|---|---|
| Nothing draws on screen | Ensure Drawable is set on GraphicsView and the control has non-zero HeightRequest/WidthRequest |
| State bleeds between shapes | Wrap isolated sections in SaveState() / RestoreState() pairs |
| Shadows stick to later draws | Call canvas.SetShadow(SizeF.Zero, 0, null) after drawing the shadowed element |
| Clipping never resets | Clipping is cumulative per frame — use SaveState/RestoreState around clip regions |
| UI freezes during drawing | Never do I/O, network, or heavy computation inside Draw() — it runs on the UI thread |
⚠️ Unpaired SaveState/RestoreState causes state leaks across draw calls.
// ✅ Correct — isolated state
canvas.SaveState();
canvas.StrokeColor = Colors.Red;
canvas.StrokeSize = 6;
canvas.DrawRectangle(10, 10, 80, 80);
canvas.RestoreState();
// Stroke reverts to previous values
// ❌ Wrong — state leaks to everything drawn after
canvas.StrokeColor = Colors.Red;
canvas.StrokeSize = 6;
canvas.DrawRectangle(10, 10, 80, 80);
// Every subsequent shape is now red with size 6
Saves/restores: stroke, fill, font, shadow, clip, and transforms. Nest calls for layered isolation.
// ✅ Correct — queue a redraw
graphicsView.Invalidate();
// ❌ Wrong — never call Draw() directly
myDrawable.Draw(canvas, rect);
Invalidate() queues a redraw; the framework calls IDrawable.Draw on the next frame.Invalidate() in a tight loop — batch state changes, then invalidate once.Draw() fast — pre-compute paths and data outside the draw method; Draw() is called on every frame.PathF objects — create them once, store as fields, draw repeatedly.MeasureFirstItem-style thinking — if drawing many identical items, calculate dimensions once.new PathF() inside Draw() when the path doesn't change.// ✅ Pre-computed path (field)
private readonly PathF _starPath = BuildStarPath();
public void Draw(ICanvas canvas, RectF dirtyRect)
{
canvas.FillPath(_starPath);
}
// ❌ Allocating every frame
public void Draw(ICanvas canvas, RectF dirtyRect)
{
var path = new PathF();
// ...build path every frame...
canvas.FillPath(path);
}
Shadows apply to all subsequent draws until explicitly removed. Clips accumulate and can only be undone with RestoreState():
// ✅ Shadow: remove after use
canvas.SetShadow(new SizeF(5, 5), 4, Colors.Gray);
canvas.FillRectangle(20, 20, 100, 60);
canvas.SetShadow(SizeF.Zero, 0, null); // ← must remove
// ✅ Clip: isolate with SaveState/RestoreState
canvas.SaveState();
canvas.ClipRectangle(20, 20, 100, 100);
canvas.FillRectangle(0, 0, 200, 200); // clipped
canvas.RestoreState(); // clip removed
// ❌ Clip persists — everything after is also clipped
canvas.ClipRectangle(20, 20, 100, 100);
canvas.FillEllipse(150, 150, 50, 50); // unintentionally clipped!
// ✅ Properties then draw
canvas.StrokeColor = Colors.Blue;
canvas.DrawRectangle(10, 10, 100, 50);
// ❌ Setting after draw has no effect on previous shape
canvas.DrawRectangle(10, 10, 100, 50);
canvas.StrokeColor = Colors.Blue;
| Need | Approach |
|---|---|
| Simple shapes / static graphics | Single IDrawable, draw in Draw() |
| Animated graphics | Update state externally, call Invalidate() from timer/animation |
| Complex layered scene | Multiple SaveState/RestoreState blocks, or separate drawables |
| Hit testing on drawn elements | Track shape bounds manually — GraphicsView has no built-in hit test on drawn content |
| Platform-specific rendering | Use handlers/platform code; Microsoft.Maui.Graphics is cross-platform only |
GraphicsView has Drawable set and non-zero sizeDraw() is fast — no I/O, no heavy allocationsSaveState() has a matching RestoreState()SetShadow(SizeF.Zero, 0, null) after useSaveState/RestoreState blocksInvalidate() used instead of calling Draw() directlyConverted and distributed by TomeVault — claim your Tome and manage your conversions.