‪JMSDK iOS  ‪v2.8.0
‪API文档
构造函数 | 属性 | 所有成员列表
JCDoodleAction类 参考

‪涂鸦操作类 更多...

#import <JCDoodleAction.h>

类 JCDoodleAction 继承关系图:

构造函数

(void) - addPointWithPositionX:positionY:timeInterval:
 ‪加点 point屏幕的坐标点(如(100, 100)),size屏幕view的尺寸(如(375, 667)) float x = 2 * point.x / size.width - 1.0; float y = 2 * point.y / size.height - 1.0; 更多...
 

属性

JCDoodleActionType actionType
 
NSString * userId
 
NSString * userDefined
 
NSUInteger pageNumber
 
float brushWidth
 
JCColor * brushColor
 
NSString * stickerUnicode
 
NSString * stickerName
 
float stickerX
 
float stickerY
 
float stickerWidth
 
float stickerHeight
 
int stickerRotate
 
NSArray< NSArray< NSNumber * > * > * pathPoints
 

详细描述

涂鸦操作类

函数文档

◆ addPointWithPositionX:positionY:timeInterval:

- (void) addPointWithPositionX: (float)  x
positionY: (float)  y
timeInterval: (int)  timeInterval 

‪加点 point屏幕的坐标点(如(100, 100)),size屏幕view的尺寸(如(375, 667)) float x = 2 * point.x / size.width - 1.0; float y = 2 * point.y / size.height - 1.0;

参数
x‪需使用以下方法把屏幕的坐标点转换成逻辑坐标点
y‪需使用以下方法把屏幕的坐标点转换成逻辑坐标点
timeInterval‪点与点的时间间隔

属性说明

◆ actionType

- (JCDoodleActionType) actionType
readwritenonatomicassign

类型,可在JCDoodleActionExtraBase基础上来扩展自定义类型

◆ brushColor

- (JCColor*) brushColor
readwritenonatomiccopy

设置涂鸦轨迹的颜色,默认为nil

◆ brushWidth

- (float) brushWidth
readwritenonatomicassign

设置涂鸦轨迹或橡皮擦宽度,默认为0

◆ pageNumber

- (NSUInteger) pageNumber
readwritenonatomicassign

用于多页涂鸦,默认为0

◆ pathPoints

- (NSArray<NSArray<NSNumber *> *>*) pathPoints
readnonatomicstrong

涂鸦轨迹的点集合,数组内的每一个NSArray,表示一个点。一个点(NSArray)内包含了3个值,第一个值是和上一个点的时间间隔(毫秒, int型),第二个值是点的x坐标(float型),第三个值是点的y坐标(float型)。 @discussion x, y是逻辑坐标点,需使用以下方法转换成屏幕的坐标点(sX, sY) size屏幕view的尺寸(如(375, 667)) CGFloat sX = (x + 1.0) * size.width / 2; CGFloat sY = (y + 1.0) * size.height / 2;

@discussion 加点使用接口 - (void)addPointWithPositionX:(float)x positionY:(float)y timeInterval:(int)timeInterval;

◆ stickerHeight

- (float) stickerHeight
readwritenonatomicassign

设置贴图高度

◆ stickerName

- (NSString*) stickerName
readwritenonatomiccopy

设置 stickerName。当贴图为自定义图片时,需要设置 stickerName。

◆ stickerRotate

- (int) stickerRotate
readwritenonatomicassign

设置贴图角度

◆ stickerUnicode

- (NSString*) stickerUnicode
readwritenonatomiccopy

设置贴图 unicode。当贴图为 emoji 表情时,需要设置 unicode。

◆ stickerWidth

- (float) stickerWidth
readwritenonatomicassign

设置贴图宽度

◆ stickerX

- (float) stickerX
readwritenonatomicassign

设置贴图逻辑 x 值,逻辑坐标点由屏幕坐标点根据屏幕尺寸转化。

◆ stickerY

- (float) stickerY
readwritenonatomicassign

设置贴图逻辑 y 值,逻辑坐标点由屏幕坐标点根据屏幕尺寸转化。

◆ userDefined

- (NSString*) userDefined
readwritenonatomiccopy

自定义数据

◆ userId

- (NSString*) userId
readwritenonatomiccopy

发起者


该类的文档由以下文件生成: