### WalrusIRC

You need to have 5 posts and not be part of restricted usergroups in order to use the WalrusIRC embedded shoutbox. However, you can also access our IRC channel called #CodeWalrus via EFnet.

### Author Topic: Draw (Axe)  (Read 4369 times)

0 Members and 1 Guest are viewing this topic.

#### Snektron

• Lvl 69 Russian Snake
• CodeWalrus Staff
• Super User
• Topic Management
• Join Date: Dec 2014
• Location: Netherlands
• Posts: 3155
• Post Rating Ratio: +31/-0
• SSSssssss.....
• Gender:
##### Draw (Axe)
« on: February 14, 2015, 04:25:53 pm »
One of my friends asked if i could make a draw program, so i did .

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

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

- 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
- Draw.8xk -- the main app
- Draw.8xp -- the axe source

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
« Last Edit: March 06, 2015, 06:48:35 am by DJ Omnimaga »

• Calculators owned: TI-84+
Legends say if you spam more than DJ Omnimaga, you will become a walrus...

#### DJ Omnimaga

• Omni founder & CW co-founder
• CodeWalrus Staff
• Super User
• Forum Maintenance
• Original 5
• CodeWalrus Supporter
• Topic Management
• Join Date: Nov 2014
• Posts: 18187
• Post Rating Ratio: +91/-4
• Gender:
##### Re: Draw
« Reply #1 on: February 14, 2015, 04:33:50 pm »
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-73, TI-80 (broken), TI-81, TI-82, TI-83, TI-83+ (broken), TI-83+ (broken), TI-83+SE (broken), TI-84+, TI-84+CSE, TI-84+CE, TI-85, TI-86, TI-89T, TI-92, TI-Nspire, TI-Nspire CX (semi-broken), HP 39gII, HP Prime, Casio fx-7000G, fx-7400G+, fx-7700GE, fx-9750G+, fx-9750GII, fx-9860G, cfx-9850G, FX-1.0+, fx-CG10, fx-CP400
• Consoles, mobile devices and vintage computers owned: Samsung i5510, Nexus 5, Atari 2600, Lynx, SMS, Game Gear, Genesis, Dreamcast, NES, SNES, N64, GCN, Wii, Wii U, GBA, DS, 3DS, PS2, PS3, PS4, PSP, PSVita, XBox 360, XBOne

#### Snektron

• Lvl 69 Russian Snake
• CodeWalrus Staff
• Super User
• Topic Management
• Join Date: Dec 2014
• Location: Netherlands
• Posts: 3155
• Post Rating Ratio: +31/-0
• SSSssssss.....
• Gender:
##### Re: Draw
« Reply #2 on: February 14, 2015, 04:38:39 pm »
I don't have much time to test it now, but do you have a screenshot?

Oh right. i knew i forgot something

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.

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...

#### DJ Omnimaga

• Omni founder & CW co-founder
• CodeWalrus Staff
• Super User
• Forum Maintenance
• Original 5
• CodeWalrus Supporter
• Topic Management
• Join Date: Nov 2014
• Posts: 18187
• Post Rating Ratio: +91/-4
• Gender:
##### Re: Draw
« Reply #3 on: February 14, 2015, 04:44:40 pm »
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)
« Last Edit: February 14, 2015, 05:06:41 pm by DJ Omnimaga »
• Calculators owned: TI-73, TI-80 (broken), TI-81, TI-82, TI-83, TI-83+ (broken), TI-83+ (broken), TI-83+SE (broken), TI-84+, TI-84+CSE, TI-84+CE, TI-85, TI-86, TI-89T, TI-92, TI-Nspire, TI-Nspire CX (semi-broken), HP 39gII, HP Prime, Casio fx-7000G, fx-7400G+, fx-7700GE, fx-9750G+, fx-9750GII, fx-9860G, cfx-9850G, FX-1.0+, fx-CG10, fx-CP400
• Consoles, mobile devices and vintage computers owned: Samsung i5510, Nexus 5, Atari 2600, Lynx, SMS, Game Gear, Genesis, Dreamcast, NES, SNES, N64, GCN, Wii, Wii U, GBA, DS, 3DS, PS2, PS3, PS4, PSP, PSVita, XBox 360, XBOne

#### Snektron

