public static void Generate(string pluginPath, out Image bmp, Size size, PicFilter filter)
        {
            // instantiate factory
            PicFactory factory = new PicFactory();

            factory.Clear();

            // instantiate plugin
            Pic.Plugin.PluginServices pluginHost = new Pic.Plugin.PluginServices(pluginPath);
            IPlugin plugin = pluginHost.GetFirstPlugin();

            // generate entities
            ParameterStack stack = plugin.Parameters;

            plugin.CreateFactoryEntities(factory, stack);

            // get bounding box
            PicVisitorBoundingBox visitor = new PicVisitorBoundingBox();

            factory.ProcessVisitor(visitor);

            // draw image
            PicGraphicsImage picImage = new PicGraphicsImage();

            picImage.ImageSize = size;
            PicBox2D box = visitor.Box;

            box.AddMarginRatio(0.05);
            picImage.DrawingBox = box;
            factory.Draw(picImage, filter);

            bmp = picImage.Bitmap;
        }
        public static void Generate(string pluginPath, out Image bmp, Size size, PicFilter filter)
        {
            // instantiate factory
            PicFactory factory = new PicFactory();
            factory.Clear();

            // instantiate plugin
            Pic.Plugin.PluginServices pluginHost = new Pic.Plugin.PluginServices(pluginPath);
            IPlugin plugin = pluginHost.GetFirstPlugin();

            // generate entities
            ParameterStack stack = plugin.Parameters;
            plugin.CreateFactoryEntities(factory, stack);

            // get bounding box
            PicVisitorBoundingBox visitor = new PicVisitorBoundingBox();
            factory.ProcessVisitor(visitor);

            // draw image
            PicGraphicsImage picImage = new PicGraphicsImage();
            picImage.ImageSize = size;
            PicBox2D box = visitor.Box;
            box.AddMarginRatio(0.05);
            picImage.DrawingBox = box;
            factory.Draw(picImage, filter);

            bmp = picImage.Bitmap;
        }