Jump to content




litPix - Little Pixels without Limits [v0.8]


5 replies to this topic

#1 _strx

  • Members
  • 58 posts

Posted 21 July 2017 - 04:26 PM

litPix v0.8

[https://pastebin.com/aNXSpC0r]

Little Pixels without Limits


litPix (Little Pixels) is an API that can be used to make square pixels in CC, with a normal size of 28x51.

litPix can be used for a plethora of things, like video games and drawing applications. litPix is only in Beta, and is missing features and needs some speed optimization. Unlike the majority of APIs, you must run the API, instead of loading it.


Functions:

litpix.setBackgroundColor(color) - Sets Background Color to color

litpix.clear() - Clear Screen

litpix.drawPixel(x, y, c) - Draws LitPix pixel at x, y

litpix.drawLine(x1, y1, x2, y2, c) - Draws line from x1,y1 to x2,y2 with color c

litpix.drawRect(x1, y1, x2, y2, c, filled) - Draws rectangle with color c, if filled is true it will fill

litpix.drawPoly(x1, y1, x2, y2, x3, y3..., c) - Draws polygon with color c

litpix.createSymbol(table) - Returns LitPix symbol; Table must be a 2 dimensional array; 0 is transparent, 1 is the first color in the pallete, etc...
litpix.createPallete(table) - Returns LitPix pallete; Pallete must be an array

litpix.drawSymbol(x, y, symbol, pallete) - Draws Symbol with Pallete

litpix.push() - Disables Rendering until Pop is executed

litpis.pop() - Render immediately and allow rendering after Push


For more information, look at the Example Program's code. I am working on a Wiki.



https://pastebin.com/aNXSpC0

Example Program: https://pastebin.com/L4GCTcDd


Screenshot of Example Program:

Posted Image


Todo:

Todo List


Enjoy!



#2 The Crazy Phoenix

  • Members
  • 136 posts
  • LocationProbably within 2 metres of my laptop.

Posted 24 July 2017 - 03:41 PM

You can use "term.getSize" to get the size of the display. That will allow your program to work correctly on customized computers, pocket computers and monitors.

#3 _strx

  • Members
  • 58 posts

Posted 31 July 2017 - 11:30 PM

View PostThe Crazy Phoenix, on 24 July 2017 - 03:41 PM, said:

You can use "term.getSize" to get the size of the display. That will allow your program to work correctly on customized computers, pocket computers and monitors.

EDIT: Yeah I'll try to fix that. Sorry.

Edited by PixelFox1, 29 October 2017 - 06:52 PM.


#4 The Crazy Phoenix

  • Members
  • 136 posts
  • LocationProbably within 2 metres of my laptop.

Posted 31 July 2017 - 11:48 PM

View PostPixelFox1, on 31 July 2017 - 11:30 PM, said:

View PostThe Crazy Phoenix, on 24 July 2017 - 03:41 PM, said:

You can use "term.getSize" to get the size of the display. That will allow your program to work correctly on customized computers, pocket computers and monitors.

And you think I don't know that?

I was pointing it out because you hard-coded the screen dimensions into your API.

#5 CLNinja

  • Members
  • 191 posts

Posted 01 August 2017 - 01:00 AM

View PostPixelFox1, on 31 July 2017 - 11:30 PM, said:

View PostThe Crazy Phoenix, on 24 July 2017 - 03:41 PM, said:

You can use "term.getSize" to get the size of the display. That will allow your program to work correctly on customized computers, pocket computers and monitors.

And you think I don't know that?
He was stating the fact that you hard coded your values, and was letting you know term.getSize is a function. No need to be so snappy.

#6 _strx

  • Members
  • 58 posts

Posted 01 August 2017 - 09:37 PM

View PostCLNinja, on 01 August 2017 - 01:00 AM, said:

View PostPixelFox1, on 31 July 2017 - 11:30 PM, said:

View PostThe Crazy Phoenix, on 24 July 2017 - 03:41 PM, said:

You can use "term.getSize" to get the size of the display. That will allow your program to work correctly on customized computers, pocket computers and monitors.

And you think I don't know that?
He was stating the fact that you hard coded your values, and was letting you know term.getSize is a function. No need to be so snappy.

I know that I hard coded my values, it wasn't intended to be released and I just had a quick thought of doing it.





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users