using System.IO;
using ImageGear.Formats;
using ImageGear.Formats.CAD;
publicstaticvoid CameraRoll(string path, double angle)
{
ImGearCADPage page = null;
// Load the file.
using (FileStream fileStream = new FileStream(path, FileMode.Open, FileAccess.Read))
{
page = (ImGearCADPage)ImGearFileFormats.LoadPage(fileStream);
}
// Roll the camera
page.Camera.Roll(angle);
}
VB.NET
Copy Code
Imports System.IO
Imports ImageGear.Formats
Imports ImageGear.Formats.CAD
Public Sub CameraRoll(path As String, angle As Double)
Dim page As ImGearCADPage
' Load the file.
Using fileStream As New FileStream(path, FileMode.Open, FileAccess.Read)
page = ImGearFileFormats.LoadPage(fileStream)
End Using
' Roll the camera
page.Camera.Roll(angle)
End Sub
The roll function can also be called without providing a position. This will cause the image to roll around the forward axis at the center point of the view.