• Lvl 69 Russian Snake
• CodeWalrus Staff
• Super User
• Topic Management
• Join Date: Dec 2014
• Location: Netherlands
• Posts: 3155
• Post Rating Ratio: +31/-0
• SSSssssss.....
• Gender:
##### Re: Draw
« Reply #4 on: February 14, 2015, 04:59:13 pm »
It uses a fixed size algoritm i found on omnimaga.org . 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)
« Last Edit: February 14, 2015, 05:10:12 pm by Cumred_Snektron »
• Calculators owned: TI-84+
Legends say if you spam more than DJ Omnimaga, you will become a walrus...

#### DJ Omnimaga

• Omni founder & CW co-founder
• CodeWalrus Staff
• Super User
• Forum Maintenance
• Original 5
• CodeWalrus Supporter
• Topic Management
• Join Date: Nov 2014
• Posts: 18187
• Post Rating Ratio: +91/-4
• Gender:
##### Re: Draw
« Reply #5 on: February 14, 2015, 05:08:13 pm »
Erm, Omnimaga.net doesn't exist. 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
• Calculators owned: TI-73, TI-80 (broken), TI-81, TI-82, TI-83, TI-83+ (broken), TI-83+ (broken), TI-83+SE (broken), TI-84+, TI-84+CSE, TI-84+CE, TI-85, TI-86, TI-89T, TI-92, TI-Nspire, TI-Nspire CX (semi-broken), HP 39gII, HP Prime, Casio fx-7000G, fx-7400G+, fx-7700GE, fx-9750G+, fx-9750GII, fx-9860G, cfx-9850G, FX-1.0+, fx-CG10, fx-CP400
• Consoles, mobile devices and vintage computers owned: Samsung i5510, Nexus 5, Atari 2600, Lynx, SMS, Game Gear, Genesis, Dreamcast, NES, SNES, N64, GCN, Wii, Wii U, GBA, DS, 3DS, PS2, PS3, PS4, PSP, PSVita, XBox 360, XBOne

#### Snektron

• Lvl 69 Russian Snake
• CodeWalrus Staff
• Super User
• Topic Management
• Join Date: Dec 2014
• Location: Netherlands
• Posts: 3155
• Post Rating Ratio: +31/-0
• SSSssssss.....
• Gender:
##### Re: Draw
« Reply #6 on: February 14, 2015, 05:11:20 pm »
Thanks
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...

#### DJ Omnimaga

• Omni founder & CW co-founder
• CodeWalrus Staff
• Super User
• Forum Maintenance
• Original 5
• CodeWalrus Supporter
• Topic Management
• Join Date: Nov 2014
• Posts: 18187
• Post Rating Ratio: +91/-4
• Gender:
##### Re: Draw
« Reply #7 on: February 14, 2015, 05:14:44 pm »
That isn't particularly complex. By complex I meant something like this starting from the middle in the white areas

• Calculators owned: TI-73, TI-80 (broken), TI-81, TI-82, TI-83, TI-83+ (broken), TI-83+ (broken), TI-83+SE (broken), TI-84+, TI-84+CSE, TI-84+CE, TI-85, TI-86, TI-89T, TI-92, TI-Nspire, TI-Nspire CX (semi-broken), HP 39gII, HP Prime, Casio fx-7000G, fx-7400G+, fx-7700GE, fx-9750G+, fx-9750GII, fx-9860G, cfx-9850G, FX-1.0+, fx-CG10, fx-CP400
• Consoles, mobile devices and vintage computers owned: Samsung i5510, Nexus 5, Atari 2600, Lynx, SMS, Game Gear, Genesis, Dreamcast, NES, SNES, N64, GCN, Wii, Wii U, GBA, DS, 3DS, PS2, PS3, PS4, PSP, PSVita, XBox 360, XBOne

#### Snektron

• Lvl 69 Russian Snake
• CodeWalrus Staff
• Super User
• Topic Management
• Join Date: Dec 2014
• Location: Netherlands
• Posts: 3155
• Post Rating Ratio: +31/-0
• SSSssssss.....
• Gender:
##### Re: Draw
« Reply #8 on: February 14, 2015, 05:22:59 pm »
i'd fill it up... if i knew how to convert png's to 8xi's
EDIT: Well i can just send them to my calc and get them back, only it doesnt convert properly >.<
EDIT2: A finaly got it
« Last Edit: February 14, 2015, 05:44:23 pm by Cumred_Snektron »
• Calculators owned: TI-84+
Legends say if you spam more than DJ Omnimaga, you will become a walrus...

#### DJ Omnimaga

• Omni founder & CW co-founder
• CodeWalrus Staff
• Super User
• Forum Maintenance
• Original 5
• CodeWalrus Supporter
• Topic Management
• Join Date: Nov 2014
• Posts: 18187
• Post Rating Ratio: +91/-4
• Gender:
##### Re: Draw
« Reply #9 on: February 15, 2015, 04:47:27 am »
Wow that seems pretty fast actually!

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-73, TI-80 (broken), TI-81, TI-82, TI-83, TI-83+ (broken), TI-83+ (broken), TI-83+SE (broken), TI-84+, TI-84+CSE, TI-84+CE, TI-85, TI-86, TI-89T, TI-92, TI-Nspire, TI-Nspire CX (semi-broken), HP 39gII, HP Prime, Casio fx-7000G, fx-7400G+, fx-7700GE, fx-9750G+, fx-9750GII, fx-9860G, cfx-9850G, FX-1.0+, fx-CG10, fx-CP400
• Consoles, mobile devices and vintage computers owned: Samsung i5510, Nexus 5, Atari 2600, Lynx, SMS, Game Gear, Genesis, Dreamcast, NES, SNES, N64, GCN, Wii, Wii U, GBA, DS, 3DS, PS2, PS3, PS4, PSP, PSVita, XBox 360, XBOne

#### Keoni29

• Full User
• Join Date: Nov 2014
• Location:
• Posts: 284
• Post Rating Ratio: +8/-0
• Gender:
##### Re: Draw
« Reply #10 on: February 15, 2015, 06:14:32 pm »
Wow this is a really nice paint program. I like the animation of the tool menu
If you like my work, why not give me an internet?

#### matrefeytontias

• Full User
• Join Date: Nov 2014
• Location: France
• Posts: 198
• Post Rating Ratio: +5/-1
• Gender:
##### Re: Draw
« Reply #11 on: February 15, 2015, 06:31:12 pm »
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

• Lvl 69 Russian Snake
• CodeWalrus Staff
• Super User
• Topic Management
• Join Date: Dec 2014
• Location: Netherlands
• Posts: 3155
• Post Rating Ratio: +31/-0
• SSSssssss.....
• Gender:
##### Re: Draw
« Reply #12 on: February 15, 2015, 08:16:16 pm »
As i said earlier, i didn't make the algorithm myself
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

• Full User
• Join Date: Nov 2014
• Location: France
• Posts: 198
• Post Rating Ratio: +5/-1
• Gender:
##### Re: Draw
« Reply #13 on: February 15, 2015, 08:37:53 pm »
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

#### DJ Omnimaga

• Omni founder & CW co-founder
• CodeWalrus Staff
• Super User
• Forum Maintenance
• Original 5
• CodeWalrus Supporter
• Topic Management
• Join Date: Nov 2014
• Posts: 18187
• Post Rating Ratio: +91/-4
• Gender:
##### Re: Draw
« Reply #14 on: March 05, 2015, 07:19:33 pm »
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?
« Last Edit: March 05, 2015, 07:22:40 pm by DJ Omnimaga »
• Calculators owned: TI-73, TI-80 (broken), TI-81, TI-82, TI-83, TI-83+ (broken), TI-83+ (broken), TI-83+SE (broken), TI-84+, TI-84+CSE, TI-84+CE, TI-85, TI-86, TI-89T, TI-92, TI-Nspire, TI-Nspire CX (semi-broken), HP 39gII, HP Prime, Casio fx-7000G, fx-7400G+, fx-7700GE, fx-9750G+, fx-9750GII, fx-9860G, cfx-9850G, FX-1.0+, fx-CG10, fx-CP400
• Consoles, mobile devices and vintage computers owned: Samsung i5510, Nexus 5, Atari 2600, Lynx, SMS, Game Gear, Genesis, Dreamcast, NES, SNES, N64, GCN, Wii, Wii U, GBA, DS, 3DS, PS2, PS3, PS4, PSP, PSVita, XBox 360, XBOne