-
-
Notifications
You must be signed in to change notification settings - Fork 189
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add CropAuxiliaryIndicatorConfig to allow custom CropAuxiliaryI…
…ndicator colors (#405) fix some compile warnings change the value of minOverLayerUnit avoid that the cropping masks can not cover the image in case of a small minimumCropBoxSize
- Loading branch information
1 parent
899b717
commit bc50ce7
Showing
10 changed files
with
129 additions
and
64 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
// | ||
// CropAuxiliaryIndicatorConfig.swift | ||
// Mantis | ||
// | ||
// Created by Yingtao Guo on 7/19/24. | ||
// | ||
|
||
import UIKit | ||
|
||
public struct CropAuxiliaryIndicatorConfig { | ||
/** | ||
This value is for how easy to drag crop box. The bigger, the easier. | ||
*/ | ||
public var cropBoxHotAreaUnit: CGFloat = 32 { | ||
didSet { | ||
assert(cropBoxHotAreaUnit > 0) | ||
} | ||
} | ||
|
||
public var disableCropBoxDeformation = false | ||
public var style: CropAuxiliaryIndicatorStyleType = .normal | ||
|
||
public var borderNormalColor = UIColor.white | ||
|
||
/** | ||
The color of the border when showing which border is touched currently. | ||
*/ | ||
public var borderHintColor = UIColor.white | ||
|
||
public var cornerHandleColor = UIColor.white | ||
public var edgeLineHandleColor = UIColor.white | ||
|
||
public var gridMainColor = UIColor.white | ||
|
||
/** | ||
This property is only used when rotating the image | ||
*/ | ||
public var gridSecondaryColor = UIColor.lightGray | ||
|
||
public init() {} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters