summaryrefslogtreecommitdiff
path: root/examples/image_draw
diff options
context:
space:
mode:
authorjussi2022-05-18 18:10:45 +0300
committerjussi2022-05-18 18:10:45 +0300
commitf293e25dd821494b24e46a3bc0a612a5e03089a5 (patch)
tree27ba9780e2a5be013a2ec9e2e81c6b6b5d8e4b56 /examples/image_draw
parent59ea29d8ff9dad751659a0a42d76a5534f7b4b97 (diff)
downloadreilua-enhanced-f293e25dd821494b24e46a3bc0a612a5e03089a5.tar.gz
reilua-enhanced-f293e25dd821494b24e46a3bc0a612a5e03089a5.tar.bz2
reilua-enhanced-f293e25dd821494b24e46a3bc0a612a5e03089a5.zip
Shader load functions argument fix. File drop and change directory.
Diffstat (limited to 'examples/image_draw')
-rw-r--r--examples/image_draw/main.lua6
1 files changed, 3 insertions, 3 deletions
diff --git a/examples/image_draw/main.lua b/examples/image_draw/main.lua
index 5490c94..ee9757c 100644
--- a/examples/image_draw/main.lua
+++ b/examples/image_draw/main.lua
@@ -13,7 +13,9 @@ function init()
RL_SetWindowState( FLAG_WINDOW_RESIZABLE )
RL_SetWindowPosition( { mPos[1] + mSize[1] / 2 - winSize[1] / 2, mPos[2] + mSize[2] / 2 - winSize[2] / 2 } )
image = RL_GenImageColor( winSize[1], winSize[2], WHITE )
- catImage = RL_LoadImage( RL_GetBasePath().."../resources/images/cat.png" )
+ -- Test changing working directory.
+ RL_ChangeDirectory( RL_GetBasePath().."../resources" )
+ catImage = RL_LoadImage( RL_GetWorkingDirectory().."/images/cat.png" )
RL_ImageClearBackground( image, { 150, 60, 100 } )
RL_ImageDrawPixel( image, { 32, 32 }, WHITE )
RL_ImageDrawLine( image, { 32, 45 }, { 100, 60 }, GREEN )
@@ -23,12 +25,10 @@ function init()
RL_ImageDraw( image, catImage, { 143, 25, 230, 250 }, { 200, 200, 230, 250 }, WHITE )
RL_ImageDrawTextEx( image, 0, "Hello", { 300, 32 }, 48.0, 1.0, WHITE )
- -- catCopy = RL_ImageCopy( catImage )
local src = { 80, 70, 96, 96 }
catCopy = RL_ImageFromImage( catImage, src )
RL_ImageDraw( image, catCopy, src, { 600, 200, src[3], src[4] }, WHITE )
- -- RL_ImageDraw( image, catCopy, src, src, WHITE )
textImage = RL_ImageText( 0, "Cat", 10, 4, WHITE )
local imageSize = RL_GetImageSize( textImage )