@@ -27,7 +27,7 @@ public static class ShapesAndImagesSample
27
27
public static void Run ( )
28
28
{
29
29
//The output package
30
- var outputFile = FileOutputUtil . GetFileInfo ( "14-ShapesAndImages.xlsx" ) ;
30
+ var outputFile = FileUtil . GetCleanFileInfo ( "14-ShapesAndImages.xlsx" ) ;
31
31
32
32
//Create the template...
33
33
using ( ExcelPackage package = new ExcelPackage ( outputFile ) )
@@ -44,25 +44,25 @@ private static void PictureSample(ExcelPackage package)
44
44
var ws = package . Workbook . Worksheets . Add ( "Picture" ) ;
45
45
46
46
//Add an jpg image and apply some effects.
47
- var pic = ws . Drawings . AddPicture ( "Landscape" , FileInputUtil . GetFileInfo ( "14-ShapesAndImages" , "LandscapeView.jpg" ) ) ;
47
+ var pic = ws . Drawings . AddPicture ( "Landscape" , FileUtil . GetFileInfo ( "14-ShapesAndImages" , "LandscapeView.jpg" ) ) ;
48
48
pic . SetPosition ( 2 , 0 , 1 , 0 ) ;
49
49
pic . Effect . SetPresetShadow ( ePresetExcelShadowType . OuterBottomRight ) ;
50
50
pic . Effect . OuterShadow . Distance = 10 ;
51
51
pic . Effect . SetPresetSoftEdges ( ePresetExcelSoftEdgesType . SoftEdge5Pt ) ;
52
52
53
53
//Add the same image, but with 25 percent of the size. Let the position be absolute.
54
- pic = ws . Drawings . AddPicture ( "LandscapeSmall" , FileInputUtil . GetFileInfo ( "14-ShapesAndImages" , "LandscapeView.jpg" ) ) ;
54
+ pic = ws . Drawings . AddPicture ( "LandscapeSmall" , FileUtil . GetFileInfo ( "14-ShapesAndImages" , "LandscapeView.jpg" ) ) ;
55
55
pic . SetPosition ( 2 , 0 , 16 , 0 ) ;
56
56
pic . SetSize ( 25 ) ; //25%
57
57
pic . ChangeCellAnchor ( eEditAs . Absolute ) ;
58
58
59
59
//Add the same image again, but let the picture move and resize when rows and colums are resized.
60
- pic = ws . Drawings . AddPicture ( "LandscapeMoveAndResize" , FileInputUtil . GetFileInfo ( "14-ShapesAndImages" , "LandscapeView.jpg" ) ) ;
60
+ pic = ws . Drawings . AddPicture ( "LandscapeMoveAndResize" , FileUtil . GetFileInfo ( "14-ShapesAndImages" , "LandscapeView.jpg" ) ) ;
61
61
pic . SetPosition ( 30 , 0 , 16 , 0 ) ;
62
62
pic . ChangeCellAnchor ( eEditAs . TwoCell ) ;
63
63
64
64
//Add the image overlapping the first image, but make sure it is behind
65
- pic = ws . Drawings . AddPicture ( "LandscapeSendToBack" , FileInputUtil . GetFileInfo ( "14-ShapesAndImages" , "LandscapeView.jpg" ) ) ;
65
+ pic = ws . Drawings . AddPicture ( "LandscapeSendToBack" , FileUtil . GetFileInfo ( "14-ShapesAndImages" , "LandscapeView.jpg" ) ) ;
66
66
pic . SetPosition ( 8 , 0 , 8 , 0 ) ;
67
67
pic . SetSize ( 25 ) ; //25%
68
68
pic . SendToBack ( ) ;
@@ -112,7 +112,7 @@ private static void FillAndColorSamples(ExcelPackage package)
112
112
drawing . SetSize ( 250 , 250 ) ;
113
113
drawing . Fill . Style = eFillStyle . BlipFill ;
114
114
115
- var image = new Bitmap ( FileInputUtil . GetFileInfo ( "14-ShapesAndImages" , "EPPlusLogo.jpg" ) . FullName ) ;
115
+ var image = new Bitmap ( FileUtil . GetFileInfo ( "14-ShapesAndImages" , "EPPlusLogo.jpg" ) . FullName ) ;
116
116
drawing . Fill . BlipFill . Image = image ;
117
117
drawing . Fill . BlipFill . Stretch = true ;
118
118
drawing . Text = "Blip Fill" ;
0 commit comments