ImageGear .NET v25.0 - Updated
WarpSphere Method
Example 




ImageGear.Processing.Advanced Assembly > ImageGear.Processing Namespace > ImGearEffects Class : WarpSphere Method
Page class object.
Center of the sphere in pixels.
Sphere radius in pixels.
Height of the sphere segment in pixels. Height can be changed from (-radius) to (radius).
If this parameter is true then an interpolation is used during processing.
ImageGear.Core.ImGearPixel class color.
This method provides warping around sphere on the current raster page.
Syntax
'Declaration
 
Public Shared Sub WarpSphere( _
   ByVal page As ImGearRasterPage, _
   ByVal center As ImGearPoint, _
   ByVal radius As Integer, _
   ByVal height As Integer, _
   ByVal interpolate As Boolean, _
   ByVal color As ImGearPixel _
) 
'Usage
 
Dim page As ImGearRasterPage
Dim center As ImGearPoint
Dim radius As Integer
Dim height As Integer
Dim interpolate As Boolean
Dim color As ImGearPixel
 
ImGearEffects.WarpSphere(page, center, radius, height, interpolate, color)
public static void WarpSphere( 
   ImGearRasterPage page,
   ImGearPoint center,
   int radius,
   int height,
   bool interpolate,
   ImGearPixel color
)
public: static void WarpSphere( 
   ImGearRasterPage* page,
   ImGearPoint center,
   int radius,
   int height,
   bool interpolate,
   ImGearPixel* color
) 
public:
static void WarpSphere( 
   ImGearRasterPage^ page,
   ImGearPoint center,
   int radius,
   int height,
   bool interpolate,
   ImGearPixel^ color
) 

Parameters

page
Page class object.
center
Center of the sphere in pixels.
radius
Sphere radius in pixels.
height
Height of the sphere segment in pixels. Height can be changed from (-radius) to (radius).
interpolate
If this parameter is true then an interpolation is used during processing.
color
ImageGear.Core.ImGearPixel class color.
Example
// Warp the image around a sphere.

// Center point of the sphere, set to center of image.
ImGearPoint igPoint = new ImGearPoint();
igPoint.X = igRasterPage.DIB.Width / 2;
igPoint.Y = igRasterPage.DIB.Height / 2;

// Warp around the sphere with a radius of 200, height of -100, interpolation on, and no fill color.
ImGearEffects.WarpSphere(igRasterPage, igPoint, 200, -100, true, null);
' Warp the image around a sphere.

' Center point of the sphere, set to center of image.
Dim igPoint As New ImGearPoint()
igPoint.X = igRasterPage.DIB.Width / 2
igPoint.Y = igRasterPage.DIB.Height / 2

' Warp around the sphere with a radius of 200, height of -100, interpolation on, and no fill color.
ImGearEffects.WarpSphere(igRasterPage, igPoint, 200, -100, True, Nothing)
See Also

Reference

ImGearEffects Class
ImGearEffects Members
ImGearRasterPage Class
ImGearPoint Structure