/// <summary> /// Creates a simple shape. This includes such shapes as lines, rectangles, /// and ovals. /// </summary> /// <param name="anchor">the client anchor describes how this Group is attached /// to the sheet.</param> /// <returns>the newly created shape.</returns> public HSSFSimpleShape CreateSimpleShape(HSSFClientAnchor anchor) { HSSFSimpleShape shape = new HSSFSimpleShape(null, anchor); shape.Anchor = anchor; AddShape(shape); return(shape); }
public void DrawLine(int x1, int y1, int x2, int y2, int width) { HSSFSimpleShape shape = escherGroup.CreateShape(new HSSFChildAnchor(x1, y1, x2, y2)); shape.ShapeType = (HSSFSimpleShape.OBJECT_TYPE_LINE); shape.LineWidth = (width); shape.SetLineStyleColor(foreground.R, foreground.G, foreground.B); }
/// <summary> /// Create a new simple shape Under this Group. /// </summary> /// <param name="anchor">the position of the shape.</param> /// <returns>the shape</returns> public HSSFSimpleShape CreateShape(HSSFChildAnchor anchor) { HSSFSimpleShape shape = new HSSFSimpleShape(this, anchor); shape.Anchor = anchor; shapes.Add(shape); return(shape); }
/** * YK: used to create autofilters * * @see org.apache.poi.hssf.usermodel.HSSFSheet#setAutoFilter(int, int, int, int) */ public HSSFSimpleShape CreateComboBox(HSSFAnchor anchor) { HSSFSimpleShape shape = new HSSFSimpleShape(null, anchor); shape.ShapeType = HSSFSimpleShape.OBJECT_TYPE_COMBO_BOX; shape.Anchor = anchor; AddShape(shape); return(shape); }
public void FillRect(int x, int y, int width, int height) { HSSFSimpleShape shape = escherGroup.CreateShape(new HSSFChildAnchor(x, y, x + width, y + height)); shape.ShapeType = (HSSFSimpleShape.OBJECT_TYPE_RECTANGLE); shape.LineStyle = LineStyle.None; shape.SetFillColor(foreground.R, foreground.G, foreground.B); shape.SetLineStyleColor(foreground.R, foreground.G, foreground.B); }
public void DrawOval(int x, int y, int width, int height) { HSSFSimpleShape shape = escherGroup.CreateShape(new HSSFChildAnchor(x, y, x + width, y + height)); shape.ShapeType = (HSSFSimpleShape.OBJECT_TYPE_OVAL); shape.LineWidth = 0; shape.SetLineStyleColor(foreground.R, foreground.G, foreground.B); shape.IsNoFill = (true); }