aboutsummaryrefslogtreecommitdiffstats
path: root/texture.scm
blob: 0de9ac302d205c5522d4265d6dd20fa119ee99d1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
;;; -------------------------
;;; Texture drawing functions
;;; -------------------------

;; Draw a Texture2D
;; void DrawTexture(Texture2D texture, int posX, int posY, Color tint)
(define draw-texture
  (c-lambda (texture int int color) void "DrawTexture"))

;; Draw a Texture2D with position defined as Vector2
;; void DrawTextureV(Texture2D texture, Vector2 position, Color tint)
(define draw-texture-V
  (c-lambda (texture vec2 color) void "DrawTextureV"))

;; Draw a Texture2D with extended parameters
;; void DrawTextureEx(Texture2D texture, Vector2 position, float rotation, float scale, Color tint)

;; Draw a part of a texture defined by a rectangle
;; void DrawTextureRec(Texture2D texture, Rectangle source, Vector2 position, Color tint)
(define draw-texture-rec
  (c-lambda (texture rec vec2 color) void "DrawTextureRec"))

;; Draw a part of a texture defined by a rectangle with 'pro' parameters
;; void DrawTexturePro(Texture2D texture, Rectangle source, Rectangle dest, Vector2 origin, float rotation, Color tint)
(define draw-texture-pro
  (c-lambda (texture rec rec vec2 float color) void "DrawTexturePro"))

;; Draws a texture (or part of it) that stretches or shrinks nicely
;; void DrawTextureNPatch(Texture2D texture, NPatchInfo nPatchInfo, Rectangle dest, Vector2 origin, float rotation, Color tint)