Skip to content

Commit

Permalink
removed crop temporarily
Browse files Browse the repository at this point in the history
  • Loading branch information
s4rv4d committed Mar 1, 2021
1 parent e17e370 commit 9321629
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 19 deletions.
Binary file not shown.
2 changes: 1 addition & 1 deletion docWind/Helpers/Helper+Extensions.swift
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ extension View {
.padding(.horizontal)
.padding(.vertical, 8)
.background(RoundedRectangle(cornerRadius: 16, style: .continuous)
.fill(Color(.secondarySystemBackground)))
.fill(Color.secondarySystemGroupedBackground))
.padding(.bottom, 6)
.padding(.horizontal)
}
Expand Down
4 changes: 2 additions & 2 deletions docWind/Tint.xcassets/Light Blue.colorset/Contents.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
"components" : {
"alpha" : "1.000",
"blue" : "1.000",
"green" : "0.550",
"red" : "0.100"
"green" : "0.549",
"red" : "0.102"
}
},
"idiom" : "universal"
Expand Down
31 changes: 15 additions & 16 deletions docWind/Views/Main module/Pdf module/EditImageview.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
//

import SwiftUI
import AVFoundation

struct EditImageview: View {

Expand Down Expand Up @@ -115,20 +116,20 @@ struct EditImageview: View {
if mainStage {
HStack {

Button(action: cropSelected) {
VStack {
SFSymbol.crop
.padding()
.background(Color.secondarySystemGroupedBackground
.cornerRadius(7)
.frame(width: 60, height: 60, alignment: /*@START_MENU_TOKEN@*/.center/*@END_MENU_TOKEN@*/)
)
Text("Crop")
.font(.caption)
}
}

Spacer()
// Button(action: cropSelected) {
// VStack {
// SFSymbol.crop
// .padding()
// .background(Color.secondarySystemGroupedBackground
// .cornerRadius(7)
// .frame(width: 60, height: 60, alignment: /*@START_MENU_TOKEN@*/.center/*@END_MENU_TOKEN@*/)
// )
// Text("Crop")
// .font(.caption)
// }
// }
//
// Spacer()

Button(action: adjustTapped) {
VStack {
Expand Down Expand Up @@ -445,7 +446,6 @@ struct EditImageview: View {

// See what size is longer and set crop rect parameters
if originalRatio > cropRatio {

scaledCropHeight = contextSize.height
scaledCropWidth = (contextSize.height/_height) * _width
cropX = (contextSize.width - scaledCropWidth) / 2
Expand All @@ -464,7 +464,6 @@ struct EditImageview: View {
let imageRef: CGImage = contextImage.cgImage!.cropping(to: rect)!

// Create a new image based on the imageRef and rotate back to the original orientation

let croppedImage: UIImage = UIImage(cgImage: imageRef, scale: currentImage.scale, orientation: currentImage.imageOrientation)
currentImage = croppedImage
}
Expand Down

0 comments on commit 9321629

Please sign in to comment.