summaryrefslogtreecommitdiff
path: root/examples/image_draw/main.lua
diff options
context:
space:
mode:
Diffstat (limited to 'examples/image_draw/main.lua')
-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 8c1ea82..ac8e7e6 100644
--- a/examples/image_draw/main.lua
+++ b/examples/image_draw/main.lua
@@ -13,7 +13,7 @@ function RL.init()
RL.SetWindowState( RL.FLAG_WINDOW_RESIZABLE )
RL.SetWindowState( RL.FLAG_VSYNC_HINT )
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], RL.WHITE )
+ image = RL.GenImageColor( winSize, RL.WHITE )
-- Test changing working directory.
RL.ChangeDirectory( RL.GetBasePath().."../resources" )
catImage = RL.LoadImage( RL.GetWorkingDirectory().."/images/cat.png" )
@@ -24,14 +24,14 @@ function RL.init()
RL.ImageDrawRectangle( image, { 120, 64, 32, 64 }, RL.BLUE )
RL.ImageDrawRectangleLines( image, { 160, 64, 32, 64 }, 2.0, RL.BLUE )
RL.ImageDraw( image, catImage, { 143, 25, 230, 250 }, { 200, 200, 230, 250 }, RL.WHITE )
- RL.ImageDrawTextEx( image, 0, "Hello", { 300, 32 }, 48.0, 1.0, RL.WHITE )
+ RL.ImageDrawTextEx( image, RL.defaultFont, "Hello", { 300, 32 }, 48.0, 1.0, RL.WHITE )
local src = { 80, 70, 96, 96 }
catCopy = RL.ImageFromImage( catImage, src )
RL.ImageDraw( image, catCopy, src, { 600, 200, src[3], src[4] }, RL.WHITE )
- textImage = RL.ImageText( 0, "Cat", 10, 4, RL.WHITE )
+ textImage = RL.ImageText( RL.defaultFont, "Cat", 10, 4, RL.WHITE )
local imageSize = RL.GetImageSize( textImage )
RL.ImageDraw( image, textImage, { 0, 0, imageSize[1], imageSize[2] }, { 250, 40, imageSize[1], imageSize[2] }, RL.WHITE )