C# Class PurplePen.Symbol

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

Méthodes publiques

Méthode 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

Méthode 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 méthode

public static ContainsLanguage ( List texts, string language ) : bool
texts List
language string
Résultat bool

CreateSymdef() public méthode

public CreateSymdef ( Map map, SymColor color, float boxSize ) : PointSymDef
map Map
color SymColor
boxSize float
Résultat PointSymDef

Draw() public méthode

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.
Résultat void

GetBestSymbolText() public static méthode

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
Résultat string

GetGender() public méthode

public GetGender ( string language ) : string
language string
Résultat string

GetModifiedCase() public static méthode

public static GetModifiedCase ( SymbolDB symbolDB, List texts, string language ) : string
symbolDB SymbolDB
texts List
language string
Résultat string

GetModifiedCase() public méthode

public GetModifiedCase ( string language ) : string
language string
Résultat string

GetName() public méthode

public GetName ( string language ) : string
language string
Résultat string

GetPluralText() public méthode

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
Résultat string

GetSymbolGender() public static méthode

public static GetSymbolGender ( SymbolDB symbolDB, List texts, string language ) : string
symbolDB SymbolDB
texts List
language string
Résultat string

GetText() public méthode

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

GetText() public méthode

public GetText ( string language, string gender, string nounCase = "" ) : string
language string
gender string
nounCase string
Résultat string

ReadXml() public méthode

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

Symbol() public méthode

public Symbol ( SymbolDB symbolDB ) : System
symbolDB SymbolDB
Résultat System