Update C sources
This commit is contained in:
parent
02424e2e10
commit
bd6bf15356
53 changed files with 62247 additions and 9914 deletions
|
@ -11,15 +11,15 @@ func main() {
|
|||
rl.InitWindow(screenWidth, screenHeight, "raylib [textures] example - texture loading and drawing")
|
||||
|
||||
// NOTE: Textures MUST be loaded after Window initialization (OpenGL context is required)
|
||||
cat := rl.LoadImage("cat.png") // Load image in CPU memory (RAM)
|
||||
cat := rl.LoadImage("cat.png") // Load image in CPU memory (RAM)
|
||||
rl.ImageCrop(cat, rl.NewRectangle(100, 10, 280, 380)) // Crop an image piece
|
||||
rl.ImageFlipHorizontal(cat) // Flip cropped image horizontally
|
||||
rl.ImageResize(cat, 150, 200) // Resize flipped-cropped image
|
||||
rl.ImageFlipHorizontal(cat) // Flip cropped image horizontally
|
||||
rl.ImageResize(cat, 150, 200) // Resize flipped-cropped image
|
||||
|
||||
parrots := rl.LoadImage("parrots.png") // Load image in CPU memory (RAM)
|
||||
|
||||
// Draw one image over the other with a scaling of 1.5f
|
||||
rl.ImageDraw(parrots, cat, rl.NewRectangle(0, 0, float32(cat.Width), float32(cat.Height)), rl.NewRectangle(30, 40, float32(cat.Width)*1.5, float32(cat.Height)*1.5))
|
||||
rl.ImageDraw(parrots, cat, rl.NewRectangle(0, 0, float32(cat.Width), float32(cat.Height)), rl.NewRectangle(30, 40, float32(cat.Width)*1.5, float32(cat.Height)*1.5), rl.White)
|
||||
rl.ImageCrop(parrots, rl.NewRectangle(0, 50, float32(parrots.Width), float32(parrots.Height-100))) // Crop resulting image
|
||||
|
||||
rl.UnloadImage(cat) // Unload image from RAM
|
||||
|
|
|
@ -12,7 +12,7 @@ func main() {
|
|||
|
||||
// TTF Font loading with custom generation parameters
|
||||
var fontChars int32
|
||||
font := rl.LoadFontEx("fonts/KAISG.ttf", 64, 0, &fontChars)
|
||||
font := rl.LoadFontEx("fonts/KAISG.ttf", 64, &fontChars, 0)
|
||||
|
||||
parrots := rl.LoadImage("parrots.png") // Load image in CPU memory (RAM)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue