mirror of
https://github.com/apache/cordova-plugin-camera.git
synced 2026-04-29 00:02:13 +08:00
CB-7938 - Added XCTest unit tests project, with stubs (adapted from SplashScreen unit test setup) (closes #60)
This commit is contained in:
committed by
Shazron Abdullah
parent
35c653d24d
commit
482f2ac2cc
@@ -23,6 +23,7 @@
|
||||
|
||||
- (UIImage*)imageByScalingAndCroppingForSize:(CGSize)targetSize;
|
||||
- (UIImage*)imageCorrectedForCaptureOrientation;
|
||||
- (UIImage*)imageCorrectedForCaptureOrientation:(UIImageOrientation)imageOrientation;
|
||||
- (UIImage*)imageByScalingNotCroppingForSize:(CGSize)targetSize;
|
||||
|
||||
@end
|
||||
@@ -74,12 +74,12 @@
|
||||
return newImage;
|
||||
}
|
||||
|
||||
- (UIImage*)imageCorrectedForCaptureOrientation
|
||||
- (UIImage*)imageCorrectedForCaptureOrientation:(UIImageOrientation)imageOrientation
|
||||
{
|
||||
float rotation_radians = 0;
|
||||
bool perpendicular = false;
|
||||
|
||||
switch ([self imageOrientation]) {
|
||||
switch (imageOrientation) {
|
||||
case UIImageOrientationUp :
|
||||
rotation_radians = 0.0;
|
||||
break;
|
||||
@@ -124,6 +124,11 @@
|
||||
return newImage;
|
||||
}
|
||||
|
||||
- (UIImage*)imageCorrectedForCaptureOrientation
|
||||
{
|
||||
return [self imageCorrectedForCaptureOrientation:[self imageOrientation]];
|
||||
}
|
||||
|
||||
- (UIImage*)imageByScalingNotCroppingForSize:(CGSize)targetSize
|
||||
{
|
||||
UIImage* sourceImage = self;
|
||||
|
||||
Reference in New Issue
Block a user