Esempio n. 1
0
        /**
         * Constructs a textbox.
         *
         * @param anchor the child anchor describes how this shape is attached
         *               to the group.
         * @return      the newly Created textbox.
         */

        public XSSFTextBox CreateTextbox(XSSFChildAnchor anchor)
        {
            CT_Shape ctShape = ctGroup.AddNewSp();

            ctShape.Set(XSSFSimpleShape.GetPrototype());

            XSSFTextBox shape = new XSSFTextBox(GetDrawing(), ctShape);

            shape.parent = this;
            shape.anchor = anchor;
            shape.GetCTShape().spPr.xfrm = (anchor.GetCTTransform2D());
            return(shape);
        }
Esempio n. 2
0
        /**
         * Creates a simple shape.  This includes such shapes as lines, rectangles,
         * and ovals.
         *
         * @param anchor the child anchor describes how this shape is attached
         *               to the group.
         * @return the newly Created shape.
         */

        public XSSFConnector CreateConnector(XSSFChildAnchor anchor)
        {
            CT_Connector ctShape = ctGroup.AddNewCxnSp();

            ctShape.Set(XSSFConnector.Prototype());

            XSSFConnector shape = new XSSFConnector(GetDrawing(), ctShape);

            shape.parent = this;
            shape.anchor = anchor;
            shape.GetCTConnector().spPr.xfrm = (anchor.GetCTTransform2D());
            return(shape);
        }