doc comments fixed and new draw methods added
This commit is contained in:
parent
09979569bb
commit
ed99ded786
2 changed files with 92 additions and 8 deletions
|
|
@ -1020,11 +1020,11 @@ public static unsafe partial class Raylib
|
|||
[DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern void SetShapesTexture(Texture2D texture, Rectangle source);
|
||||
|
||||
// <summary>Get texture that is used for shapes drawing</summary>
|
||||
/// <summary>Get texture that is used for shapes drawing</summary>
|
||||
[DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern Texture2D GetShapesTexture();
|
||||
|
||||
// <summary>Get texture source rectangle that is used for shapes drawing</summary>
|
||||
/// <summary>Get texture source rectangle that is used for shapes drawing</summary>
|
||||
[DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern Rectangle GetShapesTextureRectangle();
|
||||
|
||||
|
|
@ -1228,7 +1228,7 @@ public static unsafe partial class Raylib
|
|||
Color color
|
||||
);
|
||||
|
||||
// <summary>Draw rectangle with rounded edges outline</summary>
|
||||
/// <summary>Draw rectangle with rounded edges outline</summary>
|
||||
[DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern void DrawRectangleRoundedLinesEx(
|
||||
Rectangle rec,
|
||||
|
|
@ -1356,7 +1356,7 @@ public static unsafe partial class Raylib
|
|||
[DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern CBool CheckCollisionCircleRec(Vector2 center, float radius, Rectangle rec);
|
||||
|
||||
// <summary>Check if circle collides with a line created betweeen two points [p1] and [p2]</summary>
|
||||
/// <summary>Check if circle collides with a line created betweeen two points [p1] and [p2]</summary>
|
||||
[DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern CBool CheckCollisionCircleLine(Vector2 center, float radius, Vector2 p1, Vector2 p2);
|
||||
|
||||
|
|
@ -1524,7 +1524,7 @@ public static unsafe partial class Raylib
|
|||
[DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern Image ImageFromImage(Image image, Rectangle rec);
|
||||
|
||||
// <summary>Create an image from a selected channel of another image (GRAYSCALE)</summary>
|
||||
/// <summary>Create an image from a selected channel of another image (GRAYSCALE)</summary>
|
||||
[DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern Image ImageFromChannel(Image image, int selectedChannel);
|
||||
|
||||
|
|
@ -1568,7 +1568,7 @@ public static unsafe partial class Raylib
|
|||
[DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern void ImageBlurGaussian(Image* image, int blurSize);
|
||||
|
||||
// <summary>Apply custom square convolution kernel to image</summary>
|
||||
/// <summary>Apply custom square convolution kernel to image</summary>
|
||||
[DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern void ImageKernelConvolution(Image* image, float* kernel, int kernelSize);
|
||||
|
||||
|
|
@ -1698,6 +1698,10 @@ public static unsafe partial class Raylib
|
|||
[DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern void ImageDrawLineV(Image* dst, Vector2 start, Vector2 end, Color color);
|
||||
|
||||
/// <summary>Draw a line defining thickness within an image</summary>
|
||||
[DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern void ImageDrawLineEx(Image* dst, Vector2 start, Vector2 end, int thick, Color color);
|
||||
|
||||
/// <summary>Draw circle within an image</summary>
|
||||
[DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern void ImageDrawCircle(Image* dst, int centerX, int centerY, int radius, Color color);
|
||||
|
|
@ -1737,6 +1741,26 @@ public static unsafe partial class Raylib
|
|||
[DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern void ImageDrawRectangleLines(Image* dst, Rectangle rec, int thick, Color color);
|
||||
|
||||
/// <summary>Draw triangle within an image</summary>
|
||||
[DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern void ImageDrawTriangle(Image* dst, Vector2 v1, Vector2 v2, Vector2 v3, Color color);
|
||||
|
||||
/// <summary>Draw triangle with interpolated colors within an image</summary>
|
||||
[DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern void ImageDrawTriangleEx(Image* dst, Vector2 v1, Vector2 v2, Vector2 v3, Color c1, Color c2, Color c3);
|
||||
|
||||
/// <summary>Draw triangle outline within an image</summary>
|
||||
[DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern void ImageDrawTriangleLines(Image* dst, Vector2 v1, Vector2 v2, Vector2 v3, Color color);
|
||||
|
||||
/// <summary>Draw a triangle fan defined by points within an image (first vertex is the center)</summary>
|
||||
[DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern void ImageDrawTriangleFan(Image* dst, Vector2* points, int pointCount, Color color);
|
||||
|
||||
/// <summary>Draw a triangle strip defined by points within an image</summary>
|
||||
[DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern void ImageDrawTriangleStrip(Image* dst, Vector2* points, int pointCount, Color color);
|
||||
|
||||
/// <summary>Draw a source image within a destination image (tint applied to source)</summary>
|
||||
[DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern void ImageDraw(Image* dst, Image src, Rectangle srcRec, Rectangle dstRec, Color tint);
|
||||
|
|
@ -2129,7 +2153,7 @@ public static unsafe partial class Raylib
|
|||
// Text strings management functions (no UTF-8 strings, only byte chars)
|
||||
// NOTE: Some strings allocate memory internally for returned strings, just be careful!
|
||||
|
||||
// <summary>Copy one string to another, returns bytes copied</summary>
|
||||
/// <summary>Copy one string to another, returns bytes copied</summary>
|
||||
[DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern int TextCopy(sbyte* dst, sbyte* src);
|
||||
|
||||
|
|
|
|||
|
|
@ -507,7 +507,7 @@ public static unsafe partial class Raylib
|
|||
}
|
||||
}
|
||||
|
||||
// <summary>Apply custom square convolution kernel to image</summary>
|
||||
/// <summary>Apply custom square convolution kernel to image</summary>
|
||||
public static void ImageKernelConvolution(ref Image image, float[] kernel)
|
||||
{
|
||||
fixed (Image* imagePtr = &image)
|
||||
|
|
@ -731,6 +731,15 @@ public static unsafe partial class Raylib
|
|||
}
|
||||
}
|
||||
|
||||
/// <summary>Draw a line defining thickness within an image</summary>
|
||||
public static void ImageDrawLineEx(ref Image dst, Vector2 start, Vector2 end, int thick, Color color)
|
||||
{
|
||||
fixed (Image* p = &dst)
|
||||
{
|
||||
ImageDrawLineEx(p, start, end, thick, color);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Draw circle within an image</summary>
|
||||
public static void ImageDrawCircle(ref Image dst, int centerX, int centerY, int radius, Color color)
|
||||
{
|
||||
|
|
@ -785,6 +794,57 @@ public static unsafe partial class Raylib
|
|||
}
|
||||
}
|
||||
|
||||
/// <summary>Draw triangle within an image</summary>
|
||||
public static void ImageDrawTriangle(ref Image dst, Vector2 v1, Vector2 v2, Vector2 v3, Color color)
|
||||
{
|
||||
fixed (Image* p = &dst)
|
||||
{
|
||||
ImageDrawTriangle(p, v1, v2, v3, color);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Draw triangle with interpolated colors within an image</summary>
|
||||
public static void ImageDrawTriangleEx(ref Image dst, Vector2 v1, Vector2 v2, Vector2 v3, Color c1, Color c2, Color c3)
|
||||
{
|
||||
fixed (Image* p = &dst)
|
||||
{
|
||||
ImageDrawTriangleEx(p, v1, v2, v3, c1, c2, c3);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Draw triangle outline within an image</summary>
|
||||
public static void ImageDrawTriangleLines(ref Image dst, Vector2 v1, Vector2 v2, Vector2 v3, Color color)
|
||||
{
|
||||
fixed (Image* p = &dst)
|
||||
{
|
||||
ImageDrawTriangleLines(p, v1, v2, v3, color);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Draw a triangle fan defined by points within an image (first vertex is the center)</summary>
|
||||
public static void ImageDrawTriangleFan(ref Image dst, Vector2[] points, Color color)
|
||||
{
|
||||
fixed (Image* imagePtr = &dst)
|
||||
{
|
||||
fixed (Vector2* vec2Ptr = points)
|
||||
{
|
||||
ImageDrawTriangleFan(imagePtr, vec2Ptr, points.Length, color);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Draw a triangle strip defined by points within an image</summary>
|
||||
public static void ImageDrawTriangleStrip(ref Image dst, Vector2[] points, Color color)
|
||||
{
|
||||
fixed (Image* imagePtr = &dst)
|
||||
{
|
||||
fixed (Vector2* vec2Ptr = points)
|
||||
{
|
||||
ImageDrawTriangleStrip(imagePtr, vec2Ptr, points.Length, color);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Draw a source image within a destination image (tint applied to source)</summary>
|
||||
public static void ImageDraw(ref Image dst, Image src, Rectangle srcRec, Rectangle dstRec, Color tint)
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in a new issue