# Auto Shape:一笔绘制图形 (/zh-CN/realtime-media/whiteboard/whiteboard-sdk/build/appliance-plugin/extended-features/ios) > For AI agents: see the complete documentation index at [llms.txt](/llms.txt). 适用于 **Whiteboard iOS SDK 2.16.147**。Auto Shape(插件 Version ≥1.1.33)在 Pencil 抬笔时尝试将单笔识别为规则图形。 ## 定义业务扩展模型 [#定义业务扩展模型] 基础 `WhiteMemberState` 未声明 `autoShape`。在应用中定义命名子类,通过现有 `setMemberState:` 序列化提交该字段;它是业务扩展属性。 ```objc @interface AutoShapeMemberState : WhiteMemberState @property (nonatomic, strong) NSNumber *autoShape; @end @implementation AutoShapeMemberState @end ``` ## 开启和关闭 [#开启和关闭] 在入房成功且插件就绪后调用: ```objc AutoShapeMemberState *state = [AutoShapeMemberState new]; state.currentApplianceName = AppliancePencil; state.strokeType = @"Normal"; state.autoShape = @YES; [room setMemberState:state]; AutoShapeMemberState *disabled = [AutoShapeMemberState new]; disabled.autoShape = @NO; [room setMemberState:disabled]; ``` 应用必须保留 `autoShape` 与 `strokeType` 的序列化字段名。通过 YYModel 的公开模型序列化路径提交子类属性;关闭时显式提交 NO。 可识别直线、箭头、矩形、椭圆或圆、三角形、菱形和五角星。闭合图形尽量一笔闭合;无法识别时保留普通笔迹,不转换历史数据。