react-native-mask-segment-c.../docs/i18n/zh-CN/docusaurus-plugin-content-docs/current/api/props-image.md
a1518 bea6de3767 Add Docusaurus documentation site with i18n support
- Docusaurus 3.7.0 with both English and Chinese (zh-CN) locales
- Full API reference split into structured pages
- Homepage with hero, feature cards, and quick start section
- GitHub Actions workflow for auto-deployment to GitHub Pages

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-02 23:25:56 -07:00

19 lines
1.1 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

---
id: props-image
title: "Props图像与初始化"
---
# 🖼️ Props图像与初始化
| Prop | 类型 | 必填 | 默认值 | 描述 |
| --- | --- | --- | --- | --- |
| `originUrl` | `string` | 是* | — | 原始图像 URL`file://`、绝对路径或 `http(s)://` |
| `maskUrl` | `string` | 是* | — | 遮罩图像 URL语义色块图建议与原始图像尺寸相同 |
| `originImgPath` | `string` | — | — | **已弃用** — 请使用 `originUrl` |
| `maskImgPath` | `string` | — | — | **已弃用** — 请使用 `maskUrl` |
| `initialSession` | `MaskSegmentSession` | 否 | — | 从 MMKV 等恢复的草稿;区域就绪后自动调用 `loadSession` |
| `initialPaintColor` | `BgrColor` | 否 | — | **可选**。初始自定义画笔颜色 `{ b, g, r }`;省略时默认不选中画笔;用户需选择颜色或调用 `ref.setPaintColor` |
| `initialPaintConfigJson` | `Record<string, unknown>` | 否 | — | **可选**。`initialPaintColor` 的附带画笔配置;成功上色时通过 `onPaintCallback` 返回 |
\* 使用时至少需要 `originUrl` / `maskUrl` 之一。