summaryrefslogtreecommitdiffhomepage
path: root/examples/textures_srcrec_dstrec.c
diff options
context:
space:
mode:
authorRay <[email protected]>2016-02-20 01:09:47 +0100
committerRay <[email protected]>2016-02-20 01:09:47 +0100
commit4b6e6d4dd45fc3a47b82af7eeb60871140a7eccf (patch)
treed9ee679c3b0bc5d4a20b31930994deb0e4c37948 /examples/textures_srcrec_dstrec.c
parentf582ab06add085594f2579ee6e7d625212abd204 (diff)
parent954ced21a42eb489ad382b4c00406a28778fee41 (diff)
downloadraylib-4b6e6d4dd45fc3a47b82af7eeb60871140a7eccf.tar.gz
raylib-4b6e6d4dd45fc3a47b82af7eeb60871140a7eccf.zip
Merge pull request #83 from raysan5/develop
Develop branch integration
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);