C# Class jxGameFramework.Data.Geomerty

Afficher le fichier Open project: jxpxxzj/WarshipGirl

Méthodes publiques

Méthode Description
DrawArc ( this spriteBatch, Vector2 center, float radius, int sides, float startingAngle, float radians, Color color ) : void

Draw a arc

DrawArc ( this spriteBatch, Vector2 center, float radius, int sides, float startingAngle, float radians, Color color, float thickness ) : void

Draw a arc

DrawArea ( this spriteBatch, Microsoft.Xna.Framework.Graphics.Texture2D texture, Vector2 pos, Rectangle source, Vector2 size, Color color ) : void
DrawArea ( this spriteBatch, Microsoft.Xna.Framework.Graphics.Texture2D texture, Vector2 pos, Rectangle source, Vector2 size, Color color, float rotation, Vector2 origin, SpriteEffects effects, float layerDepth ) : void
DrawCircle ( this spriteBatch, Vector2 center, float radius, int sides, Color color ) : void

Draw a circle

DrawCircle ( this spriteBatch, Vector2 center, float radius, int sides, Color color, float thickness ) : void

Draw a circle

DrawCircle ( this spriteBatch, float x, float y, float radius, int sides, Color color ) : void

Draw a circle

DrawCircle ( this spriteBatch, float x, float y, float radius, int sides, Color color, float thickness ) : void

Draw a circle

DrawLine ( this spriteBatch, Vector2 point1, Vector2 point2, Color color ) : void

Draws a line from point1 to point2 with an offset

DrawLine ( this spriteBatch, Vector2 point1, Vector2 point2, Color color, float thickness ) : void

Draws a line from point1 to point2 with an offset

DrawLine ( this spriteBatch, Vector2 point, float length, float angle, Color color ) : void

Draws a line from point1 to point2 with an offset

DrawLine ( this spriteBatch, Vector2 point, float length, float angle, Color color, float thickness ) : void

Draws a line from point1 to point2 with an offset

DrawLine ( this spriteBatch, float x1, float y1, float x2, float y2, Color color ) : void

Draws a line from point1 to point2 with an offset

DrawLine ( this spriteBatch, float x1, float y1, float x2, float y2, Color color, float thickness ) : void

Draws a line from point1 to point2 with an offset

DrawRectangle ( this spriteBatch, Rectangle rect, Color color ) : void

Draws a rectangle with the thickness provided

DrawRectangle ( this spriteBatch, Rectangle rect, Color color, float thickness ) : void

Draws a rectangle with the thickness provided

DrawRectangle ( this spriteBatch, Vector2 location, Vector2 size, Color color ) : void

Draws a rectangle with the thickness provided

DrawRectangle ( this spriteBatch, Vector2 location, Vector2 size, Color color, float thickness ) : void

Draws a rectangle with the thickness provided

FillRectangle ( this spriteBatch, Rectangle rect, Color color ) : void

Draws a filled rectangle

FillRectangle ( this spriteBatch, Rectangle rect, Color color, float angle ) : void

Draws a filled rectangle

FillRectangle ( this spriteBatch, Vector2 location, Vector2 size, Color color ) : void

Draws a filled rectangle

FillRectangle ( this spriteBatch, Vector2 location, Vector2 size, Color color, float angle ) : void

Draws a filled rectangle

FillRectangle ( this spriteBatch, float x, float y, float w, float h, Color color ) : void

Draws a filled rectangle

FillRectangle ( this spriteBatch, float x, float y, float w, float h, Color color, float angle ) : void

Draws a filled rectangle

FromMonoColor ( this gdicolor, Color color ) : System.Drawing.Color
PutPixel ( this spriteBatch, Vector2 position, Color color ) : void
PutPixel ( this spriteBatch, float x, float y, Color color ) : void

Private Methods

Méthode Description
CreateArc ( float radius, int sides, float startingAngle, float radians ) : List

Creates a list of vectors that represents an arc

CreateCircle ( double radius, int sides ) : List

Creates a list of vectors that represents a circle

CreateThePixel ( SpriteBatch spriteBatch ) : void
DrawPoints ( SpriteBatch spriteBatch, Vector2 position, List points, Color color, float thickness ) : void

Draws a list of connecting points

Method Details

DrawArc() public static méthode

Draw a arc
public static DrawArc ( this spriteBatch, Vector2 center, float radius, int sides, float startingAngle, float radians, Color color ) : void
spriteBatch this The destination drawing surface
center Vector2 The center of the arc
radius float The radius of the arc
sides int The number of sides to generate
startingAngle float The starting angle of arc, 0 being to the east, increasing as you go clockwise
radians float The number of radians to draw, clockwise from the starting angle
color Color The color of the arc
Résultat void

