Jump to content
  • Sky
  • Blueberry
  • Slate
  • Blackcurrant
  • Watermelon
  • Strawberry
  • Orange
  • Banana
  • Apple
  • Emerald
  • Chocolate
  • Charcoal
tima_gt

BlocksImageAPI [2D optimized images library]

Recommended Posts

BlocksImageAPI (Made for my project - tde-desktop as optimization for wallpapers)

 

Example on TIER III graphics card:

86a9f08ce5e1.png

 

Example on TIER II graphic card:

724d4dfeef55.png

Example program code:

defX = 80
defY = 25
term = require("term")
setpos = term.setCursor
dofile("tde-apis")
gl.setResolution(defX,defY)
wallpaper = loadImage("tde-wallpaper")

setbg(0xFFFFFF)
xfill(1,1,defX,defY," ")
drawImage(wallpaper)
setbg(0x000000)
xfill(1,1,defX, 1, " ")
setpos(1,1)
write("[S] [Меню]")

This API have 2 functions:

  1.  loadImage(filepath : string)

  2.  drawImage(image : array of integer)


Pastebin Link (API) - http://pastebin.com/TiZPa8PN

Pastebin Link (Drawing program) - http://pastebin.com/M8cTPXAV

 

Drawing Program MAN:

 

e67e37f42305.png

Translations for not russian users:

[Ðовый блок] = [New Block]
[Сохранить] = [Save]
[Выйти] = [Quit]
Выберите 1 позицию блока = choose the first position
Выберите 2 позицию блока = choose the second position
Цвет:_ = Color:_
Сохранение изображениÑ... = Saving...

USE : tde-paint <new image name>

This program is not edits old images yet and don't have "UNDO" functionality.
Attention! This program at the early stage of development! It can crash or work incorrect.
Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use and Privacy Policy.