예제 #1
0
        private Image ConvertShapeToImage(ShapeObject obj)
        {
            Document doc     = new Document();
            Section  section = doc.AddSection();

            section.AddParagraph().ChildObjects.Add(obj.Clone());
            MemoryStream ms = new MemoryStream();

            doc.SaveToStream(ms, FileFormat.Docx);
            doc.LoadFromStream(ms, FileFormat.Docx);
            Image image = doc.SaveToImages(0, ImageType.Bitmap);

            ms.Close();
            doc.Close();
            return(CutImageWhitePart(image as Bitmap, 1));
        }
예제 #2
0
    // Use this for initialization
    void Start()
    {
        Vector3[]   pts = initShape1();
        Polygon     pg  = new Polygon(pts);
        ShapeObject pgo = ShapeObject.CreatePolygon(pts);
        Form        f   = pg.ExtrudeToForm(new Vector3(0, 40, 0));

        ShapeObject rf = ShapeObject.CreateMeshable(f);

        rf.name = "rf";

        //ShapeObject so = ShapeObject.CreateMeshable((Meshable)f.Clone());
        ShapeObject so = rf.Clone();

        //so.PivotMirror(0);
        so.PivotTurn(2);
    }