C# Class SpaceSim.Drawing.RenderUtils

Show file Open project: zlynn1990/SpaceSim Class Usage Examples

Public Properties

Property Type Description
ScreenArea int
ScreenHeight int
ScreenWidth int

Public Methods

Method Description
ComputeBoundingBox ( DVector2 position, RectangleD cameraBounds, double width, double height ) : RectangleF
ComputeEllipseSize ( DVector2 position, RectangleD cameraBounds, double radius ) : RectangleF
DrawLine ( Graphics graphics, RectangleD cameraBounds, DVector2 start, DVector2 end, Color color ) : void
DrawRectangles ( Graphics graphics, List rectangles, Color color ) : void
GetContext ( bool highQuality, Bitmap source ) : Graphics
WorldToScreen ( DVector2 point, RectangleD cameraBounds ) : PointF

Method Details

ComputeBoundingBox() public static method

public static ComputeBoundingBox ( DVector2 position, RectangleD cameraBounds, double width, double height ) : RectangleF
position VectorMath.DVector2
cameraBounds VectorMath.RectangleD
width double
height double
return System.Drawing.RectangleF

ComputeEllipseSize() public static method

public static ComputeEllipseSize ( DVector2 position, RectangleD cameraBounds, double radius ) : RectangleF
position VectorMath.DVector2
cameraBounds VectorMath.RectangleD
radius double
return System.Drawing.RectangleF

DrawLine() public static method

public static DrawLine ( Graphics graphics, RectangleD cameraBounds, DVector2 start, DVector2 end, Color color ) : void
graphics System.Drawing.Graphics
cameraBounds VectorMath.RectangleD
start VectorMath.DVector2
end VectorMath.DVector2
color System.Drawing.Color
return void

DrawRectangles() public static method

public static DrawRectangles ( Graphics graphics, List rectangles, Color color ) : void
graphics System.Drawing.Graphics
rectangles List
color System.Drawing.Color
return void

GetContext() public static method

public static GetContext ( bool highQuality, Bitmap source ) : Graphics
highQuality bool
source System.Drawing.Bitmap
return System.Drawing.Graphics

WorldToScreen() public static method

public static WorldToScreen ( DVector2 point, RectangleD cameraBounds ) : PointF
point VectorMath.DVector2
cameraBounds VectorMath.RectangleD
return System.Drawing.PointF

Property Details

ScreenArea public static property

public static int ScreenArea
return int

ScreenHeight public static property

public static int ScreenHeight
return int

ScreenWidth public static property

public static int ScreenWidth
return int