Esempio n. 1
0
        public static void Configure(this TransparentControl view, FigmaElipse elipse)
        {
            Configure(view, (FigmaVectorEntity)elipse);

            //var circleLayer = new CAShapeLayer();
            //var bezierPath = NSBezierPath.FromOvalInRect(new CGRect(0, 0, elipse.absoluteBoundingBox.width, elipse.absoluteBoundingBox.height));
            //circleLayer.Path = bezierPath.ToGCPath();

            //view.Layer.AddSublayer(circleLayer);

            //var fills = elipse.fills.OfType<FigmaPaint>().FirstOrDefault();
            //if (fills != null)
            //{
            //    circleLayer.FillColor = fills.color.ToNSColor().CGColor;
            //}

            //var strokes = elipse.strokes.FirstOrDefault();
            //if (strokes != null)
            //{
            //    if (strokes.color != null)
            //    {
            //        circleLayer.BorderColor = strokes.color.ToNSColor().CGColor;
            //    }
            //}
        }
Esempio n. 2
0
        public static void Configure(this TransparentControl view, FigmaVectorEntity child)
        {
            Configure(view, (FigmaNode)child);

            if (child.HasFills && child.fills[0].color != null)
            {
                view.BackColor = child.fills[0].color.ToColor();
            }

            //var currengroupView = new NSView() { TranslatesAutoresizingMaskIntoConstraints = false };
            //currengroupView.Configure(rectangleVector);

            var strokes = child.strokes.FirstOrDefault();

            if (strokes != null)
            {
                //if (strokes.color != null) {
                //    view .BorderColor = strokes.color.ToNSColor ().CGColor;
                //}
                //view.Layer.BorderWidth = child.strokeWeight;
            }
        }
Esempio n. 3
0
        public static void Configure(this TransparentControl view, FigmaRectangleVector child)
        {
            Configure(view, (FigmaVectorEntity)child);

            //view.Layer.CornerRadius = child.cornerRadius;
        }
Esempio n. 4
0
 public static void Configure(this TransparentControl view, FigmaFrameEntity child)
 {
     Configure(view, (FigmaNode)child);
     view.Opacity   = child.opacity;
     view.BackColor = FigmaExtensions.ToColor(child.backgroundColor);
 }