We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hello I am trying to set a method to di a 90degree left or right rotation. this as a side effect that the bound checking becomes invalid.
Not sure if I not setting some this I should or should not.
But this is my code below that I added to the HFImageEditorViewController
(void) rotate:(ImageRotationDirection)pOrientation { CGFloat rotation = 0; if (pOrientation == ImageRotationDirectionRight) { rotation = M_PI_2; } else { rotation = -M_PI_2; }
CGAffineTransform transform = CGAffineTransformRotate(self.imageView.transform, rotation); CGRect rectA = self.imageView.frame; rectA = CGRectApplyAffineTransform(rectA, transform); CGFloat scale = self.cropRect.size.width/rectA.size.width; transform = CGAffineTransformScale(transform, scale/self.scale, scale/self.scale); [self checkBoundsWithTransform:transform]; self.imageView.transform = self.validTransform; }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Hello I am trying to set a method to di a 90degree left or right rotation.
this as a side effect that the bound checking becomes invalid.
Not sure if I not setting some this I should or should not.
But this is my code below that I added to the HFImageEditorViewController
(void) rotate:(ImageRotationDirection)pOrientation
{
CGFloat rotation = 0;
if (pOrientation == ImageRotationDirectionRight)
{
rotation = M_PI_2;
}
else
{
rotation = -M_PI_2;
}
CGAffineTransform transform = CGAffineTransformRotate(self.imageView.transform, rotation);
CGRect rectA = self.imageView.frame;
rectA = CGRectApplyAffineTransform(rectA, transform);
CGFloat scale = self.cropRect.size.width/rectA.size.width;
transform = CGAffineTransformScale(transform, scale/self.scale, scale/self.scale);
[self checkBoundsWithTransform:transform];
self.imageView.transform = self.validTransform;
}
The text was updated successfully, but these errors were encountered: