Join us on Discord!
You can help CodeWalrus stay online by donating here.

[TI-83+/84+] Draw (Axe)

Started by Snektron, February 14, 2015, 04:25:53 PM

Previous topic - Next topic

0 Members and 4 Guests are viewing this topic.

Snektron

One of my friends asked if i could make a draw program, so i did :D.

Features:
  Menu's:
- Mode menu
    - Select actions/drawing modes
    - Open with [mode]
    - Navigate with [up]/[down]
    - select with [2nd], [mode] or [enter]

  - Size menu
    - Set pen size
    - Open with [alpha]
    - change size with [up]/[down]
    - Select with [alpha]

  - Pattern menu
    - Set drawing pattern
    - Open with [X,T,θ, n]
    -  Navigate with [up]/[down]
    - Select with [2nd], [X,T,θ, n] or [enter]

  Actions/Drawmode's
    - Pen:
      - Draws with the selected pattern and size
      - draw by holding [2nd]
      - Set size with [alpha]
    - Eraser:
      - Clears with the selected size
      - erase by holding [2nd]
      - Set size with [alpha]
    - Quit:
      - Exits the program
    - Clear:
      - Clears the image
      - Activates immediately and selects pen after activating
    - Line:
      - Draw a line
      - Press [2nd] for point 1 and a second time for point 2
      - Press [Del] to cancel
    - Invert:
      - Inverts the image
      - Activates immediately and selects pen after activating
    - Circle:
      - Draws a circle
      - Press [2nd] to set the origin and a second time for a point to specify the radius
      - Press [del] to cancel
    - Flood:
      - Floods an area with the selected pattern
      - Activates when [2nd] is pressed
    - Save:
      - Save current image to a pic var
      - Displays an error message when there is too little free ram
    - Open:
      - Open pic var and copy to image, overwriting everything
      - Diplays an error message when the pic var is undefined

  Misc
    - Hold [Y=] to speed up the cursor
    - When quitting, the current image is saved to an appvar and loaded when the program is reopened

Credits to DarkestEx for the pic pixel test algoritm and to MGOS for the flood fill
Download zip contains:
  - Draw.8xk -- the main app
  - Draw.8xp -- the axe source
  - readme.txt -- the readme

This was intended as App but will probably work when compiled as Program, though you will have to change the name
as it contains lower case characters.
If you find any bugs or have any ideas i should add let me know.
Have fun with it :P
  • Calculators owned: TI-84+
Legends say if you spam more than DJ Omnimaga, you will become a walrus...


Dream of Omnimaga

I don't have much time to test it now, but do you have a screenshot? I know there are many paint programs for the 84+ series so I am curious about what this one has to offer that others lack :) The flood filling feature seems like a great addition, though.

Is there grayscale support?

One issue that many paint programs had in the past was the very large amount of RAM they took during runtime.
  • Calculators owned: TI-82 Advanced Edition Python TI-84+ TI-84+CSE TI-84+CE TI-84+CEP TI-86 TI-89T cfx-9940GT fx-7400G+ fx 1.0+ fx-9750G+ fx-9860G fx-CG10 HP 49g+ HP 39g+ HP 39gs (bricked) HP 39gII HP Prime G1 HP Prime G2 Sharp EL-9600C
  • Consoles, mobile devices and vintage computers owned: Huawei P30 Lite, Moto G 5G, Nintendo 64 (broken), Playstation, Wii U

Snektron

Quote from: DJ Omnimaga on February 14, 2015, 04:33:50 PM
I don't have much time to test it now, but do you have a screenshot?

Oh right. i knew i forgot something :3=

Quote from: DJ Omnimaga on February 14, 2015, 04:33:50 PM
Is there grayscale support?

Sadly, no. I already had to use all the freeram areas for the rest, especially the floodfill tool
uses a lot.

Quote from: DJ Omnimaga on February 14, 2015, 04:33:50 PM
One issue that many paint programs had in the past was the very large amount of RAM they took during runtime.

While i use allmost all the freeram areas, it only uses the appvar to save the current image as temporary
ram.
  • Calculators owned: TI-84+
Legends say if you spam more than DJ Omnimaga, you will become a walrus...


Dream of Omnimaga

#3
Aah ok that seems good about the RAM. Back then I never really used on-calc image editors because to run them I needed like 8 KB of RAM, so I hated to have to archive my entire game then unarchive the drawing utility and vice-versa, especially when I used a regular 83+ with lots of garbage collects (and the resulting battery bill). Free RAM areas helps a lot at least. How much free RAM does flood fill use to fill a 24x24 area by the way? What if the image is very complex like if you try to flood fill a maze?


EDIT: Also my 2000th post *.* (this was twice faster than on Omnimaga)
  • Calculators owned: TI-82 Advanced Edition Python TI-84+ TI-84+CSE TI-84+CE TI-84+CEP TI-86 TI-89T cfx-9940GT fx-7400G+ fx 1.0+ fx-9750G+ fx-9860G fx-CG10 HP 49g+ HP 39g+ HP 39gs (bricked) HP 39gII HP Prime G1 HP Prime G2 Sharp EL-9600C
  • Consoles, mobile devices and vintage computers owned: Huawei P30 Lite, Moto G 5G, Nintendo 64 (broken), Playstation, Wii U

Snektron

#4
It uses a fixed size algoritm i found on omnimaga.org :3=. So it doesn't matter how
complex the area is, it will always use 3x768 bytes (2x768 for the algorithm and another 768 to mark
the changed pixels for the pattern)
  • Calculators owned: TI-84+
Legends say if you spam more than DJ Omnimaga, you will become a walrus...


Dream of Omnimaga

Erm, Omnimaga.net doesn't exist. :P But I see. I wasn't sure if smaller areas used less RAM. I assume more complex areas must be slow though, but it's understandable on a 6 MHz calc. Even on a 100 MHz computer flood filling simple areas was rather laggy.


EDIT: Woah I just saw the screenshots. Looks good so far, especially the sliding menu :D
  • Calculators owned: TI-82 Advanced Edition Python TI-84+ TI-84+CSE TI-84+CE TI-84+CEP TI-86 TI-89T cfx-9940GT fx-7400G+ fx 1.0+ fx-9750G+ fx-9860G fx-CG10 HP 49g+ HP 39g+ HP 39gs (bricked) HP 39gII HP Prime G1 HP Prime G2 Sharp EL-9600C
  • Consoles, mobile devices and vintage computers owned: Huawei P30 Lite, Moto G 5G, Nintendo 64 (broken), Playstation, Wii U

Snektron

Thanks :D
I've made a few gifs of filling complex areas.
Indeed it takes a few sec, but not too too long :)
  • Calculators owned: TI-84+
Legends say if you spam more than DJ Omnimaga, you will become a walrus...


Dream of Omnimaga

That isn't particularly complex. By complex I meant something like this starting from the middle in the white areas :P

  • Calculators owned: TI-82 Advanced Edition Python TI-84+ TI-84+CSE TI-84+CE TI-84+CEP TI-86 TI-89T cfx-9940GT fx-7400G+ fx 1.0+ fx-9750G+ fx-9860G fx-CG10 HP 49g+ HP 39g+ HP 39gs (bricked) HP 39gII HP Prime G1 HP Prime G2 Sharp EL-9600C
  • Consoles, mobile devices and vintage computers owned: Huawei P30 Lite, Moto G 5G, Nintendo 64 (broken), Playstation, Wii U

Snektron

#8
i'd fill it up... if i knew how to convert png's to 8xi's :3=
EDIT: Well i can just send them to my calc and get them back, only it doesnt convert properly >.<
EDIT2: A finaly got it :D
  • Calculators owned: TI-84+
Legends say if you spam more than DJ Omnimaga, you will become a walrus...


Dream of Omnimaga

Wow that seems pretty fast actually! O.O

Also I think SourceCoder can convert images to hexadecimal that can be used in Axe.TokenIDE can probably do it too. Otherwise I'm sure there are 8xi to hexadecimal converters on ticalc as well.
  • Calculators owned: TI-82 Advanced Edition Python TI-84+ TI-84+CSE TI-84+CE TI-84+CEP TI-86 TI-89T cfx-9940GT fx-7400G+ fx 1.0+ fx-9750G+ fx-9860G fx-CG10 HP 49g+ HP 39g+ HP 39gs (bricked) HP 39gII HP Prime G1 HP Prime G2 Sharp EL-9600C
  • Consoles, mobile devices and vintage computers owned: Huawei P30 Lite, Moto G 5G, Nintendo 64 (broken), Playstation, Wii U

Keoni29

Wow this is a really nice paint program. I like the animation of the tool menu :D
If you like my work, why not give me an internet?

matrefeytontias

I especially like the flooding feature. How do you achieve it ? Do you use a flood-filling algorithm, or is there some trick you use ?
  • Calculators owned: TI-83+.fr, TI-Nspire CAS prototype, TI-84+ CSE, TI-Nspire CX
My TI games (some got their own article on non-calc websites !) : http://www.ticalc.org/archives/files/authors/112/11202.html

My moozik (100% free metal) : http://www.soundcloud.com/matrefeytontias

Snektron

As i said earlier, i didn't make the algorithm myself :P
here is a link to the topic.
I did modify it a bit to allow for the patterns :)
  • Calculators owned: TI-84+
Legends say if you spam more than DJ Omnimaga, you will become a walrus...


matrefeytontias

Ah okay. Thanks for the precision.
  • Calculators owned: TI-83+.fr, TI-Nspire CAS prototype, TI-84+ CSE, TI-Nspire CX
My TI games (some got their own article on non-calc websites !) : http://www.ticalc.org/archives/files/authors/112/11202.html

My moozik (100% free metal) : http://www.soundcloud.com/matrefeytontias

Dream of Omnimaga

#14
By the way, in the last screenshot, I was wondering what causes the screen to go blank while it's flood-filling? Also should I move this topic to the Downloads section?
  • Calculators owned: TI-82 Advanced Edition Python TI-84+ TI-84+CSE TI-84+CE TI-84+CEP TI-86 TI-89T cfx-9940GT fx-7400G+ fx 1.0+ fx-9750G+ fx-9860G fx-CG10 HP 49g+ HP 39g+ HP 39gs (bricked) HP 39gII HP Prime G1 HP Prime G2 Sharp EL-9600C
  • Consoles, mobile devices and vintage computers owned: Huawei P30 Lite, Moto G 5G, Nintendo 64 (broken), Playstation, Wii U

Powered by EzPortal