Telerik.Web.UI.CaptchaImage
RadCaptcha image generation class
Inheritance Hierarchy
- System.Object
- Telerik.Web.UI.CaptchaImage
Properties
AudioFilesPath String
Gets or sets the path to the directory where the audio (.wav) files are located. The default value is ~/App_Data/RadCaptcha.
Remarks
Use the AudioFilesPath property to specify the directory where the audio (*.wav) files are located, and from which the audio code is generated. The audio files must be named "[Char]".wav (i.e. A.wav, B.wav, C.wav, 1.wav, 2.wav) and should contain the audio that corresponds to the specific character. Place the RadCaptcha folder (provided with the installation) in the App_Data directory of your WebSite.
BackgroundColor Color
Gets or sets the background color of the CaptchaImage.
BackgroundNoise CaptchaBackgroundNoiseLevel
Gets or sets the amount of background noise to generate in the RadCaptcha image.
CharSet String
Gets or sets a custom Character Set, from which the characters used to render RadCaptcha, are randomly chosen. The TextChars property must be set to CustomCharSet.
EnableAudioNoise Boolean
Gets or sets a boolean value indicating whether a noise should be added to the CaptchaAudio.
EnableCaptchaAudio Boolean
Gets or sets the bool value indicating whether the CaptchaAudio will be enabled.
FontFamily String
Gets or sets the font used to render RadCaptcha text.
FontWarp CaptchaFontWarpFactor
Gets or sets the amount of random font warping used on the RadCaptcha text.
FontWhitelist String
Gets or sets a semicolon-delimited list of valid fonts to use when no font is provided.
Height Int32
Gets or sets the height of the RadCaptcha image.
ImageAlternativeText String
Gets or sets the RadCaptcha image alternative text.
ImageCssClass String
Gets or sets the RadCaptcha image CSS class.
LineNoise CaptchaLineNoiseLevel
Gets or sets the line noise level to the RadCaptcha image.
PersistCodeDuringAjax Boolean
Gets or sets a bool value that indicates whether or not the Captcha will persist the code during Ajax requests that do not affect the RadCaptcha control. The default is false, which means a new code will be generated on every trip to the server (no matter if full or partial postback). Note: This property is useful when there is another Ajax panel on the page that does not update the Captcha. Setting it to true will cause the RadCaptcha control to persist its code during the Ajax requests.
PreviousText String
Gets the previous text of the CaptchaImage.
RenderedAt DateTime
Gets the date and time this image was last rendered
RenderImageOnly Boolean
Gets or sets bool value that indicates whether the RadCaptcha Image will only be rendered on the page (without the textbox and Label).
Text String
Gets the randomly generated RadCaptcha text.
TextChars CaptchaPossibleChars
Gets or sets the characters used to render RadCaptcha text. A character will be picked randomly from the string.
TextColor Color
Gets or sets the color of the RadCaptcha text.
TextLength Int32
Gets or sets the number of CaptchaChars used in the RadCaptcha text.
UniqueId String
Gets a GUID that uniquely identifies this CaptchaImage
UseAudioFiles Boolean
Gets or sets a bool value indicating whether the audio code will be generated by concatenation of the audio files from a given folder.
UseRandomFont Boolean
Gets or sets a bool value indicating whether a random font will be used to generate the CaptchaImage text.
Width Int32
Gets or sets the width of the RadCaptcha image.
Methods
AddLine
Add variable level of curved lines to the image
Returns
System.Void
AddNoise
Add a variable level of graphic noise to the image.
Returns
System.Void
GenerateCode
Generates a new RadCaptcha code.
Parameters
filterWords System.Boolean
Bool value that indicates whether or not bad words will be filtered. RadCaptcha has a built-in list of words that should not appear on the image.
Returns
System.Void
GenerateCode
Generates a new RadCaptcha code.
Returns
System.Void
GenerateImagePrivate
Renders the RadCaptcha image.
Returns
System.Drawing.Bitmap
GenerateRandomText
Generates random text for the RadCaptcha.
Returns
System.String
GetFont
Returns the RadCaptcha font in an appropriate size.
Returns
System.Drawing.Font
IsOffensiveWord
Checks whether the current code is an offensive word.
Returns
System.Boolean
True if the word is offensive.
RandomFontFamily
Returns a random font family from the font whitelist
Returns
System.String
RandomPoint
Returns a random point within the specified x and y ranges.
Returns
System.Drawing.PointF
RandomPoint
Returns a random point within the specified rectangle.
Returns
System.Drawing.PointF
RenderImage
Forces a new Captcha image to be generated using current property value settings.
Returns
System.Drawing.Bitmap
TextPath
Returns a GraphicsPath containing the specified string and font.
Returns
System.Drawing.Drawing2D.GraphicsPath
WarpText
Warps the provided text GraphicsPath by a variable amount.
Returns
System.Void