C# Class Sharpex2D.Rendering.DirectX9.DirectXGraphics

Inheritance: IGraphics
Datei anzeigen Open project: ThuCommix/Sharpex2D

Public Methods

Method Description
Begin ( ) : void

Begins the draw operation.

DirectXGraphics ( ) : System

Initializes a new DirectXGraphics class.

DrawArc ( Pen pen, Rectangle rectangle, float startAngle, float sweepAngle ) : void

Draws an Arc.

DrawEllipse ( Pen pen, Ellipse ellipse ) : void

Draws a Ellipse.

DrawLine ( Pen pen, Vector2 start, Vector2 target ) : void

Draws a Line between two points.

DrawPolygon ( Pen pen, Polygon polygon ) : void

Draws a Polygon.

DrawRectangle ( Pen pen, Rectangle rectangle ) : void

Draws a Rectangle.

DrawString ( string text, Font font, Rectangle rectangle, System.Color color ) : void

Draws a string.

DrawString ( string text, Font font, Vector2 position, System.Color color ) : void

Draws a string.

DrawTexture ( SpriteSheet spriteSheet, Rectangle rectangle, System.Color color, float opacity = 1 ) : void

Draws a Texture.

DrawTexture ( SpriteSheet spriteSheet, Vector2 position, System.Color color, float opacity = 1 ) : void

Draws a Texture.

DrawTexture ( Texture2D texture, Rectangle rectangle, System.Color color, float opacity = 1 ) : void

Draws a Texture.

DrawTexture ( Texture2D texture, Rectangle source, Rectangle destination, System.Color color, float opacity = 1 ) : void

Draws a Texture.

DrawTexture ( Texture2D texture, Vector2 position, System.Color color, float opacity = 1 ) : void

Draws a Texture.

End ( ) : void

Ends the draw operation.

FillEllipse ( System.Color color, Ellipse ellipse ) : void

Fills a Ellipse.

FillPolygon ( System.Color color, Polygon polygon ) : void

Fills a Polygon.

FillRectangle ( System.Color color, Rectangle rectangle ) : void

Fills a Rectangle.

Initialize ( ) : void

Initializes the graphics.

MeasureString ( string text, Font font ) : Vector2

Measures the string.

ResetTransform ( ) : void

Resets the Transform.

SetTransform ( Matrix2x3 matrix ) : void

Sets the Transform.

Private Methods

Method Description
SetHighestMultisampleType ( PresentParameters presentParameters ) : void

Sets the highest MultisampleType.

Method Details

Begin() public method

Begins the draw operation.
public Begin ( ) : void
return void

DirectXGraphics() public method

Initializes a new DirectXGraphics class.
public DirectXGraphics ( ) : System
return System

DrawArc() public method

Draws an Arc.
public DrawArc ( Pen pen, Rectangle rectangle, float startAngle, float sweepAngle ) : void
pen Pen The Pen.
rectangle Sharpex2D.Math.Rectangle The Rectangle.
startAngle float The StartAngle.
sweepAngle float The SweepAngle.
return void

DrawEllipse() public method

Draws a Ellipse.
public DrawEllipse ( Pen pen, Ellipse ellipse ) : void
pen Pen The Pen.
ellipse Sharpex2D.Math.Ellipse The Ellipse.
return void

DrawLine() public method

Draws a Line between two points.
public DrawLine ( Pen pen, Vector2 start, Vector2 target ) : void
pen Pen The Pen.
start Vector2 The Startpoint.
target Vector2 The Targetpoint.
return void

DrawPolygon() public method

Draws a Polygon.
public DrawPolygon ( Pen pen, Polygon polygon ) : void
pen Pen The Pen.
polygon Sharpex2D.Math.Polygon The Polygon.
return void

DrawRectangle() public method

Draws a Rectangle.
public DrawRectangle ( Pen pen, Rectangle rectangle ) : void
pen Pen The Pen.
rectangle Sharpex2D.Math.Rectangle The Rectangle.
return void

DrawString() public method

Draws a string.
public DrawString ( string text, Font font, Rectangle rectangle, System.Color color ) : void
text string The Text.
font Font The Font.
rectangle Sharpex2D.Math.Rectangle The Rectangle.
color System.Color The Color.
return void

DrawString() public method

Draws a string.
public DrawString ( string text, Font font, Vector2 position, System.Color color ) : void
text string The Text.
font Font The Font.
position Vector2 The Position.
color System.Color The Color.
return void

DrawTexture() public method

Draws a Texture.
public DrawTexture ( SpriteSheet spriteSheet, Rectangle rectangle, System.Color color, float opacity = 1 ) : void
spriteSheet SpriteSheet The SpriteSheet.
rectangle Sharpex2D.Math.Rectangle The Rectangle.
color System.Color The Color.
opacity float The Opacity.
return void

DrawTexture() public method

Draws a Texture.
public DrawTexture ( SpriteSheet spriteSheet, Vector2 position, System.Color color, float opacity = 1 ) : void
spriteSheet SpriteSheet The SpriteSheet.
position Vector2 The Position.
color System.Color The Color.
opacity float The Opacity.
return void

DrawTexture() public method

Draws a Texture.
public DrawTexture ( Texture2D texture, Rectangle rectangle, System.Color color, float opacity = 1 ) : void
texture Texture2D The Texture.
rectangle Sharpex2D.Math.Rectangle The Rectangle.
color System.Color The Color.
opacity float The Opacity.
return void

DrawTexture() public method

Draws a Texture.
public DrawTexture ( Texture2D texture, Rectangle source, Rectangle destination, System.Color color, float opacity = 1 ) : void
texture Texture2D The Texture.
source Sharpex2D.Math.Rectangle The SourceRectangle.
destination Sharpex2D.Math.Rectangle The DestinationRectangle.
color System.Color The Color.
opacity float The Opacity.
return void

DrawTexture() public method

Draws a Texture.
public DrawTexture ( Texture2D texture, Vector2 position, System.Color color, float opacity = 1 ) : void
texture Texture2D The Texture.
position Vector2 The Position.
color System.Color The Color.
opacity float The Opacity.
return void

End() public method

Ends the draw operation.
public End ( ) : void
return void

FillEllipse() public method

Fills a Ellipse.
public FillEllipse ( System.Color color, Ellipse ellipse ) : void
color System.Color The Color.
ellipse Sharpex2D.Math.Ellipse The Ellipse.
return void

FillPolygon() public method

Fills a Polygon.
public FillPolygon ( System.Color color, Polygon polygon ) : void
color System.Color The Color.
polygon Sharpex2D.Math.Polygon The Polygon.
return void

FillRectangle() public method

Fills a Rectangle.
public FillRectangle ( System.Color color, Rectangle rectangle ) : void
color System.Color The Color.
rectangle Sharpex2D.Math.Rectangle The Rectangle.
return void

Initialize() public method

Initializes the graphics.
public Initialize ( ) : void
return void

MeasureString() public method

Measures the string.
public MeasureString ( string text, Font font ) : Vector2
text string The String.
font Font The Font.
return Vector2

ResetTransform() public method

Resets the Transform.
public ResetTransform ( ) : void
return void

SetTransform() public method

Sets the Transform.
public SetTransform ( Matrix2x3 matrix ) : void
matrix Matrix2x3 The Matrix.
return void