|
@@ -1041,7 +1041,7 @@ fileprivate extension WSSCoolVoiceSubtitleController {
|
|
|
|
|
|
effectExport?.didEndProcessingHandle = { [weak self] isUserCancel in
|
|
effectExport?.didEndProcessingHandle = { [weak self] isUserCancel in
|
|
guard !isUserCancel else {
|
|
guard !isUserCancel else {
|
|
- hideHud()
|
|
|
|
|
|
+ hideHud()
|
|
return
|
|
return
|
|
}
|
|
}
|
|
self?.movieWriter?.finishRecording(completionHandler: { [weak self] in
|
|
self?.movieWriter?.finishRecording(completionHandler: { [weak self] in
|
|
@@ -1145,10 +1145,8 @@ fileprivate extension WSSCoolVoiceSubtitleController {
|
|
let centerYPercent: CGFloat = centerPoint.y / overlaySize.height
|
|
let centerYPercent: CGFloat = centerPoint.y / overlaySize.height
|
|
let covertCenter: CGPoint = CGPoint(x: centerXPercent * rect.size.width, y: centerYPercent * rect.size.height)
|
|
let covertCenter: CGPoint = CGPoint(x: centerXPercent * rect.size.width, y: centerYPercent * rect.size.height)
|
|
|
|
|
|
-// WSSSimpleLog("🥞🥞🥞: \(centerXPercent) + \(centerYPercent) + \(covertCenter) ++ \(rect)")
|
|
|
|
-
|
|
|
|
for subtitleModel in currentShowingSubtitleInfos {
|
|
for subtitleModel in currentShowingSubtitleInfos {
|
|
- if let textModel = subtitleModel.fontViewModel {
|
|
|
|
|
|
+ if let textModel = subtitleModel.fontViewModel?.deepCopy() {
|
|
let tmpPasterView = WSSCoolVoicePasterView.createPasterView(withCenter: centerPoint, vm: textModel)
|
|
let tmpPasterView = WSSCoolVoicePasterView.createPasterView(withCenter: centerPoint, vm: textModel)
|
|
|
|
|
|
let sizeWidthPercent: CGFloat = tmpPasterView.size.width / overlaySize.width
|
|
let sizeWidthPercent: CGFloat = tmpPasterView.size.width / overlaySize.width
|
|
@@ -1158,9 +1156,15 @@ fileprivate extension WSSCoolVoiceSubtitleController {
|
|
tmpPasterView.bounds = covertBounds
|
|
tmpPasterView.bounds = covertBounds
|
|
tmpPasterView.center = covertCenter
|
|
tmpPasterView.center = covertCenter
|
|
|
|
|
|
-// WSSSimpleLog("🥞🥞🥞aaa: \(sizeWidthPercent) + \(sizeHeightPercent) + \(covertBounds) ")
|
|
|
|
-
|
|
|
|
let vertex = calculateVertex(withPaster: tmpPasterView, targetView: placeholer).map({ NSNumber(value: Float($0)) })
|
|
let vertex = calculateVertex(withPaster: tmpPasterView, targetView: placeholer).map({ NSNumber(value: Float($0)) })
|
|
|
|
+
|
|
|
|
+ // 为了提高小字体的字体清晰度
|
|
|
|
+ let needScaleFontSize: CGFloat = 24.0
|
|
|
|
+ if textModel.fontSize < needScaleFontSize {
|
|
|
|
+ let scale: CGFloat = needScaleFontSize / textModel.fontSize
|
|
|
|
+ tmpPasterView.scaleFontSize(needScaleFontSize, scale: scale)
|
|
|
|
+ }
|
|
|
|
+
|
|
if let image = tmpPasterView.subtitleLabel?.wss_screenShot() {
|
|
if let image = tmpPasterView.subtitleLabel?.wss_screenShot() {
|
|
guard let input = setupInput(textImage: image, vertex: vertex) else { return }
|
|
guard let input = setupInput(textImage: image, vertex: vertex) else { return }
|
|
let pasterData: (XunFeiSDKTool.MSCResultModel, OJAPasterFrameInput) = (subtitleModel, input)
|
|
let pasterData: (XunFeiSDKTool.MSCResultModel, OJAPasterFrameInput) = (subtitleModel, input)
|