C# Class fCraft.ShapesLib

Show file Open project: GlennMR/800craft Class Usage Examples

Public Properties

Property Type Description
blockCount int
player Player

Public Methods

Method Description
Crop ( Bitmap bmp ) : Bitmap
Draw ( Bitmap img ) : void
DrawRegularPolygon ( int sides, int startingAngle, bool FillPoly ) : void
DrawSpiral ( ) : void
DrawStar ( int num_points, int Radius, bool Fill ) : void
ShapesLib ( Block BlockColor, Vector3I Marks, Player p, int radius, Direction dir ) : System

Private Methods

Method Description
CalculateConcaveRadius ( int num_points, int skip ) : double
CalculateVertices ( int sides, int radius, int startingAngle, Point center ) : Point[]
DegreesToXY ( float degrees, float radius, Point origin ) : Point
DrawBitmap ( int Width, int Height ) : void
DrawOneBlock ( Player player, Map map, Block drawBlock, Vector3I coord, BlockChangeContext context, int &blocks, int &blocksDenied, fCraft undoState ) : void
DrawPhiRectanglesOnGraphics ( List points, double x, double y, double wid, double hgt, RectOrientations orientation ) : void
FindIntersection ( PointF p1, PointF p2, PointF p3, PointF p4, bool &lines_intersect, bool &segments_intersect, PointF &intersection, PointF &close_p1, PointF &close_p2 ) : void
MakeStarPoints ( double start_theta, int num_points, int Radius ) : System.Drawing.PointF[]

Method Details

Crop() public static method

public static Crop ( Bitmap bmp ) : Bitmap
bmp System.Drawing.Bitmap
return System.Drawing.Bitmap

Draw() public method

public Draw ( Bitmap img ) : void
img System.Drawing.Bitmap
return void

DrawRegularPolygon() public method

public DrawRegularPolygon ( int sides, int startingAngle, bool FillPoly ) : void
sides int
startingAngle int
FillPoly bool
return void

DrawSpiral() public method

public DrawSpiral ( ) : void
return void

DrawStar() public method

public DrawStar ( int num_points, int Radius, bool Fill ) : void
num_points int
Radius int
Fill bool
return void

ShapesLib() public method

public ShapesLib ( Block BlockColor, Vector3I Marks, Player p, int radius, Direction dir ) : System
BlockColor Block
Marks Vector3I
p Player
radius int
dir Direction
return System

Property Details

blockCount public property

public int blockCount
return int

player public property

public Player,fCraft player
return Player