Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
Instance Methods | List of all members
FlutterPathClipView Class Reference
Inheritance diagram for FlutterPathClipView:

Instance Methods

(instancetype) - initWithFrame: [implementation]
 
(BOOL- isFlipped [implementation]
 
(NSView *) - hitTest: [implementation]
 
(void) - maskToPath:withOrigin: [implementation]
 

Detailed Description

View that clips that content to a specific CGPathRef. Clipping is done through a CAShapeLayer mask, which avoids the need to rasterize the mask.

Definition at line 142 of file FlutterMutatorView.mm.

Method Documentation

◆ hitTest:

- (NSView *) hitTest: (NSPoint)  point
implementation

Definition at line 114 of file FlutterMutatorView.mm.

162 :(NSPoint)point {
163 NSView* res = [super hitTest:point];
164 return res != self ? res : nil;
165}

◆ initWithFrame:

- (instancetype) initWithFrame: (NSRect)  frameRect
implementation

Definition at line 114 of file FlutterMutatorView.mm.

148 :(NSRect)frameRect {
149 if (self = [super initWithFrame:frameRect]) {
150 self.wantsLayer = YES;
151 }
152 return self;
153}
instancetype initWithFrame

◆ isFlipped

- (BOOL) isFlipped
implementation

Definition at line 114 of file FlutterMutatorView.mm.

155 {
156 // Flutter transforms assume a coordinate system with an upper-left corner origin, with y
157 // coordinate values increasing downwards. This affects the view, view transforms, and
158 // sublayerTransforms.
159 return YES;
160}

◆ maskToPath:withOrigin:

- (void) maskToPath: (CGPathRef)  path
withOrigin: (CGPoint)  origin 
implementation

Clip the view to the given path. Offset top left corner of platform view in global logical coordinates.

Definition at line 114 of file FlutterMutatorView.mm.

169 :(CGPathRef)path withOrigin:(CGPoint)origin {
170 CAShapeLayer* maskLayer = self.layer.mask;
171 if (maskLayer == nil) {
172 maskLayer = [CAShapeLayer layer];
173 self.layer.mask = maskLayer;
174 }
175 maskLayer.path = path;
176 maskLayer.transform = CATransform3DMakeTranslation(-origin.x, -origin.y, 0);
177}
DEF_SWITCHES_START aot vmservice shared library Name of the *so containing AOT compiled Dart assets for launching the service isolate vm snapshot The VM snapshot data that will be memory mapped as read only SnapshotAssetPath must be present isolate snapshot The isolate snapshot data that will be memory mapped as read only SnapshotAssetPath must be present cache dir path
Definition switches.h:57

The documentation for this class was generated from the following file: