Leadtools.SpecialEffects Send comments on this topic. | Back to Introduction - All Topics | Help Version 15.8.31
Draw3dShape Method
See Also  Example
Leadtools.SpecialEffects Namespace > SpecialEffectsProcessor Class : Draw3dShape Method




Draws the specified three-dimensional shape onto the target device context using the specified color, style, and size.

Overload List

Example

This example shows the minimum requirements for using the Draw3dShape method.

Visual Basic Copy Code
Public Sub Draw3dShape(ByVal g As Graphics, ByVal destRect As Rectangle)
   Dim processor As SpecialEffectsProcessor = New SpecialEffectsProcessor()
   Dim img As Image = Image.FromFile("C:\Program Files\LEAD Technologies, Inc\LEADTOOLS 15\Images\Ulay1.bmp")
   Dim imageRect As Rectangle = New Rectangle(0, 0, img.Width, img.Height)

   processor.Draw3dShape(g, SpecialEffectsShape.Star4, destRect, Color.Blue, img, imageRect, SpecialEffectsBackStyle.TranslucentTiledImage, Color.Red, SpecialEffectsFillStyle.Transparent, Color.Red, SpecialEffectsBorderStyle.Solid, 5, Color.White, Color.Gray, SpecialEffectsInnerStyle.Inset, 3, Color.Red, Color.Gray, SpecialEffectsOuterStyle.Inset, 3, 2, 2, Color.Black, Nothing) ' no region handle
   img.Dispose()
End Sub
C# Copy Code
public void Draw3dShape(Graphics g, Rectangle destRect) 

   SpecialEffectsProcessor processor = new SpecialEffectsProcessor(); 
   Image image = Image.FromFile(@"C:\Program Files\LEAD Technologies, Inc\LEADTOOLS 15\Images\Ulay1.bmp"); 
   Rectangle imageRect = new Rectangle(0, 0, image.Width, image.Height); 
 
   processor.Draw3dShape(g, 
                        SpecialEffectsShape.Star4, /* star shape */ 
                        destRect,  /* destination rectangle */ 
                        Color.Blue, /* background color, blue */ 
                        image, /* use this to place an image in the background */ 
                        imageRect, /* display background rectangle */ 
                        SpecialEffectsBackStyle.TranslucentTiledImage, /* style flags for 3D shape */ 
                        Color.Red, /* foreground color, red */ 
                        SpecialEffectsFillStyle.Transparent, /* foreground style */ 
                        Color.Red, /* border color, red */ 
                        SpecialEffectsBorderStyle.Solid, /* border style */ 
                        5, /* border width */ 
                        Color.White, /* inner band highlight color, white */ 
                        Color.Gray, /* inner band shadow color */ 
                        SpecialEffectsInnerStyle.Inset, /* inner band style */ 
                        3, /* inner band width */ 
                        Color.Red, /* outer band highlight color, RED */ 
                        Color.Gray, /* outer band shadow color */ 
                        SpecialEffectsOuterStyle.Inset,/* outer band style */ 
                        3, /* outer band width */ 
                        2, /* horizontal shadow position */ 
                        2, /* vertical shadow position */ 
                        Color.Black, /* shadow color, black */ 
                        null);    /* no region handle */ 
   image.Dispose(); 
}

Remarks

Use backImage and backRect to place an image from another device context onto the background of the shape.

For general information, refer to Implementing Special Effects .

Requirements

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

See Also