# Auto Shape:一笔绘制图形 (/zh-CN/realtime-media/whiteboard/fastboard-sdk/build/appliance-plugin/extended-features/ios) > For AI agents: see the complete documentation index at [llms.txt](/llms.txt). 适用于 **Fastboard iOS 1.4.6**。本页通过 Fastboard 公开的原生 SDK 对象配置教具插件。 在创建 FastRoom 前设置配置,入房成功后使用 `fastRoom.room` 和 `fastRoom.whiteSDK`。delegate 通过 `fastRoom.commonDelegate`、`roomDelegate` 设置,避免覆盖 Fastboard 内部代理。 ```swift let config = FastRoomConfiguration(appIdentifier: appIdentifier, roomUUID: uuid, roomToken: roomToken, region: .CN, userUID: uid) config.whiteSdkConfiguration.useMultiViews = true config.whiteSdkConfiguration.enableAppliancePlugin = true let pluginOptions = WhiteAppliancePluginOptions() pluginOptions.extras = ["useBackgroundThread": true] config.whiteRoomConfig.appliancePluginOptions = pluginOptions let fastRoom = Fastboard.createFastRoom(withFastRoomConfig: config) ``` 以下 Objective-C 示例也可用于原生调用:`config` 表示 `FastRoomConfiguration.whiteSdkConfiguration`,`roomConfig` 表示 `whiteRoomConfig`,`room`、`whiteSDK` 分别来自已入房 FastRoom 的同名属性。 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。 可识别直线、箭头、矩形、椭圆或圆、三角形、菱形和五角星。闭合图形尽量一笔闭合;无法识别时保留普通笔迹,不转换历史数据。