Skip to content

Commit

Permalink
Merge pull request #103 from monkiyang/master
Browse files Browse the repository at this point in the history
支持修改矩形框线条宽度
  • Loading branch information
MxABC committed Oct 15, 2020
2 parents 3aa6961 + 13292b8 commit 4bc8de1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Source/LBXScanView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ open class LBXScanView: UIView {
if viewStyle.isNeedShowRetangle {
// 中间画矩形(正方形)
context.setStrokeColor(viewStyle.colorRetangleLine.cgColor)
context.setLineWidth(1)
context.setLineWidth(viewStyle.widthRetangleLine)
context.addRect(CGRect(x: XRetangleLeft, y: YMinRetangle, width: sizeRetangle.width, height: sizeRetangle.height))

// CGContextMoveToPoint(context, XRetangleLeft, YMinRetangle);
Expand Down
3 changes: 3 additions & 0 deletions Source/LBXScanViewStyle.swift
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ public struct LBXScanViewStyle {

/// 矩形框线条颜色,默认白色
public var colorRetangleLine = UIColor.white

/// 矩形框线条宽度,默认1
public var widthRetangleLine: CGFloat = 1.0

//MARK: - 矩形框(扫码区域)周围4个角

Expand Down

0 comments on commit 4bc8de1

Please sign in to comment.