C# Class SenseNet.Portal.UI.Controls.Captcha.CaptchaImage

Mostra file Open project: maxpavlov/FlexNet Class Usage Examples

Public Methods

Method Description
CaptchaImage ( ) : System
RenderImage ( ) : Bitmap

Forces a new Captcha image to be generated using current property value settings.

Private Methods

Method Description
AddLine ( Graphics graphics1, Rectangle rect ) : void

Add variable level of curved lines to the image

AddNoise ( Graphics graphics1, Rectangle rect ) : void

Add a variable level of graphic noise to the image

GenerateImagePrivate ( ) : Bitmap

Renders the CAPTCHA image

GenerateRandomText ( ) : string

generate random text for the CAPTCHA

GetFont ( ) : Font

Returns the CAPTCHA font in an appropriate size

RandomFontFamily ( ) : string

Returns a random font family from the font whitelist

RandomPoint ( Rectangle rect ) : PointF

Returns a random point within the specified rectangle

RandomPoint ( int xmin, int xmax, int ymin, int ymax ) : PointF

Returns a random point within the specified x and y ranges

TextPath ( string s, Font f, Rectangle r ) : GraphicsPath

Returns a GraphicsPath containing the specified string and font

WarpText ( GraphicsPath textPath, Rectangle rect ) : void

Warp the provided text GraphicsPath by a variable amount

Method Details

CaptchaImage() public method

public CaptchaImage ( ) : System
return System

RenderImage() public method

Forces a new Captcha image to be generated using current property value settings.
public RenderImage ( ) : Bitmap
return System.Drawing.Bitmap