C# Класс SFML.Graphics.Text

This class defines a graphical 2D text, that can be drawn on screen
See also the note on coordinates and undistorted rendering in SFML.Graphics.Transformable.
Наследование: Transformable, Drawable
Показать файл Открыть проект Примеры использования класса

Private Properties

Свойство Тип Описание
sfRenderTexture_drawText void
sfRenderWindow_drawText void
sfText_copy System.IntPtr
sfText_create System.IntPtr
sfText_destroy void
sfText_findCharacterPos Vector2f
sfText_getCharacterSize uint
sfText_getColor System.Color
sfText_getFillColor System.Color
sfText_getLocalBounds FloatRect
sfText_getOutlineColor System.Color
sfText_getOutlineThickness float
sfText_getRect FloatRect
sfText_getString System.IntPtr
sfText_getStyle Styles
sfText_getUnicodeString System.IntPtr
sfText_setCharacterSize void
sfText_setColor void
sfText_setFillColor void
sfText_setFont void
sfText_setOutlineColor void
sfText_setOutlineThickness void
sfText_setStyle void
sfText_setUnicodeString void

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

Метод Описание
Draw ( RenderTarget target, RenderStates states ) : void

Draw the text to a render target

FindCharacterPos ( uint index ) : Vector2f

Return the visual position of the Index-th character of the text, in coordinates relative to the text (note : translation, origin, rotation and scale are not applied)

GetGlobalBounds ( ) : FloatRect

Get the global bounding rectangle of the entity. The returned rectangle is in global coordinates, which means that it takes in account the transformations (translation, rotation, scale, ...) that are applied to the entity. In other words, this function returns the bounds of the sprite in the global 2D world's coordinate system.

GetLocalBounds ( ) : FloatRect

Get the local bounding rectangle of the entity. The returned rectangle is in local coordinates, which means that it ignores the transformations (translation, rotation, scale, ...) that are applied to the entity. In other words, this function returns the bounds of the entity in the entity's coordinate system.

Text ( ) : System

Default constructor

Text ( Text copy ) : System

Construct the text from another text

Text ( string str, Font font ) : System

Construct the text from a string and a font

Text ( string str, Font font, uint characterSize ) : System

Construct the text from a string, font and size

ToString ( ) : string

Provide a string describing the object

Защищенные методы

Метод Описание
Destroy ( bool disposing ) : void

Handle the destruction of the object

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

Метод Описание
sfRenderTexture_drawText ( IntPtr CPointer, IntPtr Text, RenderStates &states ) : void
sfRenderWindow_drawText ( IntPtr CPointer, IntPtr Text, RenderStates &states ) : void
sfText_copy ( IntPtr Text ) : IntPtr
sfText_create ( ) : IntPtr
sfText_destroy ( IntPtr CPointer ) : void
sfText_findCharacterPos ( IntPtr CPointer, uint Index ) : Vector2f
sfText_getCharacterSize ( IntPtr CPointer ) : uint
sfText_getColor ( IntPtr CPointer ) : System.Color
sfText_getFillColor ( IntPtr CPointer ) : System.Color
sfText_getLocalBounds ( IntPtr CPointer ) : FloatRect
sfText_getOutlineColor ( IntPtr CPointer ) : System.Color
sfText_getOutlineThickness ( IntPtr CPointer ) : float
sfText_getRect ( IntPtr CPointer ) : FloatRect
sfText_getString ( IntPtr CPointer ) : IntPtr
sfText_getStyle ( IntPtr CPointer ) : Styles
sfText_getUnicodeString ( IntPtr CPointer ) : IntPtr
sfText_setCharacterSize ( IntPtr CPointer, uint Size ) : void
sfText_setColor ( IntPtr CPointer, System.Color Color ) : void
sfText_setFillColor ( IntPtr CPointer, System.Color Color ) : void
sfText_setFont ( IntPtr CPointer, IntPtr Font ) : void
sfText_setOutlineColor ( IntPtr CPointer, System.Color Color ) : void
sfText_setOutlineThickness ( IntPtr CPointer, float thickness ) : void
sfText_setStyle ( IntPtr CPointer, Styles Style ) : void
sfText_setUnicodeString ( IntPtr CPointer, IntPtr Text ) : void

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

Destroy() защищенный Метод

Handle the destruction of the object
protected Destroy ( bool disposing ) : void
disposing bool Is the GC disposing the object, or is it an explicit call ?
Результат void

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

Draw the text to a render target
public Draw ( RenderTarget target, RenderStates states ) : void
target RenderTarget Render target to draw to
states RenderStates Current render states
Результат void

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

Return the visual position of the Index-th character of the text, in coordinates relative to the text (note : translation, origin, rotation and scale are not applied)
public FindCharacterPos ( uint index ) : Vector2f
index uint Index of the character
Результат Vector2f

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

Get the global bounding rectangle of the entity. The returned rectangle is in global coordinates, which means that it takes in account the transformations (translation, rotation, scale, ...) that are applied to the entity. In other words, this function returns the bounds of the sprite in the global 2D world's coordinate system.
public GetGlobalBounds ( ) : FloatRect
Результат FloatRect

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

Get the local bounding rectangle of the entity. The returned rectangle is in local coordinates, which means that it ignores the transformations (translation, rotation, scale, ...) that are applied to the entity. In other words, this function returns the bounds of the entity in the entity's coordinate system.
public GetLocalBounds ( ) : FloatRect
Результат FloatRect

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

Default constructor
public Text ( ) : System
Результат System

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

Construct the text from another text
public Text ( Text copy ) : System
copy Text Text to copy
Результат System

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

Construct the text from a string and a font
public Text ( string str, Font font ) : System
str string String to display
font Font Font to use
Результат System

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

Construct the text from a string, font and size
public Text ( string str, Font font, uint characterSize ) : System
str string String to display
font Font Font to use
characterSize uint Base characters size
Результат System

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

Provide a string describing the object
public ToString ( ) : string
Результат string