Syntax
Public Overloads Sub Draw3dShape( _
ByVal graphics As Graphics, _
ByVal shape As Leadtools.Specialeffects.SpecialEffectsShape, _
ByVal destRect As Rectangle, _
ByVal backColor As Color, _
ByVal backImage As Image, _
ByVal backRect As Rectangle, _
ByVal backStyle As Leadtools.Specialeffects.SpecialEffectsBackStyle, _
ByVal fillColor As Color, _
ByVal fillStyle As Leadtools.Specialeffects.SpecialEffectsFillStyle, _
ByVal borderColor As Color, _
ByVal borderStyle As Leadtools.Specialeffects.SpecialEffectsBorderStyle, _
ByVal borderWidth As Integer, _
ByVal innerHiliteColor As Color, _
ByVal innerShadowColor As Color, _
ByVal innerStyle As Leadtools.Specialeffects.SpecialEffectsInnerStyle, _
ByVal innerWidth As Integer, _
ByVal outerHiliteColor As Color, _
ByVal outerShadowColor As Color, _
ByVal outerStyle As Leadtools.Specialeffects.SpecialEffectsOuterStyle, _
ByVal outerWidth As Integer, _
ByVal shadowX As Integer, _
ByVal shadowY As Integer, _
ByVal shadowColor As Color, _
ByVal shapeRegion As Region _
)
public void Draw3dShape(
Graphics g,
SpecialEffectsShape shape,
Rectangle destRect,
Color backColor,
Image backImage,
Rectangle backRect,
SpecialEffectsBackStyle backStyle,
Color fillColor,
SpecialEffectsFillStyle fillStyle,
Color borderColor,
SpecialEffectsBorderStyle borderStyle,
int borderWidth,
Color innerHiliteColor,
Color innerShadowColor,
SpecialEffectsInnerStyle innerStyle,
int innerWidth,
Color outerHiliteColor,
Color outerShadowColor,
SpecialEffectsOuterStyle outerStyle,
int outerWidth,
int shadowX,
int shadowY,
Color shadowColor,
Region shapeRegion
)
public:
void Draw3dShape(
Graphics^ graphics,
Leadtools.Specialeffects.SpecialEffectsShape shape,
Rectangle destRect,
Color backColor,
Image^ backImage,
Rectangle backRect,
Leadtools.Specialeffects.SpecialEffectsBackStyle backStyle,
Color fillColor,
Leadtools.Specialeffects.SpecialEffectsFillStyle fillStyle,
Color borderColor,
Leadtools.Specialeffects.SpecialEffectsBorderStyle borderStyle,
int borderWidth,
Color innerHiliteColor,
Color innerShadowColor,
Leadtools.Specialeffects.SpecialEffectsInnerStyle innerStyle,
int innerWidth,
Color outerHiliteColor,
Color outerShadowColor,
Leadtools.Specialeffects.SpecialEffectsOuterStyle outerStyle,
int outerWidth,
int shadowX,
int shadowY,
Color shadowColor,
Region^ shapeRegion
)
Parameters
graphics
The destination Graphics object.
destRect
Rectangle to be used as the display destination rectangle.
backColor
Value that specifies the background color.
backImage
The background image object. Use this parameter and prcBack to place an image from another device context onto the background of the shape. To use a background image, the fillStyle parameter must not be Solid.
backRect
Rectangle to be used as the display background rectangle.
fillColor
Value that specifies the foreground color.
fillStyle
Foreground style. For valid values, refer to fillStyle.
borderColor
Value that specifies the border color.
borderWidth
Border width.
innerHiliteColor
Value that specifies the inner band highlight color.
innerShadowColor
Value that specifies the inner band shadow color.
innerStyle
Inner band style. For valid values, refer to SpecialEffectsInnerStyle. The inner band is available only for squares and rectangles.
innerWidth
Inner band width.
outerHiliteColor
Value that specifies the highlight color for the outer band.
outerShadowColor
Value that specifies the shadow color for the inner band .
outerWidth
Outer band width.
shadowX
Horizontal position of the shadow.
shadowY
Vertical position of the shadow.
shadowColor
Value that specifies the shadow color.
shapeRegion
Region object that defines the shape. This parameter is used only if the value for the shape parameter is Region.
Example
This example shows the minimum requirements for using the Draw3dShape(graphics,specialeffectsshape,rectangle,color,image,rectangle,specialeffectsbackstyle,color,specialeffectsfillstyle,color,specialeffectsborderstyle,int32,color,color,specialeffectsinnerstyle,int32,color,color,specialeffectsouterstyle,int32,int32,int32,color,region) method.
using Leadtools;
using Leadtools.Codecs;
using Leadtools.SpecialEffects;
using Leadtools.Drawing;
public void Draw3dShape(Graphics g, Rectangle destRect)
{
SpecialEffectsProcessor processor = new SpecialEffectsProcessor();
Image image = Image.FromFile(Path.Combine(LEAD_VARS.ImagesDir, "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();
}
static class LEAD_VARS
{
public const string ImagesDir = @"C:\Users\Public\Documents\LEADTOOLS Images";
}
Imports Leadtools
Imports Leadtools.Codecs
Imports Leadtools.SpecialEffects
Imports Leadtools.Drawing
Public Sub Draw3dShape(ByVal g As Graphics, ByVal destRect As Rectangle)
Dim processor As SpecialEffectsProcessor = New SpecialEffectsProcessor()
Dim img As Image = Image.FromFile(Path.Combine(LEAD_VARS.ImagesDir, "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
Public NotInheritable Class LEAD_VARS
Public Const ImagesDir As String = "C:\Users\Public\Documents\LEADTOOLS Images"
End Class