C# Class EmptyKeys.UserInterface.Renderers.FNARenderer

Implements FNA renderer
Inheritance: Renderer
Afficher le fichier Open project: EmptyKeys/UI_Engines

Méthodes publiques

Méthode Description
Begin ( ) : void

Begins the rendering

Begin ( EffectBase effect ) : void

Begins the rendering with custom effect

BeginClipped ( Rect clipRect ) : void

Begins the clipped.

BeginClipped ( Rect clipRect, EffectBase effect ) : void

Begins the clipped rendering with custom effect

CreateEffect ( object nativeEffect ) : EffectBase

Creates the effect.

CreateFont ( object nativeFont ) : FontBase

Creates the font.

CreateGeometryBuffer ( ) : GeometryBuffer

Creates the geometry buffer.

CreateTexture ( int width, int height, bool mipmap, bool dynamic ) : TextureBase

Creates the texture.

CreateTexture ( object nativeTexture ) : TextureBase

Creates the texture.

Draw ( TextureBase texture, PointF position, Size renderSize, ColorW color, Rect source, bool centerOrigin ) : void

Draws the specified texture.

Draw ( TextureBase texture, PointF position, Size renderSize, ColorW color, bool centerOrigin ) : void

Draws the specified texture.

DrawGeometryColor ( GeometryBuffer buffer, PointF position, ColorW color, float opacity, float depth ) : void

Draws the color of the geometry.

DrawGeometryTexture ( GeometryBuffer buffer, PointF position, TextureBase texture, float opacity, float depth ) : void

Draws the geometry texture.

DrawText ( FontBase font, string text, PointF position, Size renderSize, ColorW color, PointF scale, float depth ) : void

Draws the text.

End ( bool endEffect = false ) : void

Ends rendering

EndClipped ( bool endEffect = false ) : void

Ends the clipped drawing

FNARenderer ( GraphicsDevice graphicsDevice, int nativeScreenWidth, int nativeScreenHeight ) : System

Initializes a new instance of the FNARenderer class.

GetSDFFontEffect ( ) : EffectBase

Gets the SDF font effect.

GetViewport ( ) : Rect

Gets the viewport.

IsClipped ( PointF position, Size renderSize ) : bool

Determines whether the specified rectangle is outside of clip bounds

ResetNativeSize ( ) : void

Resets the size of the native. Sets NativeScreenWidth and NativeScreenHeight based on active back buffer

Private Methods

Méthode Description
BeginClipped ( Rectangle clipRect ) : void

Begins the clipped.

DrawGeometry ( GeometryBuffer buffer, PointF position, float depth ) : void
UpdateCurrentEffect ( EffectBase effect ) : void

Method Details

Begin() public méthode

Begins the rendering
public Begin ( ) : void
Résultat void

Begin() public méthode

Begins the rendering with custom effect
public Begin ( EffectBase effect ) : void
effect EmptyKeys.UserInterface.Media.EffectBase The effect.
Résultat void

BeginClipped() public méthode

Begins the clipped.
public BeginClipped ( Rect clipRect ) : void
clipRect Rect The clip rect.
Résultat void

BeginClipped() public méthode

Begins the clipped rendering with custom effect
public BeginClipped ( Rect clipRect, EffectBase effect ) : void
clipRect Rect The clip rect.
effect EmptyKeys.UserInterface.Media.EffectBase The effect.
Résultat void

CreateEffect() public méthode

Creates the effect.
public CreateEffect ( object nativeEffect ) : EffectBase
nativeEffect object The native effect.
Résultat EmptyKeys.UserInterface.Media.EffectBase

CreateFont() public méthode

Creates the font.
public CreateFont ( object nativeFont ) : FontBase
nativeFont object The native font.
Résultat EmptyKeys.UserInterface.Media.FontBase

CreateGeometryBuffer() public méthode

Creates the geometry buffer.
public CreateGeometryBuffer ( ) : GeometryBuffer
Résultat EmptyKeys.UserInterface.Media.GeometryBuffer

