aboutsummaryrefslogtreecommitdiff
path: root/examples/textures_srcrec_dstrec.c
diff options
context:
space:
mode:
authorraysan5 <raysan5@gmail.com>2016-02-11 14:56:27 +0100
committerraysan5 <raysan5@gmail.com>2016-02-11 14:56:27 +0100
commit15cd4dce4ed19bb80a765eb8eeeca0c6583d7b2a (patch)
tree335321147b8873de2cc7150a8a0a41c18b3403a1 /examples/textures_srcrec_dstrec.c
parent9cbfcbb8200252d846f447438a33cf47d32ffaf9 (diff)
downloadraylib-15cd4dce4ed19bb80a765eb8eeeca0c6583d7b2a.tar.gz
raylib-15cd4dce4ed19bb80a765eb8eeeca0c6583d7b2a.zip
Updated examples to make them clearer
Diffstat (limited to 'examples/textures_srcrec_dstrec.c')
-rw-r--r--examples/textures_srcrec_dstrec.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/examples/textures_srcrec_dstrec.c b/examples/textures_srcrec_dstrec.c
index 58917421..6d824ce6 100644
--- a/examples/textures_srcrec_dstrec.c
+++ b/examples/textures_srcrec_dstrec.c
@@ -55,6 +55,10 @@ int main()
ClearBackground(RAYWHITE);
// NOTE: Using DrawTexturePro() we can easily rotate and scale the part of the texture we draw
+ // sourceRec defines the part of the texture we use for drawing
+ // destRec defines the rectangle where our texture part will fit (scaling it to fit)
+ // origin defines the point of the texture used as reference for rotation and scaling
+ // rotation defines the texture rotation (using origin as rotation point)
DrawTexturePro(guybrush, sourceRec, destRec, origin, rotation, WHITE);
DrawLine(destRec.x, 0, destRec.x, screenHeight, GRAY);