DrawArc() public static méthode

Draw a arc
public static DrawArc ( this spriteBatch, Vector2 center, float radius, int sides, float startingAngle, float radians, Color color, float thickness ) : void
spriteBatch this The destination drawing surface
center Vector2 The center of the arc
radius float The radius of the arc
sides int The number of sides to generate
startingAngle float The starting angle of arc, 0 being to the east, increasing as you go clockwise
radians float The number of radians to draw, clockwise from the starting angle
color Color The color of the arc
thickness float The thickness of the arc
Résultat void

DrawArea() public static méthode

public static DrawArea ( this spriteBatch, Microsoft.Xna.Framework.Graphics.Texture2D texture, Vector2 pos, Rectangle source, Vector2 size, Color color ) : void
spriteBatch this
texture Microsoft.Xna.Framework.Graphics.Texture2D
pos Vector2
source Microsoft.Xna.Framework.Rectangle
size Vector2
color Color
Résultat void

DrawArea() public static méthode

public static DrawArea ( this spriteBatch, Microsoft.Xna.Framework.Graphics.Texture2D texture, Vector2 pos, Rectangle source, Vector2 size, Color color, float rotation, Vector2 origin, SpriteEffects effects, float layerDepth ) : void
spriteBatch this
texture Microsoft.Xna.Framework.Graphics.Texture2D
pos Vector2
source Microsoft.Xna.Framework.Rectangle
size Vector2
color Color
rotation float
origin Vector2
effects SpriteEffects
layerDepth float
Résultat void

DrawCircle() public static méthode

Draw a circle
public static DrawCircle ( this spriteBatch, Vector2 center, float radius, int sides, Color color ) : void
spriteBatch this The destination drawing surface
center Vector2 The center of the circle
radius float The radius of the circle
sides int The number of sides to generate
color Color The color of the circle
Résultat void

DrawCircle() public static méthode

Draw a circle
public static DrawCircle ( this spriteBatch, Vector2 center, float radius, int sides, Color color, float thickness ) : void
spriteBatch this The destination drawing surface
center Vector2 The center of the circle
radius float The radius of the circle
sides int The number of sides to generate
color Color The color of the circle
thickness float The thickness of the lines used
Résultat void

DrawCircle() public static méthode

Draw a circle
public static DrawCircle ( this spriteBatch, float x, float y, float radius, int sides, Color color ) : void
spriteBatch this The destination drawing surface
x float The center X of the circle
y float The center Y of the circle
radius float The radius of the circle
sides int The number of sides to generate
color Color The color of the circle
Résultat void

DrawCircle() public static méthode

Draw a circle
public static DrawCircle ( this spriteBatch, float x, float y, float radius, int sides, Color color, float thickness ) : void
spriteBatch this The destination drawing surface
x float The center X of the circle
y float The center Y of the circle
radius float The radius of the circle
sides int The number of sides to generate
color Color The color of the circle
thickness float The thickness of the lines used
Résultat void

DrawLine() public static méthode

Draws a line from point1 to point2 with an offset
public static DrawLine ( this spriteBatch, Vector2 point1, Vector2 point2, Color color ) : void
spriteBatch this The destination drawing surface
point1 Vector2 The first point
point2 Vector2 The second point
color Color The color to use
Résultat void

DrawLine() public static méthode

Draws a line from point1 to point2 with an offset
public static DrawLine ( this spriteBatch, Vector2 point1, Vector2 point2, Color color, float thickness ) : void
spriteBatch this The destination drawing surface
point1 Vector2 The first point
point2 Vector2 The second point
color Color The color to use
thickness float The thickness of the line
Résultat void

DrawLine() public static méthode

Draws a line from point1 to point2 with an offset
public static DrawLine ( this spriteBatch, Vector2 point, float length, float angle, Color color ) : void
spriteBatch this The destination drawing surface
point Vector2 The starting point
length float The length of the line
angle float The angle of this line from the starting point in radians
color Color The color to use
Résultat void

DrawLine() public static méthode

Draws a line from point1 to point2 with an offset
public static DrawLine ( this spriteBatch, Vector2 point, float length, float angle, Color color, float thickness ) : void
spriteBatch this The destination drawing surface
point Vector2 The starting point
length float The length of the line
angle float The angle of this line from the starting point
color Color The color to use
thickness float The thickness of the line
Résultat void

DrawLine() public static méthode

Draws a line from point1 to point2 with an offset
public static DrawLine ( this spriteBatch, float x1, float y1, float x2, float y2, Color color ) : void
spriteBatch this The destination drawing surface
x1 float The X coord of the first point
y1 float The Y coord of the first point
x2 float The X coord of the second point
y2 float The Y coord of the second point
color Color The color to use
Résultat void

