浏览代码

Merge branch 'master' of https://git.yishihui.com/iOS/BFFramework

* 'master' of https://git.yishihui.com/iOS/BFFramework:
  设置预览区大小
  设置为白色背景
  修复播放器有黑边问题
huzhiqiang 3 年之前
父节点
当前提交
2d3645d635

+ 1 - 1
BFFramework/Classes/PQGPUImage/Source/iOS/RenderView.swift

@@ -14,7 +14,7 @@ public protocol RenderViewDelegate: class {
 public class RenderView: UIView, ImageConsumer {
     public weak var delegate: RenderViewDelegate?
 
-    public var backgroundRenderColor = Color.black
+    public var backgroundRenderColor = Color.white
     public var fillMode = FillMode.preserveAspectRatio
     public var orientation: ImageOrientation = .portrait
     public var sizeInPixels: Size { return Size(width: Float(frame.size.width * contentScaleFactor), height: Float(frame.size.height * contentScaleFactor)) }

+ 12 - 2
BFFramework/Classes/Stuckpoint/Controller/PQStuckPointEditerController.swift

@@ -892,10 +892,20 @@ class PQStuckPointEditerController: PQBaseViewController {
                 showRect.size.height = cScreenWidth
             }
         }
-        showRect.origin.y = (playerShowHeight - showRect.size.height) / 2.0 + (navHeadImageView?.frame.maxY ?? 0)
+     
         if showRect.size.width != 0, showRect.size.height != 0 {
-            playerView.resetCanvasFrame(frame: showRect)
+            if(Int(showRect.height) % 2 != 0){
+                showRect.size.height  = showRect.size.height + 1.0
+            }
+            if(Int(showRect.width) % 2 != 0){
+                showRect.size.width  =  showRect.size.width + 1.0
+            }
+ 
         }
+        showRect.origin.y = (playerShowHeight - showRect.size.height) / 2.0 + (navHeadImageView?.frame.maxY ?? 0)
+        playerView.resetCanvasFrame(frame: showRect)
+        
+        
 
         var firstModel: PQEditVisionTrackMaterialsModel?
         for part in projectModel.sData!.sections {