📖 API Reference
Imports
import MaskSegmentCanvas, {
type MaskSegmentCanvasRef,
type MaskSegmentCanvasProps,
type MaskSegmentSession,
type MaskSegmentWatchState,
type MaskSegmentWatchDetail,
type BgrColor,
type MaskSemanticColor,
type PaintCallbackPayload,
type PaintedRegionRecord,
type PipelineConfig,
type MaskSegmentConfig,
type PaintConfig,
type InteractionConfig,
type SavePaintResult,
type LassoPolygon,
type ManualWallPartition,
MASK_SEMANTIC_COLORS,
BASEBOARD_SEMANTIC_NAME,
prewarmPngBgrCacheAsync,
DEFAULT_PIPELINE_CONFIG,
DEFAULT_MASK_CONFIG,
DEFAULT_PAINT_CONFIG,
DEFAULT_INTERACTION_CONFIG,
} from 'react-native-mask-segment-canvas';
| Category | Names |
|---|---|
| Component | MaskSegmentCanvas (default) |
| Ref / Props types | MaskSegmentCanvasRef, MaskSegmentCanvasProps |
| Session / callback types | MaskSegmentSession, PaintCallbackPayload, PaintedRegionRecord, SavePaintResult |
| Lasso types | LassoPolygon, ManualWallPartition |
| Watch types | MaskSegmentWatchState, MaskSegmentWatchDetail |
| Config types | PipelineConfig, MaskSegmentConfig, PaintConfig, InteractionConfig |
| Semantic colors | MASK_SEMANTIC_COLORS, BASEBOARD_SEMANTIC_NAME |
| Utilities | prewarmPngBgrCacheAsync |
| Runtime defaults | DEFAULT_*_CONFIG |
Props Overview
| Category | Description |
|---|---|
| Image & Initialization | originUrl, maskUrl, initialSession, initialPaintColor |
| Semantic Colors & Outline | semanticColors, regionOutlineColor |
| maskConfig | Segmentation and semantic region configuration |
| pipelineConfig | Resolution and processing pipeline configuration |
| paintConfig | Paint rendering and texture blending configuration |
| interactionConfig | Touch interaction and hit testing configuration |
| UI Controls & Styling | Visibility toggles, custom renderers, styling |
| Callbacks | onWatch, onPaintCallback, onError |
| Ref Methods | Imperative methods via ref |
| Storage Convention | Session persistence and PNG export |