C# Класс Framework.Mvc.Captcha.CaptchaImage

CAPTCHA Image.
Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
CaptchaImageGuidKey String

Открытые методы

Метод Описание
GetCachedCaptcha ( String guid ) : CaptchaImage

Gets the cached captcha.

RenderImage ( ) : Bitmap

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

Приватные методы

Метод Описание
AddLine ( Graphics g, Rectangle rect ) : void

Add variable level of curved lines to the image.

AddNoise ( Graphics g, Rectangle rect ) : void

Add a variable level of graphic noise to the image.

CaptchaImage ( ) : System

Initializes static members of the CaptchaImage class.

GenerateImagePrivate ( ) : Bitmap

Renders the CAPTCHA image.

GenerateRandomText ( ) : String

Generate random text for the CAPTCHA.

GetFont ( ) : Font

Returns the CAPTCHA font in an appropriate size.

GetRandomColor ( ) : Color

Randoms the color.

GetRandomFontFamily ( ) : 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.

Описание методов

GetCachedCaptcha() публичный статический Метод

Gets the cached captcha.
public static GetCachedCaptcha ( String guid ) : CaptchaImage
guid String The GUID of the Captcha.
Результат CaptchaImage

RenderImage() публичный Метод

Forces a new Captcha image to be generated using current property value settings.
public RenderImage ( ) : Bitmap
Результат System.Drawing.Bitmap

Описание свойств

CaptchaImageGuidKey публичное статическое свойство

Captcha image guid key.
public static String CaptchaImageGuidKey
Результат String