Skip to content

Commit

Permalink
Merge pull request #2102 from msfeldstein/master
Browse files Browse the repository at this point in the history
Update to use NS_ENUM
  • Loading branch information
BradLarson committed Apr 3, 2016
2 parents 65b0176 + ebd035b commit 816dd18
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 4 deletions.
2 changes: 1 addition & 1 deletion build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

set -e

IOSSDK_VER="7.0"
IOSSDK_VER="9.0"

# xcodebuild -showsdks

Expand Down
11 changes: 10 additions & 1 deletion framework/Source/iOS/GPUImageContext.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,16 @@

#define GPUImageRotationSwapsWidthAndHeight(rotation) ((rotation) == kGPUImageRotateLeft || (rotation) == kGPUImageRotateRight || (rotation) == kGPUImageRotateRightFlipVertical || (rotation) == kGPUImageRotateRightFlipHorizontal)

typedef enum { kGPUImageNoRotation, kGPUImageRotateLeft, kGPUImageRotateRight, kGPUImageFlipVertical, kGPUImageFlipHorizonal, kGPUImageRotateRightFlipVertical, kGPUImageRotateRightFlipHorizontal, kGPUImageRotate180 } GPUImageRotationMode;
typedef NS_ENUM(NSUInteger, GPUImageRotationMode) {
kGPUImageNoRotation,
kGPUImageRotateLeft,
kGPUImageRotateRight,
kGPUImageFlipVertical,
kGPUImageFlipHorizonal,
kGPUImageRotateRightFlipVertical,
kGPUImageRotateRightFlipHorizontal,
kGPUImageRotate180
};

@interface GPUImageContext : NSObject

Expand Down
6 changes: 4 additions & 2 deletions framework/Source/iOS/GPUImageView.h
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
#import <UIKit/UIKit.h>
#import "GPUImageContext.h"

typedef enum {
typedef NS_ENUM(NSUInteger, GPUImageFillModeType) {
kGPUImageFillModeStretch, // Stretch to fill the full view, which may distort the image outside of its normal aspect ratio
kGPUImageFillModePreserveAspectRatio, // Maintains the aspect ratio of the source image, adding bars of the specified background color
kGPUImageFillModePreserveAspectRatioAndFill // Maintains the aspect ratio of the source image, zooming in on its center to fill the view
} GPUImageFillModeType;
};



/**
UIView subclass to use as an endpoint for displaying GPUImage outputs
Expand Down

0 comments on commit 816dd18

Please sign in to comment.