xlsgen > overview > Effects |
In XLSX files (and their variants), Excel has the capability to store information related to drawing effects such as reflection, shadow and others.
xlsgen supports the entire set of effects, exposed in the object model and made easy to use in a client application.
Effects include the following individual effects :
For advanced needs, each effect has at least one parameter.
Importantly, effects can be combined so a drawing can have a reflection effect, soft edges and other effects.
Effects apply to :
There are 12 predefined effects combining a number (often 3) of individual effects.
Java code |
XlsVectorShape sp1 = worksheet.NewVectorShape(xlsgen.vectorshapetypeEllipse, 4, //row1 2, //col1 8, //row2 4, //col2 0, 0, 0, 0); sp1.putLabel("effect #10"); sp1.getPatterns().getArea().getPattern().putBackgroundColor(0xA0A0FF); sp1.getPatterns().getEffect().putPredefined(xlsgen.predefinedeffect_10); |
VB code |
Dim sp1 As IXlsVectorShape Set sp1 = worksheet.NewVectorShape(enumVectorShape.vectorshapetypeEllipse, _ 4, _ 'row1 2, _ 'col1 8, _ 'row2 4, _ 'col2 0, 0, 0, 0) sp1.Label = "effect #10" sp1.Patterns.Area.Pattern.BackgroundColor = &HA0A0FF sp1.Patterns.Effect.Predefined = enumPredefinedEffect.predefinedeffect_10 |
C# code |
IXlsVectorShape sp1 = worksheet.NewVectorShape(enumVectorShape.vectorshapetypeEllipse, 4, //row1 2, //col1 8, //row2 4, //col2 0, 0, 0, 0); sp1.Label = "effect #10"; sp1.Patterns.Area.Pattern.BackgroundColor = 0xA0A0FF; sp1.Patterns.Effect.Predefined = enumPredefinedEffect.predefinedeffect_10; |
C++ code |
xlsgen::IXlsVectorShapePtr sp1 = worksheet->NewVectorShape(xlsgen::vectorshapetypeEllipse, 4, //row1 2, //col1 8, //row2 4, //col2 0, 0, 0, 0); sp1->Label = L"effect #10"; sp1->Patterns->Area->Pattern->BackgroundColor = 0xA0A0FF; sp1->Patterns->Effect->Predefined = xlsgen::predefinedeffect_10; |
Using predefined effects as opposed to custom individual effects is a matter of choosing between applying an effect with no effort (just one line of code) and taking the time to polish one or more individual effects.
The parameters are :
Java code |
XlsPicture picture1 = worksheet.getPictures().Add( "input\\gkn.gif" ); picture1.putLeftColumn(10); picture1.putTopCell(2); picture1.getEffect().getGlow().putStrength(10); |
VB code |
Dim picture1 As IXlsPicture Set picture1 = worksheet.Pictures.Add( "input\\gkn.gif" ) picture1.LeftColumn = 10 picture1.TopCell = 2 picture1.Effect.Glow.Strength = 10 |
C# code |
IXlsPicture picture1 = worksheet.Pictures.Add( "input\\gkn.gif" ); picture1.LeftColumn = 10; picture1.TopCell = 2; picture1.Effect.Glow.Strength = 10; |
C++ code |
xlsgen::IXlsPicturePtr picture1 = worksheet->Pictures->Add( L"input\\mypicture.gif" ); picture1->LeftColumn = 10; picture1->TopCell = 2; picture1->Effect->Glow->Strength = 10; |
The parameters are :
The parameters are :
Use one of the predefined reflections to avoid setting custom reflection parameters.
The parameters are :
Use one of the predefined shadows to avoid setting custom shadow parameters.
The parameters are :
Use one of the predefined soft edges to avoid setting the custom edges parameter.
The parameters are :
Use one of the predefined material to avoid setting custom material parameters.
The parameters are :
Use one of the predefined camera to avoid setting custom camera parameters.
xlsgen documentation. © ARsT Design all rights reserved.