Visual Basic (Declaration) | |
---|---|
Public Class DiceEffectCommandBitmapEffect Inherits RasterCommandBitmapEffect |
Visual Basic (Usage) | Copy Code |
---|---|
|
C# | |
---|---|
public class DiceEffectCommandBitmapEffect : RasterCommandBitmapEffect |
Managed Extensions for C++ | |
---|---|
public __gc class DiceEffectCommandBitmapEffect : public RasterCommandBitmapEffect |
C++/CLI | |
---|---|
public ref class DiceEffectCommandBitmapEffect : public RasterCommandBitmapEffect |
This command can process the whole image or a region of the image. If the image has a region, the effect is applied only to the region. This command divides the image into a certain number of blocks according to the Flags property. If the DiceEffectCommandBitmapEffectsFlags.Size flag is set then the image will be divided into blocks according to the width and height for each block. The width and height are set in the XBlock and YBlock properties. If the DiceEffectCommandBitmapEffectsFlags.Count flag is set then the image is divided into blocks according to the number of blocks per row and number of blocks per column. These values are also set in the XBlock and YBlock properties. The DiceEffectCommandBitmapEffectsFlags.Count flag or DiceEffectCommandBitmapEffectsFlags.Size flag (but not both) must be set. If the DiceEffectCommandBitmapEffectsFlags.Border flag is also set, borders will be drawn around the dice blocks and it will be painted using the BorderColor property. If the DiceEffectCommandBitmapEffectsFlags.ResizeImage flag is set then the image will be resized so that all blocks have the same size and so there is no remainder in the image, ensuring that all blocks in the image will be manipulated in the same way. If the DiceEffectCommandBitmapEffectsFlags.ResizeImage flag is not set then the edge blocks (which may be a different size than the inner blocks) will be treated differently than the inner blocks. The Dice effect command works in the following manner: It divides the image into a certain number of blocks. If the DiceEffectCommandBitmapEffectsFlags.ResizeImage flag is set, the image is resized to the closest size to have the edge blocks have the same size as the inner blocks. If the DiceEffectCommandBitmapEffectsFlags.ResizeImage flag is not set, then the inner blocks might have a different size and shape than the edge blocks. Each block is transformed according to its shape. For each block, a rotation angle is picked at random out of the following values: 0, 90, 180, and 270. The rotation angle is applied depending on the block shape (square or rectangular): If the block is square, it is rotated by the rotation angle. If the block is rectangular, it is transformed as follows: If the rotation angle is 0, the block remains unchanged. If the rotation angle is 90, the block is flipped around the x-axis. If the angle is 180, the block is rotated by 180. If the angle is 270, the block is flipped around the y-axis. If the DiceEffectCommandBitmapEffectsFlags.Border flag is set, the command draws borders around the blocks. The starting point (or "randomize value") for the random number generator is set in the Randomize property. If the randomize value is zero then the command itself selects a random value between 1 and 500 for the randomize value. If the randomize value is > 0, it is used as the starting point. Here are some tips related to the randomize point: The sequence of generated random numbers is the same if you use the same randomize value > 0. In other words, if you call the command twice with the same randomize value, each block will be transformed the same way. Calling the command 4 times with the same image and the same randomize value > 0 will leave the image blocks unchanged. So, if you call the command once, the blocks will be transformed. Call the command 3 more times and each block goes to its original transformation. Of course, if you elected to draw borders, there will be a grid drawn on the image. If you pass 0 for the Flags property, the command leaves the image unchanged. This command supports all bits/pixel supported by LEADTOOLS. This command supports 12 and 16-bit grayscale and 48 and 64-bit color images. Support for 12 and 16-bit grayscale and 48 and 64-bit color images is available only in the Document/Medical toolkits. This command does not support signed data images. This command does not support 32-bit grayscale images.
Leadtools.Windows.Media.Effects.RasterCommandBitmapEffect
Leadtools.Windows.Media.Effects.SpecialEffects.DiceEffectCommandBitmapEffect
Target Platforms: Microsoft .NET Framework 2.0, Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family
Reference
DiceEffectCommandBitmapEffect MembersLeadtools.Windows.Media.Effects.SpecialEffects Namespace
PuzzleEffectCommandBitmapEffect Class
RingEffectCommandBitmapEffect Class
BricksTextureCommandBitmapEffect Class
CloudsCommandBitmapEffect Class
ColoredBallsCommandBitmapEffect Class
DiffuseGlowCommandBitmapEffect Class
FragmentCommandBitmapEffect Class
HalfTonePatternCommandBitmapEffect Class
MaskConvolutionCommandBitmapEffect Class
MosaicTilesCommandBitmapEffect Class
PerspectiveCommandBitmapEffect Class
PlasmaCommandBitmapEffect Class
PointillistCommandBitmapEffect Class
RomanMosaicCommandBitmapEffect Class
VignnetCommandBitmapEffect Class
ZigZagCommandBitmapEffect Class