Ver Fonte

添加字幕样式 model

jsonwang há 3 anos atrás
pai
commit
a605b8858d

+ 31 - 0
BFFramework/Classes/PModels/editDarftModels/PQEditSubTitleModel.swift

@@ -15,6 +15,10 @@ open class PQEditSubTitleModel: PQEditBaseModel {
     public var timelineOut: Float64 = 0
     // 显示每一句字幕
     public var text: String = ""
+    
+    //字幕的设置
+    public var setting:BFSubTitileSettingModel = BFSubTitileSettingModel.init()
+    
     required public init() {
         super.init()
     }
@@ -42,3 +46,30 @@ open class PQEditSubTitleModel: PQEditBaseModel {
         }
     }
 }
+
+public class BFSubTitileSettingModel: NSObject {
+    
+    //字幕样式 值说明0 1 2 3 4 5 6
+    public var subtitleStyle:Int = 0
+    //字幕位置 值说明 0 下 1 中 2 上
+    public var subtitlePoint:Int =  0
+    
+    //字幕文字大小 70px 相对于1080相素?
+    public var subtitleSize:Int = 70
+    
+    //字幕是否显示
+    public var subtitleIsShow:Bool = true
+    
+    //字色
+    public var fontColor: UIColor = .white
+    //背景色
+    public var backgroundColor:UIColor = .clear
+    //背景透明度
+    public var backgroundAlpha:Float = 1.0
+    //描边颜色
+    public var strokeColor: UIColor = .white
+    //描边宽度 6.0
+    public var strokeWidth: CGFloat = 6.0
+ 
+    
+}