Skip to content

Commit

Permalink
Fixes for borderColor and contentsScale from pull request #2.
Browse files Browse the repository at this point in the history
Clarify definition of borderColor. Fix implementation of
borderColor. Introduce synthesis of contentsScale.
  • Loading branch information
ivucica committed Jun 7, 2018
1 parent b02b4f6 commit 794a903
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 4 deletions.
7 changes: 7 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
2018-06-07 Ivan Vučica <ivan@vucica.net>

* Headers/QuartzCore/CALayer.h
* Source/CALayer.m:
Clarify definition of borderColor. Fix implementation of
borderColor. Introduce synthesis of contentsScale.

2018-06-07 Ivan Vučica <ivan@vucica.net>

* Headers/QuartzCore/CAAnimation.h
Expand Down
3 changes: 1 addition & 2 deletions Headers/QuartzCore/CALayer.h
Original file line number Diff line number Diff line change
Expand Up @@ -208,8 +208,7 @@ extern NSString *const kCATransition;
- (CGAffineTransform) affineTransform;
- (void) setAffineTransform: (CGAffineTransform)affineTransform;

@property (nonatomic, assign) CGColorRef borderColor;

@property (nonatomic, assign) CGColorRef borderColor; /* retained by CG */
@property (nonatomic, assign) CGFloat contentsScale;
@property (nonatomic, assign) CGFloat anchorPointZ;
@end
Expand Down
6 changes: 4 additions & 2 deletions Source/CALayer.m
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ @implementation CALayer
@synthesize actions=_actions;
@synthesize style=_style;
@synthesize borderColor=_borderColor;
@synthesize contentsScale=_contentsScale;

@synthesize shadowColor=_shadowColor;
@synthesize shadowOffset=_shadowOffset;
Expand Down Expand Up @@ -276,7 +277,7 @@ - (id) init
static NSString * keys[] = {
@"anchorPoint", @"transform", @"sublayerTransform",
@"opacity", @"delegate", @"contentsRect", @"shouldRasterize",
@"backgroundColor", @"borderColor",
@"backgroundColor", @"borderColor", @"contentsScale",

@"beginTime", @"duration", @"speed", @"autoreverses",
@"repeatCount",
Expand Down Expand Up @@ -375,6 +376,7 @@ - (id) initWithLayer: (CALayer*)layer
[self setGeometryFlipped: [layer isGeometryFlipped]];
[self setBackgroundColor: [layer backgroundColor]];
[self setBorderColor: [layer borderColor]];
[self setContentsScale: [layer contentsScale]];
[self setMasksToBounds: [layer masksToBounds]];
[self setContentsRect: [layer contentsRect]];
[self setHidden: [layer isHidden]];
Expand Down Expand Up @@ -1181,7 +1183,7 @@ - (void)setValue: (id)value
}
if ([key isEqualToString: @"borderColor"])
{
[self setborderColor: (CGColorRef)value];
[self setBorderColor: (CGColorRef)value];
return;
}
if ([key isEqualToString: @"shadowColor"])
Expand Down

0 comments on commit 794a903

Please sign in to comment.