请参考以下代码:- FarPoint.Win.Picture p = new Picture(Image.FromFile(@"C:\TEST.JPG"));
- p.Style = RenderStyle.Stretch;
- FarPoint.Win.Spread.DrawingSpace.RectangleShape rShape = new FarPoint.Win.Spread.DrawingSpace.RectangleShape();
- rShape.Name = "myRect1";
- rShape.BackgroundImage = p;
- rShape.Location = new Point(20, 60);
- rShape.Width = 100;
- rShape.Height = 100;
- fpSpread1.ActiveSheet.AddShape(rShape);
复制代码 |