C# Class PurplePen.Symbol

Represents a graphical symbol that can be drawn into a text box.
Exibir arquivo Open project: petergolde/PurplePen Class Usage Examples

Public Methods

Method Description
ContainsLanguage ( List texts, string language ) : bool
CreateSymdef ( Map map, SymColor color, float boxSize ) : PointSymDef
Draw ( Graphics g, Color color, RectangleF rect ) : void

Draw the given symbol to fill the rectange in that graphics.

GetBestSymbolText ( SymbolDB symbolDB, List texts, string language, bool plural, string gender, string nounCase ) : string
GetGender ( string language ) : string
GetModifiedCase ( SymbolDB symbolDB, List texts, string language ) : string
GetModifiedCase ( string language ) : string
GetName ( string language ) : string
GetPluralText ( string language, string gender = null, string nounCase = "" ) : string

Get the plural text for the symbol to use in text descriptions. If no plural text is defined, the singular text is used instead.

GetSymbolGender ( SymbolDB symbolDB, List texts, string language ) : string
GetText ( string language ) : string

Get the text for the symbol to use in text descriptions.

GetText ( string language, string gender, string nounCase = "" ) : string
ReadXml ( XmlInput xmlinput ) : void

Read the state of this symbol from XML. The xmlinput must be on a symbol node.

Symbol ( SymbolDB symbolDB ) : System

Private Methods

Method Description
FindBestText ( SymbolDB symbolDB, List texts, string language, bool plural, string gender, string nounCase ) : SymbolText
ReadPoints ( XmlInput xmlinput ) : System.Drawing.PointF[]

Read points array from XML.

ToLineCap ( string s, XmlInput xmlinput ) : LineCap

Convert attribute of line cap from a string.

ToLineJoin ( string s, XmlInput xmlinput ) : LineJoin

Convert attribute of line join from a string.

Method Details

ContainsLanguage() public static method

public static ContainsLanguage ( List texts, string language ) : bool
texts List
language string
return bool

CreateSymdef() public method

public CreateSymdef ( Map map, SymColor color, float boxSize ) : PointSymDef
map Map
color SymColor
boxSize float
return PointSymDef

Draw() public method

Draw the given symbol to fill the rectange in that graphics.
public Draw ( Graphics g, Color color, RectangleF rect ) : void
g System.Drawing.Graphics Graphics to draw in.
color Color Color to use for drawing.
rect System.Drawing.RectangleF The rectange to fill.
return void

GetBestSymbolText() public static method

public static GetBestSymbolText ( SymbolDB symbolDB, List texts, string language, bool plural, string gender, string nounCase ) : string
symbolDB SymbolDB
texts List
language string
plural bool
gender string
nounCase string
return string

GetGender() public method

public GetGender ( string language ) : string
language string
return string

GetModifiedCase() public static method

public static GetModifiedCase ( SymbolDB symbolDB, List texts, string language ) : string
symbolDB SymbolDB
texts List
language string
return string

GetModifiedCase() public method

public GetModifiedCase ( string language ) : string
language string
return string

GetName() public method

public GetName ( string language ) : string
language string
return string

GetPluralText() public method

Get the plural text for the symbol to use in text descriptions. If no plural text is defined, the singular text is used instead.
public GetPluralText ( string language, string gender = null, string nounCase = "" ) : string
language string The language to use.
gender string
nounCase string
return string

GetSymbolGender() public static method

public static GetSymbolGender ( SymbolDB symbolDB, List texts, string language ) : string
symbolDB SymbolDB
texts List
language string
return string

GetText() public method

Get the text for the symbol to use in text descriptions.
public GetText ( string language ) : string
language string The language to use.
return string

GetText() public method

public GetText ( string language, string gender, string nounCase = "" ) : string
language string
gender string
nounCase string
return string

ReadXml() public method

Read the state of this symbol from XML. The xmlinput must be on a symbol node.
public ReadXml ( XmlInput xmlinput ) : void
xmlinput XmlInput
return void

Symbol() public method

public Symbol ( SymbolDB symbolDB ) : System
symbolDB SymbolDB
return System