The following examples show the effect of a Twirl applied with
a number of different settings.
[C#]
void function() {
using (Doc doc = new Doc()) {
AddImagePage(doc, img3); // original image
doc.Rendering.Save("EffectTwirl.jpg");
using (ImageLayer layer = AddImagePage(doc, img3)) {
using (EffectOperation effect = new EffectOperation("Twirl")) {
effect.Apply(layer.PixMap);
}
}
doc.Rendering.Save("EffectTwirlDefault.jpg");
using (ImageLayer layer = AddImagePage(doc, img3)) {
using (EffectOperation effect = new EffectOperation("Twirl")) {
effect.Parameters["Angle"].Value = 360;
effect.Apply(layer.PixMap);
}
}
doc.Rendering.Save("EffectTwirlAngle360.jpg");
using (ImageLayer layer = AddImagePage(doc, img3)) {
using (EffectOperation effect = new EffectOperation("Twirl")) {
effect.Parameters["Extent"].Value = 100;
effect.Apply(layer.PixMap);
}
}
doc.Rendering.Save("EffectTwirlExtent100.jpg");
}
}
[Visual Basic]
Sub ...
Using doc As New Doc()
AddImagePage(doc, img3)
' original image
doc.Rendering.Save("EffectTwirl.jpg")
Using layer As ImageLayer = AddImagePage(doc, img3)
Using effect As New EffectOperation("Twirl")
effect.Apply(layer.PixMap)
End Using
End Using
doc.Rendering.Save("EffectTwirlDefault.jpg")
Using layer As ImageLayer = AddImagePage(doc, img3)
Using effect As New EffectOperation("Twirl")
effect.Parameters("Angle").Value = 360
effect.Apply(layer.PixMap)
End Using
End Using
doc.Rendering.Save("EffectTwirlAngle360.jpg")
Using layer As ImageLayer = AddImagePage(doc, img3)
Using effect As New EffectOperation("Twirl")
effect.Parameters("Extent").Value = 100
effect.Apply(layer.PixMap)
End Using
End Using
doc.Rendering.Save("EffectTwirlExtent100.jpg")
End Using
End Sub
Original Image before Twirl
After Twirl with default settings
Angle = 360
Extent = 100
|