summaryrefslogtreecommitdiffhomepage
path: root/src/raylib.h
diff options
context:
space:
mode:
authorRay <[email protected]>2018-11-06 15:06:01 +0100
committerRay <[email protected]>2018-11-06 15:06:01 +0100
commite340517a735c9a563b39e24809b2f214ece991ad (patch)
tree7e1236317736e9294ec4b0ef05674857488f66d2 /src/raylib.h
parentc79b342f0b3d210beaddfe9895d09746259ac6f5 (diff)
downloadraylib-e340517a735c9a563b39e24809b2f214ece991ad.tar.gz
raylib-e340517a735c9a563b39e24809b2f214ece991ad.zip
Support custom texture on shapes drawing
By default, internal white texture was used to draw most of the shapes; some time ago, support for white font character from default internal font was added. That way, all basic drawing (shapes, text) could be performed without a texture change and in a single drawing pass. Now, we move a step further and we allow configuring the texture (and rectangle) used to do the shapes drawing.
Diffstat (limited to 'src/raylib.h')
-rw-r--r--src/raylib.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/raylib.h b/src/raylib.h
index c94b9f3c..49ff1c0c 100644
--- a/src/raylib.h
+++ b/src/raylib.h
@@ -970,7 +970,7 @@ RLAPI void DrawCircleLines(int centerX, int centerY, float radius, Color color);
RLAPI void DrawRectangle(int posX, int posY, int width, int height, Color color); // Draw a color-filled rectangle
RLAPI void DrawRectangleV(Vector2 position, Vector2 size, Color color); // Draw a color-filled rectangle (Vector version)
RLAPI void DrawRectangleRec(Rectangle rec, Color color); // Draw a color-filled rectangle
-RLAPI void DrawRectanglePro(Rectangle rec, Vector2 origin, float rotation, Color color); // Draw a color-filled rectangle with pro parameters
+RLAPI void DrawRectanglePro(Rectangle rec, Vector2 origin, float rotation, Color colors[static 4]); // Draw a color-filled rectangle with pro parameters
RLAPI void DrawRectangleGradientV(int posX, int posY, int width, int height, Color color1, Color color2);// Draw a vertical-gradient-filled rectangle
RLAPI void DrawRectangleGradientH(int posX, int posY, int width, int height, Color color1, Color color2);// Draw a horizontal-gradient-filled rectangle
RLAPI void DrawRectangleGradientEx(Rectangle rec, Color col1, Color col2, Color col3, Color col4); // Draw a gradient-filled rectangle with custom vertex colors
@@ -982,6 +982,8 @@ RLAPI void DrawPoly(Vector2 center, int sides, float radius, float rotation, Col
RLAPI void DrawPolyEx(Vector2 *points, int numPoints, Color color); // Draw a closed polygon defined by points
RLAPI void DrawPolyExLines(Vector2 *points, int numPoints, Color color); // Draw polygon lines
+RLAPI void SetShapesTexture(Texture2D texture, Rectangle source); // Define default texture used to draw shapes
+
// Basic shapes collision detection functions
RLAPI bool CheckCollisionRecs(Rectangle rec1, Rectangle rec2); // Check collision between two rectangles
RLAPI bool CheckCollisionCircles(Vector2 center1, float radius1, Vector2 center2, float radius2); // Check collision between two circles