Omnimaga

Calculator Community => Other Calc-Related Projects and Ideas => TI Z80 => Topic started by: LincolnB on August 20, 2011, 07:04:35 pm

Title: PaintPad - On-Calc Paint and Text Editing
Post by: LincolnB on August 20, 2011, 07:04:35 pm
I'm starting a project, in Axe, for the TI-83/84+SE series of calcs. It's going to be a paint editor similar to/based off of mspaint (the regular paint program that comes with windows), bundled with a text editor.


The Paint program will most likely have the following graphics functions:

     Lines
     Squares/Rectangles
     Custom Polygons
     Different size brushes
     Circles
     Ovals
     Flood Fill
     Up to 4-level grayscale

and also other things, such as rectangular and free-form selection with copy/paste, invert, resize, rotate, etc.; some form an eraser / mass erase function; different levels of zoom; in-program sprite editing and inserting, and other features I can think. It will probably end up as a single-page app, that exports one or two 768 byte appvars that can be used as buffers in programs.


The Text Editor will have copy/paste, custom input as fast as I can make it (within reason), text selection, deletion, and insertion, a find/replace function (maybe) and as many lines as I can fit in the meager memory I have access to :P (compression help appreciated). It will also export to an appvar that will possibly also be computer-readable (help here will also be appreciated - might it work with Croquette?)

What do you think? This project is still only in concept phase, so I'm definitely taking feature requests into consideration.
Title: Re: PaintPad - On-Calc Paint and Text Editing
Post by: Hayleia on August 21, 2011, 04:31:12 am
COLORS
The most important function: UNDO
Anyway, great project :thumbsup:
Title: Re: PaintPad - On-Calc Paint and Text Editing
Post by: LincolnB on August 21, 2011, 12:02:43 pm
The most important function: UNDO

Got it :)
Title: Re: PaintPad - On-Calc Paint and Text Editing
Post by: BlakPilar on August 21, 2011, 01:08:45 pm
Awesome! Yes, undo and redo would be amazing. Also, an easy way of changing the brush size would be nice :)
Title: Re: PaintPad - On-Calc Paint and Text Editing
Post by: LincolnB on August 21, 2011, 01:23:18 pm
I'm thinking of having it so when you press Y=, a menu screen slides in from the left with a list of all the functions and stuff like that.
Title: Re: PaintPad - On-Calc Paint and Text Editing
Post by: BlakPilar on August 21, 2011, 01:27:30 pm
That'd be cool, but if you had to do that to change the brush size, imho it would get kind of annoying/tedious if you needed to change it often :/
Title: Re: PaintPad - On-Calc Paint and Text Editing
Post by: LincolnB on August 21, 2011, 01:39:39 pm
I'm thinking of having it so when you press Y=, a menu screen slides in from the left with a list of all the functions and stuff like that.

With keyboard shortcuts, of course :)
Title: Re: PaintPad - On-Calc Paint and Text Editing
Post by: Spyro543 on August 21, 2011, 02:37:08 pm
If I knew Axe I would try to make this :P
Title: Re: PaintPad - On-Calc Paint and Text Editing
Post by: Yeong on September 24, 2011, 11:34:34 pm
make sure you add sparypaint XD
(Yeong loves spraypaint)
Title: Re: PaintPad - On-Calc Paint and Text Editing
Post by: gcolella on September 24, 2011, 11:38:28 pm
This is a great idea, lemme know if I can help out at all. Do you think it'd be possible to save to a computer image format?
Title: Re: PaintPad - On-Calc Paint and Text Editing
Post by: Happybobjr on September 24, 2011, 11:48:53 pm
have you thought about making it to where you export it to computer and you can just rename the file to txt and actually see what you wrote?
Title: Re: PaintPad - On-Calc Paint and Text Editing
Post by: Binder News on September 25, 2011, 12:10:30 am
Darn. I was going to make this as well, but you beat me to posting about it. If you want any help with stuff, I'm really good at menus (I think I can do a slide-down menu pretty easily), and I can write custom Axioms. Just ask.
Title: Re: PaintPad - On-Calc Paint and Text Editing
Post by: Deep Toaster on September 25, 2011, 01:04:30 am
COLORS
YES MAKE SURE IT HAZ TEH BLUESCALE
The most important function: UNDO
Seconded. Good luck!
Title: Re: PaintPad - On-Calc Paint and Text Editing
Post by: LincolnB on September 25, 2011, 12:45:47 pm
have you thought about making it to where you export it to computer and you can just rename the file to txt and actually see what you wrote?

