session-ios/Session/Signal/ConversationView/Cells/OWSBubbleShapeView.h

43 lines
1.4 KiB
C
Raw Normal View History

2018-06-27 18:44:06 +02:00
//
// Copyright (c) 2018 Open Whisper Systems. All rights reserved.
//
#import "OWSBubbleView.h"
NS_ASSUME_NONNULL_BEGIN
@class OWSBubbleView;
2018-06-27 19:43:29 +02:00
// While rendering message bubbles, we often need to render
// into a subregion of the bubble that reflects the intersection
// of some subview (e.g. a media view) and the bubble shape
// (including its rounding).
//
// This view serves three different roles:
//
// * Drawing: Filling and/or stroking a subregion of the bubble shape.
// * Shadows: Casting a shadow over a subregion of the bubble shape.
// * Clipping: Clipping subviews to subregion of the bubble shape.
2018-06-27 18:44:06 +02:00
@interface OWSBubbleShapeView : UIView <OWSBubbleViewPartner>
@property (nonatomic, nullable) UIColor *fillColor;
@property (nonatomic, nullable) UIColor *strokeColor;
@property (nonatomic) CGFloat strokeThickness;
2018-09-26 22:24:15 +02:00
@property (nonatomic, nullable) UIColor *innerShadowColor;
@property (nonatomic) CGFloat innerShadowRadius;
@property (nonatomic) float innerShadowOpacity;
2018-06-27 18:44:06 +02:00
- (instancetype)init NS_UNAVAILABLE;
2018-09-27 15:52:12 +02:00
- (instancetype)initDraw NS_DESIGNATED_INITIALIZER;
- (instancetype)initShadow NS_DESIGNATED_INITIALIZER;
- (instancetype)initClip NS_DESIGNATED_INITIALIZER;
- (instancetype)initInnerShadowWithColor:(UIColor *)color
radius:(CGFloat)radius
opacity:(float)opacity NS_DESIGNATED_INITIALIZER;
2018-06-27 18:44:06 +02:00
@end
NS_ASSUME_NONNULL_END