DrawLine() public static méthode

Draws a line from point1 to point2 with an offset
public static DrawLine ( this spriteBatch, float x1, float y1, float x2, float y2, Color color, float thickness ) : void
spriteBatch this The destination drawing surface
x1 float The X coord of the first point
y1 float The Y coord of the first point
x2 float The X coord of the second point
y2 float The Y coord of the second point
color Color The color to use
thickness float The thickness of the line
Résultat void

DrawRectangle() public static méthode

Draws a rectangle with the thickness provided
public static DrawRectangle ( this spriteBatch, Rectangle rect, Color color ) : void
spriteBatch this The destination drawing surface
rect Microsoft.Xna.Framework.Rectangle The rectangle to draw
color Color The color to draw the rectangle in
Résultat void

DrawRectangle() public static méthode

Draws a rectangle with the thickness provided
public static DrawRectangle ( this spriteBatch, Rectangle rect, Color color, float thickness ) : void
spriteBatch this The destination drawing surface
rect Microsoft.Xna.Framework.Rectangle The rectangle to draw
color Color The color to draw the rectangle in
thickness float The thickness of the lines
Résultat void

DrawRectangle() public static méthode

Draws a rectangle with the thickness provided
public static DrawRectangle ( this spriteBatch, Vector2 location, Vector2 size, Color color ) : void
spriteBatch this The destination drawing surface
location Vector2 Where to draw
size Vector2 The size of the rectangle
color Color The color to draw the rectangle in
Résultat void

DrawRectangle() public static méthode

Draws a rectangle with the thickness provided
public static DrawRectangle ( this spriteBatch, Vector2 location, Vector2 size, Color color, float thickness ) : void
spriteBatch this The destination drawing surface
location Vector2 Where to draw
size Vector2 The size of the rectangle
color Color The color to draw the rectangle in
thickness float The thickness of the line
Résultat void

FillRectangle() public static méthode

Draws a filled rectangle
public static FillRectangle ( this spriteBatch, Rectangle rect, Color color ) : void
spriteBatch this The destination drawing surface
rect Microsoft.Xna.Framework.Rectangle The rectangle to draw
color Color The color to draw the rectangle in
Résultat void

FillRectangle() public static méthode

Draws a filled rectangle
public static FillRectangle ( this spriteBatch, Rectangle rect, Color color, float angle ) : void
spriteBatch this The destination drawing surface
rect Microsoft.Xna.Framework.Rectangle The rectangle to draw
color Color The color to draw the rectangle in
angle float The angle in radians to draw the rectangle at
Résultat void

FillRectangle() public static méthode

Draws a filled rectangle
public static FillRectangle ( this spriteBatch, Vector2 location, Vector2 size, Color color ) : void
spriteBatch this The destination drawing surface
location Vector2 Where to draw
size Vector2 The size of the rectangle
color Color The color to draw the rectangle in
Résultat void

FillRectangle() public static méthode

Draws a filled rectangle
public static FillRectangle ( this spriteBatch, Vector2 location, Vector2 size, Color color, float angle ) : void
spriteBatch this The destination drawing surface
location Vector2 Where to draw
size Vector2 The size of the rectangle
color Color The color to draw the rectangle in
angle float The angle in radians to draw the rectangle at
Résultat void

FillRectangle() public static méthode

Draws a filled rectangle
public static FillRectangle ( this spriteBatch, float x, float y, float w, float h, Color color ) : void
spriteBatch this The destination drawing surface
x float The X coord of the left side
y float The Y coord of the upper side
w float Width
h float Height
color Color The color to draw the rectangle in
Résultat void

FillRectangle() public static méthode

Draws a filled rectangle
public static FillRectangle ( this spriteBatch, float x, float y, float w, float h, Color color, float angle ) : void
spriteBatch this The destination drawing surface
x float The X coord of the left side
y float The Y coord of the upper side
w float Width
h float Height
color Color The color to draw the rectangle in
angle float The angle of the rectangle in radians
Résultat void

FromMonoColor() public static méthode

public static FromMonoColor ( this gdicolor, Color color ) : System.Drawing.Color
gdicolor this
color Color
Résultat System.Drawing.Color

PutPixel() public static méthode

public static PutPixel ( this spriteBatch, Vector2 position, Color color ) : void
spriteBatch this
position Vector2
color Color
Résultat void

PutPixel() public static méthode

public static PutPixel ( this spriteBatch, float x, float y, Color color ) : void
spriteBatch this
x float
y float
color Color
Résultat void