Yeah, that was actually my original inspiration for the text editor. I'll eventually write a c++ program that converts the appvars into computer readable txt files.

Darn. I was going to make this as well, but you beat me to posting about it. If you want any help with stuff, I'm really good at menus (I think I can do a slide-down menu pretty easily), and I can write custom Axioms. Just ask.

I'll be sure to ask. Thanks!
Title: Re: PaintPad - On-Calc Paint and Text Editing
Post by: Binder News on September 25, 2011, 03:42:02 pm
Darn. I was going to make this as well, but you beat me to posting about it. If you want any help with stuff, I'm really good at menus (I think I can do a slide-down menu pretty easily), and I can write custom Axioms. Just ask.

I'll be sure to ask. Thanks!

You're welcome. About a converter, do you want me to make that? I was thinking about modifying the xml file that Tokens uses, and write the program to reverse the process. (Tokens = methersoft's Tokens IDE).
Title: Re: PaintPad - On-Calc Paint and Text Editing
Post by: LincolnB on September 25, 2011, 06:31:47 pm
I was thinking about just using the fstream C++ library to output to files. The program would load up a .8xv file and output a .txt file.
Title: Re: PaintPad - On-Calc Paint and Text Editing
Post by: Binder News on September 25, 2011, 06:33:57 pm
yeah, bu then you have to rewrite ALL the byte conversions.
Title: Re: PaintPad - On-Calc Paint and Text Editing
Post by: LincolnB on September 25, 2011, 06:48:31 pm
yeah, bu then you have to rewrite ALL the byte conversions.

eh, that's not so many. This way I have more control, plus, I have no idea what you said earlier, so yeah.
Title: Re: PaintPad - On-Calc Paint and Text Editing
Post by: LincolnB on September 27, 2011, 06:37:57 pm
I'm just about finished with the Paint portion of the program (minus the menu, everything right now is based off of keyboard shortcuts), I'll upload screenies later today probably.
Title: Re: PaintPad - On-Calc Paint and Text Editing
Post by: LincolnB on September 28, 2011, 10:30:28 pm
I'm experiencing some unexpected delays. Just know that it's coming along nicely and I'll get screenies/source up as soon as I feel like I'm ready.

Made all the text sprites today! Gosh, monospace fonts, what a pain...it's the best way, tho.
Title: Re: PaintPad - On-Calc Paint and Text Editing
Post by: LincolnB on October 01, 2011, 06:22:54 pm
Okay, I've got text editing working. 80 inputtable characters right now. Saving/Loading was working fine until I started compiling this as an app...hopefully that will be resolved soon. Paint editing is not quite as done as text editing, but the only hard part of paint editing is going to be finding a good flood fill algorithm (or coming up with one). I haven't gone the flood fill algorithm much thought, yet, but if anyone has any ideas about it, that'd be great!
Title: Re: PaintPad - On-Calc Paint and Text Editing
Post by: Binder News on October 01, 2011, 09:06:51 pm
As for problems with Apps, are you using any variables that you made with something like this:
Code: [Select]
[0000]->GDB1Var
...
X->{GDB1Var}^r

Also, http://en.wikipedia.org/wiki/Flood_fill
I think the first one is what you would want. However, the best method I can think of would make heavy use of the stack, so an overflow error would be possible.
Title: Re: PaintPad - On-Calc Paint and Text Editing
Post by: LincolnB on October 02, 2011, 03:15:57 pm
I found out the app issues, it was a dumb mistake I made. Also, thanks, I'll check out the link. Text editing is now complete! Now to work on paint editing, which is about half done.
Title: Re: PaintPad - On-Calc Paint and Text Editing
Post by: alberthrocks on October 02, 2011, 04:43:58 pm
Make sure to keep automatic backups of code! ;)

Speaking of backups, can it be possible to exit any time and still be able to continue working on a drawing without any saving? (This is NOT auto-saving, this is auto backup, like in MS Word where if you crash, all your work is saved.)

