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




Draws three-dimensional text,rotated by the amount specified, onto the target device context using the specified font, color, and style.

Overload List

Overload Description
DrawRotated3dText(Graphics,String,Rectangle,Int32,SpecialEffectsTextStyle,SpecialEffectsTextAlignmentFlags,Int32,Int32,Color,Color,Color,Font,Image) Draws three-dimensional text,rotated by the amount specified, onto the target device context using the specified font, color, and style.  
DrawRotated3dText(IntPtr,String,Rectangle,Int32,SpecialEffectsTextStyle,SpecialEffectsTextAlignmentFlags,Int32,Int32,Color,Color,Color,IntPtr,IntPtr) Draws three-dimensional text which is rotated by the amount specified onto the target device context using the specified font, color, and style.  

Example

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

Visual Basic Copy Code
Public Sub DrawRotated3dText(ByVal g As Graphics, ByVal destRect As Rectangle)
   Dim processor As SpecialEffectsProcessor = New SpecialEffectsProcessor()
   Dim textFont As Font = New Font("Arial", 24)

   Dim img As Image = Image.FromFile("C:\Program Files\LEAD Technologies, Inc\LEADTOOLS 15\Images\Ulay1.bmp")

   processor.DrawRotated3dText(g, "Rotated 3D Text - LEADTOOLS", destRect, 300, SpecialEffectsTextStyle.DropShadow, SpecialEffectsTextAlignmentFlags.HorizontalCenter Or SpecialEffectsTextAlignmentFlags.VerticalCenter, 2, 2, Color.Blue, Color.Black, Color.White, textFont, img)

   img.Dispose()
End Sub
C# Copy Code
public void DrawRotated3dText(Graphics g, Rectangle destRect) 

   SpecialEffectsProcessor processor = new SpecialEffectsProcessor(); 
   Font textFont = new Font("Arial", 24); 
 
   Image image = Image.FromFile(@"C:\Program Files\LEAD Technologies, Inc\LEADTOOLS 15\Images\Ulay1.bmp"); 
 
   processor.DrawRotated3dText(g, 
                        "Rotated 3D Text - LEADTOOLS", 
                        destRect, 
                        300, /* rotate 30 degrees*/ 
                        SpecialEffectsTextStyle.DropShadow, 
                        SpecialEffectsTextAlignmentFlags.HorizontalCenter | SpecialEffectsTextAlignmentFlags.VerticalCenter, 
                        2, /* horizontal  shadow position */ 
                        2, /* vertical shadow position */ 
                        Color.Blue, /* text color, blue */ 
                        Color.Black,/* shadow color, black */ 
                        Color.White, /* border color, white */ 
                        textFont, 
                        image); 
 
   image.Dispose(); 
}

Remarks

Use the textStyle and textAlignment parameters to control the style and justification of the three-dimensional text. Use the textFont parameter to place an image (such as a gradient) on the surface of the three-dimensional text.

Drop shadows are available only for the following textStyle values:

  • DropShadow
  • BlockShadow
  • OutlineBlock

shadowColor is available only for the following textStyle values:

  • InsetHeavy
  • InsetExtraHeavy
  • RaisedHeavy
  • RaisedExtraHeavy

hiliteColor is available only for the following textStyle values:

  • InsetLight
  • InsetExtraLight
  • InsetHeavy
  • InsetExtraHeavy
  • RaisedLight
  • RaisedExtraLight
  • RaisedHeavy
  • RaisedExtraHeavy
  • OutlineBlock

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