CreateTexture() public méthode

Creates the texture.
public CreateTexture ( int width, int height, bool mipmap, bool dynamic ) : TextureBase
width int The width.
height int The height.
mipmap bool if set to true [mipmap].
dynamic bool if set to true [dynamic].
Résultat EmptyKeys.UserInterface.Media.TextureBase

CreateTexture() public méthode

Creates the texture.
public CreateTexture ( object nativeTexture ) : TextureBase
nativeTexture object The native texture.
Résultat EmptyKeys.UserInterface.Media.TextureBase

Draw() public méthode

Draws the specified texture.
public Draw ( TextureBase texture, PointF position, Size renderSize, ColorW color, Rect source, bool centerOrigin ) : void
texture EmptyKeys.UserInterface.Media.TextureBase The texture.
position PointF The position.
renderSize Size Size of the render.
color ColorW The color.
source Rect The source.
centerOrigin bool if set to true [center origin].
Résultat void

Draw() public méthode

Draws the specified texture.
public Draw ( TextureBase texture, PointF position, Size renderSize, ColorW color, bool centerOrigin ) : void
texture EmptyKeys.UserInterface.Media.TextureBase The texture.
position PointF The position.
renderSize Size Size of the render.
color ColorW The color.
centerOrigin bool if set to true [center origin].
Résultat void

DrawGeometryColor() public méthode

Draws the color of the geometry.
public DrawGeometryColor ( GeometryBuffer buffer, PointF position, ColorW color, float opacity, float depth ) : void
buffer EmptyKeys.UserInterface.Media.GeometryBuffer The buffer.
position PointF The position.
color ColorW The color.
opacity float The opacity.
depth float The depth.
Résultat void

DrawGeometryTexture() public méthode

Draws the geometry texture.
public DrawGeometryTexture ( GeometryBuffer buffer, PointF position, TextureBase texture, float opacity, float depth ) : void
buffer EmptyKeys.UserInterface.Media.GeometryBuffer The buffer.
position PointF The position.
texture EmptyKeys.UserInterface.Media.TextureBase The texture.
opacity float The opacity.
depth float The depth.
Résultat void

DrawText() public méthode

Draws the text.
public DrawText ( FontBase font, string text, PointF position, Size renderSize, ColorW color, PointF scale, float depth ) : void
font EmptyKeys.UserInterface.Media.FontBase The font.
text string The text.
position PointF The position.
renderSize Size Size of the render.
color ColorW The color.
scale PointF The scale.
depth float The depth.
Résultat void

End() public méthode

Ends rendering
public End ( bool endEffect = false ) : void
endEffect bool
Résultat void

EndClipped() public méthode

Ends the clipped drawing
public EndClipped ( bool endEffect = false ) : void
endEffect bool
Résultat void

FNARenderer() public méthode

Initializes a new instance of the FNARenderer class.
public FNARenderer ( GraphicsDevice graphicsDevice, int nativeScreenWidth, int nativeScreenHeight ) : System
graphicsDevice GraphicsDevice The graphics device.
nativeScreenWidth int Width of the native screen.
nativeScreenHeight int Height of the native screen.
Résultat System

GetSDFFontEffect() public méthode

Gets the SDF font effect.
public GetSDFFontEffect ( ) : EffectBase
Résultat EmptyKeys.UserInterface.Media.EffectBase

GetViewport() public méthode

Gets the viewport.
public GetViewport ( ) : Rect
Résultat Rect

IsClipped() public méthode

Determines whether the specified rectangle is outside of clip bounds
public IsClipped ( PointF position, Size renderSize ) : bool
position PointF The position.
renderSize Size Size of the render.
Résultat bool

ResetNativeSize() public méthode

Resets the size of the native. Sets NativeScreenWidth and NativeScreenHeight based on active back buffer
public ResetNativeSize ( ) : void
Résultat void