Leadtools.ImageProcessing.SpecialEffects Namespace > MosaicTilesCommand Class > MosaicTilesCommand Constructor : MosaicTilesCommand Constructor(Int32,Int32,LeadPoint,Int32,Int32,ShadowCommandAngle,Int32,RasterColor,RasterColor,MosaicTilesCommandFlags) |
If Flags property contains: | Then, the TileWidth property contains: | And the range of possible values for the TileWidth property is: |
MosaicTilesCommandFlags.Cartesian | The width of each rectangular tile, in pixels. | 1 to the image width, if there is no region. If there is a region, then the range of values is from 1 to the region width. |
MosaicTilesCommandFlags.Polar | The size, in degrees, of the curve in the arc-shaped tiles. That is, the circle around the Origin is divided into tiles of TileWidth degrees. | 1 to 360. The circle can be divided into tiles from 1 degree to 360 degrees. |
If the Flags property contains: | Then, the TileHeight property contains: | And the range of possible values for the TileHeight property is: |
MosaicTilesCommandFlags.Cartesian | The height of each rectangular tile, in pixels. | 1 to the image height, if there is no region. If there is a region, then the range of values is from 1 to the region height. |
MosaicTilesCommandFlags.Polar | The radial length of each arc-shaped tile, in pixels. | 1 to the diagonal of the image, if there is no region. If there is a region, then the range of values is from 1 to the diagonal of the region rectangle. |
public MosaicTilesCommand( int opacity, int penWidth, LeadPoint origin, int tileWidth, int tileHeight, ShadowCommandAngle shadowAngle, int shadowThreshold, RasterColor borderColor, RasterColor tilesColor, MosaicTilesCommandFlags flags )
'Declaration Public Function New( _ ByVal opacity As Integer, _ ByVal penWidth As Integer, _ ByVal origin As LeadPoint, _ ByVal tileWidth As Integer, _ ByVal tileHeight As Integer, _ ByVal shadowAngle As ShadowCommandAngle, _ ByVal shadowThreshold As Integer, _ ByVal borderColor As RasterColor, _ ByVal tilesColor As RasterColor, _ ByVal flags As MosaicTilesCommandFlags _ )
'Usage Dim opacity As Integer Dim penWidth As Integer Dim origin As LeadPoint Dim tileWidth As Integer Dim tileHeight As Integer Dim shadowAngle As ShadowCommandAngle Dim shadowThreshold As Integer Dim borderColor As RasterColor Dim tilesColor As RasterColor Dim flags As MosaicTilesCommandFlags Dim instance As New MosaicTilesCommand(opacity, penWidth, origin, tileWidth, tileHeight, shadowAngle, shadowThreshold, borderColor, tilesColor, flags)
public MosaicTilesCommand( int opacity, int penWidth, LeadPoint origin, int tileWidth, int tileHeight, ShadowCommandAngle shadowAngle, int shadowThreshold, RasterColor borderColor, RasterColor tilesColor, MosaicTilesCommandFlags flags )
function MosaicTilesCommand( opacity , penWidth , origin , tileWidth , tileHeight , shadowAngle , shadowThreshold , borderColor , tilesColor , flags )
public: MosaicTilesCommand( int opacity, int penWidth, LeadPoint origin, int tileWidth, int tileHeight, ShadowCommandAngle shadowAngle, int shadowThreshold, RasterColor borderColor, RasterColor tilesColor, MosaicTilesCommandFlags flags )
If Flags property contains: | Then, the TileWidth property contains: | And the range of possible values for the TileWidth property is: |
MosaicTilesCommandFlags.Cartesian | The width of each rectangular tile, in pixels. | 1 to the image width, if there is no region. If there is a region, then the range of values is from 1 to the region width. |
MosaicTilesCommandFlags.Polar | The size, in degrees, of the curve in the arc-shaped tiles. That is, the circle around the Origin is divided into tiles of TileWidth degrees. | 1 to 360. The circle can be divided into tiles from 1 degree to 360 degrees. |
If the Flags property contains: | Then, the TileHeight property contains: | And the range of possible values for the TileHeight property is: |
MosaicTilesCommandFlags.Cartesian | The height of each rectangular tile, in pixels. | 1 to the image height, if there is no region. If there is a region, then the range of values is from 1 to the region height. |
MosaicTilesCommandFlags.Polar | The radial length of each arc-shaped tile, in pixels. | 1 to the diagonal of the image, if there is no region. If there is a region, then the range of values is from 1 to the diagonal of the region rectangle. |
Imports Leadtools Imports Leadtools.Codecs Imports Leadtools.ImageProcessing.SpecialEffects Public Sub MosaicTilesConstructorExample_S2() Dim codecs As New RasterCodecs() codecs.ThrowExceptionsOnInvalidImages = True Dim leadImage As RasterImage = codecs.Load(Path.Combine(LEAD_VARS.ImagesDir, "Master.jpg")) ' Prepare the command Dim command As MosaicTilesCommand = New MosaicTilesCommand(50, 7, New LeadPoint(leadImage.Width \ 2, leadImage.Height \ 2), 50, 50, ShadowCommandAngle.East, 50, New RasterColor(0, 0, 0), New RasterColor(255, 255, 255), MosaicTilesCommandFlags.Polar Or MosaicTilesCommandFlags.ShadowGray) command.Run(leadImage) codecs.Save(leadImage, Path.Combine(LEAD_VARS.ImagesDir, "Result.jpg"), RasterImageFormat.Jpeg, 24) End Sub Public NotInheritable Class LEAD_VARS Public Const ImagesDir As String = "C:\Users\Public\Documents\LEADTOOLS Images" End Class
using Leadtools; using Leadtools.Codecs; using Leadtools.ImageProcessing.SpecialEffects; public void MosaicTilesConstructorExample_S2() { // Load an image RasterCodecs codecs = new RasterCodecs(); codecs.ThrowExceptionsOnInvalidImages = true; RasterImage image = codecs.Load(Path.Combine(LEAD_VARS.ImagesDir, "Master.jpg")); // Prepare the command MosaicTilesCommand command = new MosaicTilesCommand(50, 7, new LeadPoint((image.Width/2),(image.Height/2)), 50, 50, ShadowCommandAngle.East, 50, new RasterColor(0,0,0), new RasterColor(255,255,255), MosaicTilesCommandFlags.Polar | MosaicTilesCommandFlags.ShadowGray); command.Run(image); codecs.Save(image, Path.Combine(LEAD_VARS.ImagesDir, "Result.jpg"), RasterImageFormat.Jpeg, 24); } static class LEAD_VARS { public const string ImagesDir = @"C:\Users\Public\Documents\LEADTOOLS Images"; }