Skip to content

Commit

Permalink
Handle orientation changes
Browse files Browse the repository at this point in the history
  • Loading branch information
jjxtra committed Jul 19, 2013
1 parent 8986763 commit 96c454e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
5 changes: 3 additions & 2 deletions framework/Source/GPUImageGaussianBlurPositionFilter.m
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,7 @@ - (void)setInputSize:(CGSize)newSize atIndex:(NSInteger)textureIndex;
- (void)setInputRotation:(GPUImageRotationMode)newInputRotation atIndex:(NSInteger)textureIndex;
{
[super setInputRotation:newInputRotation atIndex:textureIndex];
[self setBlurCenter:self.blurCenter];
[self adjustAspectRatio];
}

Expand All @@ -210,8 +211,8 @@ - (void)setBlurSize:(CGFloat)newValue;
- (void) setBlurCenter:(CGPoint)blurCenter;
{
_blurCenter = blurCenter;

[self setPoint:_blurCenter forUniform:blurCenterUniform program:secondFilterProgram];
CGPoint rotatedPoint = [self rotatedPoint:blurCenter forRotation:inputRotation];
[self setPoint:rotatedPoint forUniform:blurCenterUniform program:secondFilterProgram];
}

- (void) setBlurRadius:(CGFloat)blurRadius;
Expand Down
4 changes: 2 additions & 2 deletions framework/Source/GPUImagePixellatePositionFilter.m
Original file line number Diff line number Diff line change
Expand Up @@ -180,8 +180,8 @@ - (void)setAspectRatio:(CGFloat)newValue;
- (void)setCenter:(CGPoint)center
{
_center = center;

[self setPoint:_center forUniform:centerUniform program:filterProgram];
CGPoint rotatedPoint = [self rotatedPoint:center forRotation:inputRotation];
[self setPoint:rotatedPoint forUniform:centerUniform program:filterProgram];
}

- (void)setRadius:(CGFloat)radius
Expand Down

0 comments on commit 96c454e

Please sign in to comment.