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

tima_gt

Members
  • Content Count

    3
  • Joined

  • Last visited

  • Days Won

    1

Posts posted by tima_gt

  1. 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.
    
  2. About library:
    This library helps you to out ComputerCraft image in diamond computer.
    How to use:

     

    Install: Pastebin get xUyZWrab paintutils

     

    how to connect: dofile("/path/to/paintutils/paintutils")

     

    paintutils.loadImage("/path/to/computercraft/image/file/imagefile", X : integer, Y : integer, Color)

     

    Example:
     

    dofile("./paintutils")

    paintutils.loadImage("./test", 1, 1, 0x000000)

     

    Output of example:

    3667bfe61949.png

     

     

×
×
  • Create New...

Important Information

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