Beispiel #1
0
        public static void LoadFigmaFromFilePath(this NSView contentView, string filePath, out List <FigmaImageView> figmaImageViews, string viewName = null, string nodeName = null)
        {
            figmaImageViews = new List <FigmaImageView>();
            var figmaDialog = FigmaHelper.GetFigmaDialogFromFilePath(filePath, viewName, nodeName);

            LoadFigmaFromFrameEntity(contentView, figmaDialog, figmaImageViews, viewName, nodeName);
        }
Beispiel #2
0
        public static void LoadFigmaFromFilePath(this NSWindow window, string filePath, out List <FigmaImageView> figmaImageViews, string viewName = null, string nodeName = null)
        {
            figmaImageViews = new List <FigmaImageView>();
            var figmaDialog = FigmaHelper.GetFigmaDialogFromFilePath(filePath, viewName, nodeName);
            var boundingBox = figmaDialog.absoluteBoundingBox;

            if (boundingBox != null)
            {
                window.SetFrame(new CGRect(window.Frame.X, window.Frame.Y, boundingBox.width, boundingBox.height), true);
            }
            LoadFigma(window.ContentView, new FigmaFrameEntityResponse(filePath, figmaDialog), figmaImageViews);
        }