Also, will there be an option to export to TI-BASIC and Axe? (In particular, "optimized export" - drawing the image with as few commands as possible.)
Title: Re: PaintPad - On-Calc Paint and Text Editing
Post by: Binder News on October 02, 2011, 04:47:31 pm
Optimized export would be hard, but I think it would be possible. I would take a stab at it, but I'm really busy this year w/ school, so I can't.
Title: Re: PaintPad - On-Calc Paint and Text Editing
Post by: LincolnB on November 08, 2011, 09:59:15 am
UPDATE ish

So, this is basically done...all I need to do is a (pretty massive :P) code reorganization so it's easier for me to add the last coupla features to the Paint portion of the program.

It's a really simple program, and if I get around to making a PaintPad 2, it will have the advanced features that were originally intended, like copy/paste, brush size, undo/redo, stuff like that.

The features in the text editor are:
Inputting text (duh)
99 lines of text
20 characters (I think - it's around there) per line
Saving/Loading
about seventy inputtable characters - A-Z, a-z, 0-9, and a bunch of symbols

The GUI for the text editor is actually pretty good. It looks nice and simple and should be fairly conducive to a productive environment.

The paint program features:
Drawing pixels
Mass Erase (erasing large portions of the screen, but can also erase individual pixels)
Lines
Rectangles
Circles
3-lvl gray
EDIT: Inverting screen colors, on both gray and black

There it is. The text editor is intended for people to be able to read and write on-calc readme files for their programs, and the Paint editor is intended to make it easy to make menus and possibly cutscenes for programs/games.

Oh, and the readme for PaintPad is all On-Calc :D you open up the README text file through PaintPad. (with a screenshot showing how to open files, and probably a really small computer readme file dictating how)
Title: Re: PaintPad - On-Calc Paint and Text Editing
Post by: Yeong on November 08, 2011, 10:03:37 am
is there an option for invert?
Title: Re: PaintPad - On-Calc Paint and Text Editing
Post by: LincolnB on November 08, 2011, 10:06:14 am
Oh yeah, I forgot to include that. Yes, there is.
Title: Re: PaintPad - On-Calc Paint and Text Editing
Post by: Yeong on November 08, 2011, 10:09:37 am
idk if it's too much to ask, but can you add the sprite support; like saving some sprites in paintpad itself you can recall it or something
Title: Re: PaintPad - On-Calc Paint and Text Editing
Post by: LincolnB on November 08, 2011, 10:11:38 am
Hmm...that wouldn't be too hard. Probably only multiples of 8*8 size sprites would be supported though. After the code reorg, I'll see what I can do :)
Title: Re: PaintPad - On-Calc Paint and Text Editing
Post by: Yeong on November 08, 2011, 10:12:33 am
:D
[offtopic] omg buttsfredkin, you're about to have 666 posts with 66 ratings O.o[/offtopic]
Title: Re: PaintPad - On-Calc Paint and Text Editing
Post by: LincolnB on November 08, 2011, 10:13:26 am
oh wow, I didn't notice that...
Title: Re: PaintPad - On-Calc Paint and Text Editing
Post by: parserp on November 08, 2011, 05:00:38 pm
AH BUTTS YOU ARE NOW EVIL!!!!!! >:D
Title: Re: PaintPad - On-Calc Paint and Text Editing
Post by: Yeong on November 09, 2011, 07:41:22 am
not anymore :P
Title: Re: PaintPad - On-Calc Paint and Text Editing
Post by: epic7 on December 17, 2011, 10:55:51 pm
Have you made any recent progress?
Title: Re: PaintPad - On-Calc Paint and Text Editing
Post by: LincolnB on December 18, 2011, 02:31:58 pm
Yeah, I need to do a fairly massive code reorganization before I can use the Save/Load routines I wrote for the text editor portion in the paint editor portion. Should be relatively easy, I'll finish it as soon as I finish Futility, which I need to get out of the way for the contest, and I'm about half way done with the code reorg.
Title: Re: PaintPad - On-Calc Paint and Text Editing
Post by: GB on December 18, 2011, 03:53:00 pm
Does this program save as regular pictures (.8xi) that can be used in programs, or does it use its own format?
Title: Re: PaintPad - On-Calc Paint and Text Editing
Post by: LincolnB on December 19, 2011, 01:15:10 pm
It exports a 768 byte appvar that can be copied to the screen with the simple axe command Copy:

Copy(POINTER_TO_APPV,L6,768)
Dispgraph

something like that^^ I don't know if this will be usable for BASIC programs.