←Select platform

MosaicTilesCommand Constructor(int,int,LeadPoint,int,int,ShadowCommandAngle,int,RasterColor,RasterColor,MosaicTilesCommandFlags)

Summary
Initializes a new MosaicTilesCommand with explicit parameters.
Syntax
C#
C++/CLI
Python
public: 
MosaicTilesCommand(  
   int opacity, 
   int penWidth, 
   LeadPoint origin, 
   int tileWidth, 
   int tileHeight, 
   ShadowCommandAngle shadowAngle, 
   int shadowThreshold, 
   RasterColor borderColor, 
   RasterColor tilesColor, 
   MosaicTilesCommandFlags flags 
) 

Parameters

opacity
Value that represents the weight, in percent, given to the image color and the border or tile color when determining the resulting color. For example, if Opacity property is set to 75, then 75 of the image color will be added to 75 of the border (or Tile) color. Final results are clipped if greater than 255. Possible values range from 0 to 100.

penWidth
Value that indicates the width of the pen used to draw tile boundaries, in logical units. Possible values range from 1 to 15. The pen uses the color stored in the BorderColor property.

origin
Point that represents the center of revolution when polar coordinates are used. This property is used if the MosaicTilesCommandFlags.Polar flag is set.

tileWidth
Value that represents the width of the tile. The meaning of the value in the TileWidth property differs according to the flags that are set in the Flags property. Possible values are:

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.

tileHeight
Value that represents the height of the tile. The meaning of the value in the TileHeight property differs according to the flags that are set in the Flags proerty. Possible values are:

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.

shadowAngle
Value that indicates the direction of the light source that produces the shadow. This property is used if the MosaicTilesCommandFlags.ShadowRGB flag or the MosaicTilesCommandFlags.ShadowGray flag is set. Valid values are found in ShadowCommandAngle

shadowThreshold
Value that determines which pixels will be affected by the shadow. Possible values range from 0 through 255. Pixel values less than the threshold value will be unaffected. This member will be used if the MosaicTilesCommandFlags.ShadowRGB flag or the MosaicTilesCommandFlags.ShadowGray flag is set.

borderColor
Represents the transparency fill color for the tile border areas.

tilesColor
Represents the transparency fill color for the tiles.

flags
Indicate whether to use arc-shaped or rectangular-shaped tiles, and what type of shadowing to use, if any.

Example

Run the MosaicTilesCommand on an image.

C#
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, @"ImageProcessingDemo\Image2.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:\LEADTOOLS22\Resources\Images"; 
} 
Requirements

Target Platforms

Help Version 22.0.2023.3.31
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 LEAD Technologies, Inc. All Rights Reserved.

Leadtools.ImageProcessing.SpecialEffects Assembly

Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 LEAD Technologies, Inc. All Rights Reserved.