aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenedikt Betz <benedikt.betz@bueroscharf.de>2023-10-20 10:37:45 +0200
committerBenedikt Betz <benedikt.betz@bueroscharf.de>2023-10-20 10:37:45 +0200
commit63a6d66b2505c3fecfe65b92ee77e40fb4cf34b9 (patch)
treed7c78ada46b501ea56c3b15c15611b9bf2fd22f7
parentb9a35b685290edb2836ff364c3f003668497a5d4 (diff)
Adjust asset size, edit README
-rw-r--r--Assets/demo.gifbin34136725 -> 36085786 bytes
-rw-r--r--README.md17
2 files changed, 15 insertions, 2 deletions
diff --git a/Assets/demo.gif b/Assets/demo.gif
index ac9ac66..2aefce2 100644
--- a/Assets/demo.gif
+++ b/Assets/demo.gif
Binary files differ
diff --git a/README.md b/README.md
index 67a21ea..fc63dab 100644
--- a/README.md
+++ b/README.md
@@ -118,14 +118,27 @@ struct ExampleView: View {
}
```
-You can also configure `SwiftyCropView` by passing a `SwiftyCropConfiguration`:
+SwiftyCrop supports two different mask shapes for cropping:
+- `circle`
+- `square`
+
+This is only the shape of the mask the user will see when cropping the image. The resulting, cropped image will always be a square.
+
+You can also configure `SwiftyCropView` by passing a `SwiftyCropConfiguration`. A configuration has the following properties:
+
+| Property | Description |
+| ----------- | ----------- |
+| `maxMagnificationScale` | `CGFloat`: The maximum scale factor that the image can be magnified while cropping. Defaults to `4.0`. |
+| `maskRadius` | `CGFloat`: The radius of the mask used for cropping. Defaults to `130`. A good way is to make it dependend on the screens size. |
+
+Create a configuration like this:
```swift
let configuration = SwiftyCropConfiguration(
maxMagnificationScale = 4.0,
maskRadius: 130
)
```
-
+and use it like this:
```swift
.fullScreenCover(isPresented: $showImageCropper) {
if let selectedImage = selectedImage {