Method | Description | |
---|---|---|
DrawCircle ( this texture, int x, int y, int radius, Color color ) : void |
Draws a circle with the midpoint being x0, x1. Implementation of Bresenham's circle algorithm
|
|
DrawFilledCircle ( this texture, int x, int y, int radius, Color color ) : void |
Draws a filled circle with the midpoint being x0, x1. Implementation of Bresenham's circle algorithm
|
|
DrawFilledRectangle ( this texture, |
Fills the given rectangle area with a solid color.
|
|
DrawLine ( this texture, Vector2 start, Vector2 end, Color color ) : void | ||
DrawLine ( this texture, Vector3 start, Vector3 end, Color color ) : void | ||
DrawLine ( this texture, int x0, int y0, int x1, int y1, Color color ) : void |
Draws a line between two points. Implementation of Bresenham's line algorithm.
|
|
DrawPixel ( this texture, int x, int y, Color color ) : void |
Draws a pixel just like SetPixel except 0,0 is the left top corner.
|
|
DrawPixel ( this texture, int x, int y, int width, int height, Color color ) : void |
Draws a pixel just like SetPixel except 0,0 is the left top corner. Takes the width and height as parameters - faster for calling this in a loop.
|
|
DrawRectangle ( this texture, |
Draws a rectangle
|
|
FloodFill ( this texture, int startX, int startY, Color newColor ) : void |
Starts a flood fill at point startX, startY. This is a pretty slow flood fill, biggest bottle neck is comparing two colors which happens a lot. Should be a way to make it much faster. O(n) space. n = width*height - makes a copy of the bitmap temporarily in the memory
|
Method | Description | |
---|---|---|
Circle ( |
||
Line ( |
||
PlotCircle ( |
||
ScanLineCircle ( |
||
Swap ( int &x, int &y ) : void |
Swap two ints by reference.
|
|
TransformToLeftTop_y ( float y, int height ) : int |
Transforms a point in the texture plane so that 0,0 points at left-top corner.
|
|
TransformToLeftTop_y ( int y, int height ) : int |
Transforms a point in the texture plane so that 0,0 points at left-top corner.
|
public static DrawCircle ( this texture, int x, int y, int radius, Color color ) : void | ||
texture | this | |
x | int | |
y | int | |
radius | int | |
color | Color | |
return | void |
public static DrawFilledCircle ( this texture, int x, int y, int radius, Color color ) : void | ||
texture | this | |
x | int | |
y | int | |
radius | int | |
color | Color | |
return | void |
public static DrawFilledRectangle ( this texture, |
||
texture | this | |
rectangle | ||
color | Color | |
return | void |
public static DrawLine ( this texture, Vector2 start, Vector2 end, Color color ) : void | ||
texture | this | |
start | Vector2 | |
end | Vector2 | |
color | Color | |
return | void |
public static DrawLine ( this texture, Vector3 start, Vector3 end, Color color ) : void | ||
texture | this | |
start | Vector3 | |
end | Vector3 | |
color | Color | |
return | void |
public static DrawLine ( this texture, int x0, int y0, int x1, int y1, Color color ) : void | ||
texture | this | |
x0 | int | x of the start point |
y0 | int | y of the start point |
x1 | int | x of the end point |
y1 | int | y of the end point |
color | Color | |
return | void |
public static DrawPixel ( this texture, int x, int y, Color color ) : void | ||
texture | this | |
x | int | |
y | int | |
color | Color | |
return | void |
public static DrawPixel ( this texture, int x, int y, int width, int height, Color color ) : void | ||
texture | this | |
x | int | |
y | int | |
width | int | Width of the target bitmap |
height | int | Height of the target bitmap |
color | Color | |
return | void |
public static DrawRectangle ( this texture, |
||
texture | this | |
rectangle | ||
color | Color | |
return | void |
public static FloodFill ( this texture, int startX, int startY, Color newColor ) : void | ||
texture | this | |
startX | int | |
startY | int | |
newColor | Color | |
return | void |