RotatedTextImage Control
Description
The RotatedTextImage control inherits from the System.Web.UI.WebControls.Image and is used to create an image that uses the RotatedTextHandler as it's source to generate an image of rotated text.
Example
Below are several examples of the RotatedTextImage control. You can click each image to see the URL that each image came from.
BackgroundStyle:
Transparent
BackgroundStyle:
TextOnly
BackgroundStyle:
Complete
Rotation: 30
Rotation: 90
Rotation: 150
Rotation: 230
Rotation: 270
Rotation: 300
Properties & Methods
RotatedTextImageThe RotatedTextImage control inherits from System.Web.UI.WebControls.Image and is used to create an image that uses the RotatedTextHandler as it's source to generate an image of rotated text.
  • Rotation - A Double specifying the angle, in degrees, that the text is to be rotated
  • Text - A String specifying the text to be rotated
  • FontColor - The System.Drawing.Color of the text
  • BackgroundStyle - A member of the NathanSokalski.RotatedTextHandler.BackgroundStyle enumeration specifying what part of the background should be colored
  • Background - The System.Drawing.Color used if TextOnly or Complete is selected for the BackgroundStyle property
  • Bold - A Boolean value specifying whether the text is bold
  • Italic - A Boolean value specifying whether the text is italicized
  • Strikeout - A Boolean value specifying whether the text is strikeout
  • Underline - A Boolean value specifying whether the text is underlined
  • FontName - A String specifying the name of the font used for the text
  • Size - A Single specifying the size of the text
GetImageUrl(ByVal rotangle As Double, ByVal txt As String, ByVal fntcolor As System.Drawing.Color, ByVal bgstyle As NathanSokalski.RotatedTextHandler.BackgroundStyle, ByVal bgcolor As System.Drawing.Color, ByVal bold As Boolean, ByVal italic As Boolean, ByVal strikeout As Boolean, ByVal underline As Boolean, ByVal fntname As String, ByVal fntsize As Single) As String GetImageUrl(ByVal rotangle As Double, ByVal txt As String, ByVal fntcolor As System.Drawing.Color, ByVal bgstyle As NathanSokalski.RotatedTextHandler.BackgroundStyle, ByVal bgcolor As System.Drawing.Color, ByVal fntstyle As System.Drawing.FontStyle, ByVal fntname As String, ByVal fntsize As Single) As StringThe GetImageUrl function is a shared function that can be used to generate the URL that will generate the gif file for the rotated text
  • rotangle - A Double specifying the angle, in degrees, that the text is to be rotated
  • txt - A String specifying the text to be rotated
  • fntcolor - The System.Drawing.Color of the text
  • bgstyle - A member of the NathanSokalski.RotatedTextHandler.BackgroundStyle enumeration specifying what part of the background should be colored
  • bgcolor - The System.Drawing.Color used if TextOnly or Complete is selected for the BackgroundStyle property
  • bold - A Boolean value specifying whether the text is bold
  • italic - A Boolean value specifying whether the text is italicized
  • strikeout - A Boolean value specifying whether the text is strikeout
  • underline - A Boolean value specifying whether the text is underlined
  • fntstyle - A System.Drawing.FontStyle used to specify whether the text should be bold, italic, strikeout, and/or underlined
  • fntname - A String specifying the name of the font used for the text
  • fntsize - A Single specifying the size of the text
Source Code
RotatedTextImage.vb:

Remarks
Because the RotatedTextImage control uses the RotatedTextHandler class to generate the gif file, you will need to download that as well in order to use the RotatedTextImage control in your site.