Should I implement an Undo feature, requiring use of Pic 0, or leave it out? [see the red text for more info]
Include Undo, rendering Pic0 unuseable by the User in this program.
 100%  [ 4 ]
Leave out Undo, keeping Pic0 a viable option for storing a PicVar.
 0%  [ 0 ]
Total Votes : 4

Summary: this program is a BASIC program for Color calculators where you can import, export, edit, save, and create Pic Vars, using a wide array of tools that are provided in the menus of this program. There are many features (see below) that make creating images and art on these color calculators very easy, and make your work look very professional.

Intro:It all started one day when I discovered the "Input" command.
Now, of course, we all now the Basic use of
Code:
Input "Name",Str1
but I saw somewhere that if you just put
Code:
Input
Then it opens up a graphscreen where the user can select a point on the graph screen, and after hitting enter, would set the X and Y values of the point to X and Y. Suddenly, inspiration struck. I decided to make a whole program where the user chooses where to insert elements of a drawing program, instead of inserting x and y values.
and so I started building this hodgepodge of a program, just adding features left and right off of a basic structure, until I realized that I could make this an actual program that I could upload.

But it needs work.
First of all, the code is almost 4000 bytes, and it needs some major optimizations. The code is very jumbly, so I am going to work on putting it in the most efficient order possible, on SC3.

List of current features:
  • Adding lines (from point a to point b)
  • Adding vertical lines
  • Adding Horizontal lines
  • Adding Circles
  • Adding text (in both Graph and Home font)
  • Adding functions (in ZStandard)
  • Pen (one pixel)
  • Square Brush (custom width)
  • Round brush (custom width)
  • Eraser (one pixel currently, want to make custom width)
  • Shade (with a simple process, and an advanced process)
  • Importing Pics
  • Saving as Pics
  • Changing the color
  • Clear All
  • a quick help menu
  • a simple and quick interface

Features I am working on:
  • A Stamp tool, with selection of some preset shapes (Heart, Circle)


Questions:
I need a creative title for this program. prgmDRAW works for now, but it isn’t unique. If anyone could share a creative name, I would be very appreciative.

I would love to implement more features, so I am taking suggestions for features to add to this program (that are pheasable in BASIC)

For poll info, read here: Finally, (See the poll), I think that I could implement an undo feature, but it would require the continual use of Pic0. I have a few features in here (Graph and Stamp) that use Pic 9 and 0,but they warn the user and those features are optional. If I were to implement this feature, I would have to use Pic0 all of the time, which would limit the user on amount of save slots, and possibly delete something important stored in Pic0.
the question here is would you rather have the Undo feature, and not use Pic0, or not use it, and leave Pic0 untouched for the user? I am leaning towards implementing Undo, but I would like feedback.

Here are some basic screenshots of parts of the program, Ill work on getting an animated screenshot later when I have time.

Here is the code rght now:

Code:
12->C
DelVar thetaDelVar P
Lbl A
ClrHome
Menu("Draw","New",DD,"Open",1,"Instructions",2,"Info",3,"Exit",X
Lbl 3
Disp "Program by Caleb Hill","Contact me with","Calebahill7@gmail.com","Instagram: @Calebahill7","Text: 2085012520","More @ Cemetech.net,","Ticalc.org, & My Website @","is.gd/Chillcakecalcs","(C) 2015
Pause
ClrHome
Goto A
Lbl 2
ClrHome
Disp "Use F1-F5 For Menus","F1- Add Item","F2- Tools","F3- Edit","F4- Info","F5- File","You Can only use funcs","When not adding features","[Enter]
If theta=5:Goto DA
Pause
ClrHome
Goto A
Lbl IP
ClrHome
3->theta
Disp "Choose a Pic 1-9
Input "Open Pic:",P
Goto PP
Lbl 1
ClrHome
Disp "Choose a Pic 1-9
Input "Open Pic:",P
2->theta
Goto DD
Lbl 2
Lbl DD
BackgroundOff:AxesOff:ExprOff:GridOff:CoordOn:BorderColor 4:Func:Full:FnOff
ClrDraw
264->Xmax
0->Xmin
164->Ymax
0->Ymin
If theta=2
Then
   Lbl PP
   If P=1:RecallPic 1
   If P=2:RecallPic 2
   If P=3:RecallPic 3
   If P=4:RecallPic 4
   If P=5:RecallPic 5
   If P=6:RecallPic 6
   If P=7:RecallPic 7
   If P=8:RecallPic 8
   If P=9:RecallPic 9
   If theta=3:Goto DA
End
Lbl DA
Horizontal ~5
getKey->K
Repeat K=11 or K=13 or K=14 or K=15 or K=12
   getKey->K
End
If K=11:Goto AF
If K=12:Goto TL
If K=13:Goto ED
If K=14:Goto I
If K=15:Goto FF
Lbl TL
getKey->K
Menu("Tools","Pen",PN,"Brush",TB,"Square",TS,"Eraser",ER,"Back",DA
Lbl TB
Input
Disp X
Input "Brush Size:",W
Input
While K!=105
   getKey->K
   If K=24:X-1->X
   If K=25:Y+1->Y
   If K=26:X+1->X
   If K=34:Y-1->Y
   
   
   Lbl TS
   Input "Square Size:",W
   Input
   While K!=105
      getKey->K
      If K=24:X-1->X
      If K=25:Y-1->Y
      If K=26:X+1->X
      If K=34:Y+1->Y
      For(A,0,W
         For(B,0,W
            Pxl-On(A+Y,B+X,C
         End
      End
   End
   Goto DA
   Lbl AF
   Menu("Add Feature","Line",AL,"Horizontal Line",HL,"Vertical Line",VL,"Circle",AC,"Text",AT,"Graph",AG,"Stamp",HR,"Back",DA
   Lbl HR
   ClrHome
   Disp "Warning! Use of this","Feature requires","Pic ars 9 and 0","Y1 and Y2","and GDB 0","If these are important","Select [No] in next menu","[Enter]
   Pause
   Menu("Stamp","Heart",SH,"Circle",SC,"
   StoreGDB 0
   StorePic 0
   For(A,1,2
      GraphColor(A,C
   End
   Input
   X->A:Y->B
   Input
   X->D:Y->E
   sqrt((D-A)^^2+(E-B)^^2)->F
   A/264->G
   B/164->H
   
   
   ~3->Xmin
   3->Xmax
   ~3->Ymin
   3->Ymax
   "X^(2/3)-sqrt(1-X^^2)->{Y1}
   "X^(2/3)+sqrt(1-X^^2)->{Y2}
   ClrDraw
   Shade({Y1},{Y2},~5,5,1,1,C
   StorePic 9
   RecallGDB 0
   RecallPic 0
   RecallPic 9
   Goto DA
   Lbl AG
   ClrHome
   Disp "Warning! Use of this","Feature requires:","Pic vars 9 and 0,","and GDB 0","If those are important","select [No] in next menu","[Enter]
   Pause
   Menu("Continue?","Yes",GY,"No",DA
   Lbl GY
   ClrHome
   Input "Expression:",Str1
   StoreGDB 0
   StorePic 0
   ZStandard
   DrawF expr(Str1),C
   StorePic 9
   RecallGDB 0
   RecallPic 0
   RecallPic 9
   Goto DA
   Lbl HL
   Input
   Horizontal Y,C
   Goto DA
   Lbl VL
   Input
   Vertical X,C
   Goto DA
   Lbl AT
   ClrHome
   Input "Text:",Str1
   Input
   TextColor(C
   Menu("Text Size","Large",T2,"Small",T3,"Back",AF
   Lbl T2
   Text(~1,164-Y,X,Str1
   Goto DA
   Lbl T3
   Text(164-Y,X,Str1
   Goto DA
   Lbl AC
   Input
   X->A
   Y->B
   Input
   X->D
   Y->E
   sqrt((D-A)^^2+(E-B)^^2)->F
   Circle(A,B,F,C
   Goto DA
   Lbl AL
   Input
   X->A
   Y->B
   Input
   X->D
   Y->E
   Line(A,B,D,E,1,C
   Goto DA
   Lbl ED
   Menu("Edit","Clear All",EC,"Change Color",C1,"Shade",ES,"Import Pic",IP,"Back",DA
   Lbl ER
   Input
   X->A
   Y->B
   164-B->X
   A->Y
   Lbl R2
   getKey->K
   Repeat K=105 or K=24 or K=25 or K=26 or K=34
      getKey->K
   End
   If K=105:Goto DA
   If K=24 and Y=0:Goto R2
   If K=25 and X=0:Goto R2
   If K=26 and Y=264:Goto R2
   If K=34 and X=164:Goto R2
   If K=24:Y-1->Y
   If K=25:X-1->X
   If K=26:Y+1->Y
   If K=34:X+1->X
   Pxl-Off(X,Y
   Goto R2
   Lbl PN
   Input
   X->A
   Y->B
   164-B->X
   A->Y
   Lbl R1
   getKey->K
   Repeat K=105 or K=24 or K=25 or K=26 or K=34
      getKey->K
   End
   If K=105:Goto DA
   If K=24 and Y=0:Goto R1
   If K=25 and X=0:Goto R1
   If K=26 and Y=264:Goto R1
   If K=34 and X=164:Goto R1
   If K=25:X-1->X
   If K=24:Y-1->Y
   If K=26:Y+1->Y
   If K=34:X+1->X
   Pxl-On(X,Y,C
   Goto R1
   Lbl ES
   Menu("Shade","Simple",SS,"Advanced",SA
   Lbl SS
   Input
   Y->A
   Input
   Y->B
   Shade(A,B,Xmin,Xmax,1,1,C
   Goto DA
   Lbl SA
   Input
   X->D
   Y->A
   Input
   X->E
   Y->B
   Menu("Pattern","Vertical",PV,"Horizontal",PH,"X Slope",PX,"~X Slope",PW
   Lbl PV
   1->P
   Goto PZ
   Lbl PH
   2->P
   Goto PZ
   Lbl PX
   4->P
   Goto PZ
   Lbl PW
   3->P
   Lbl PZ
   Disp "Amount of Pixels to Skip"
   Disp "(1-8)
   Input ":",X
   Shade(A,B,D,E,P,X,C
   Goto DA
   Lbl EC
   Menu("Are you sure?","Yes",YY,"No",DA
   Lbl YY
   ClrDraw
   Goto DA
   Lbl C1
   0->A
   "RED    BLUE   BLACK  MAGENTAGREEN  ORANGE BROWN  NAVY   LTBLUE YELLOW WHITE  LTGRAY MEDGRAYGRAY   DRKGRAY"->Str1
   ClrHome
   Output(1,1,"     Color Selection
   Output(5,8,"[<|]         [|>]
   Output(9,1,"[Enter] to select
   Output(10,1,"[Clear] to go back
   getKey->K
   While K!=105 and K!=45
      getKey->K
      Lbl 1
      Output(5,10,sub(Str1,7A+1,7)
      If K=24 and A>=1:A-1->A
      If K=26 and A<=13:A+1->A
   End
   If K=45:Goto DA
   ClrHome
   10+A->C
   Goto DA
   Lbl I
5->theta
   Goto 2
   Lbl FF
   Menu("File","Save",FS,"Exit (Without Saving)",A,"Back",DA
   Lbl FS
   ClrHome
   Input "Save As:",P
   If P=1:StorePic 1
   If P=2:StorePic 2
   If P=3:StorePic 3
   If P=4:StorePic 4
   If P=5:StorePic 5
   If P=6:StorePic 6
   If P=7:StorePic 7
   If P=8:StorePic 8
   If P=9:StorePic 9
   If P=0:StorePic 0
   Disp "Saved"
   For(A,1,500
   End
   Goto FF
   Lbl X
   Return

Thanks for any support on this project!
You could use Pic8 and check if it is empty (which would probably require around 18024 lines of code Surprised ), or even an option to enable Undo within the program (with the appropriate message about Pic8 being erased.) Great program by the way, would definitely use!
Eightx84 wrote:
You could use Pic8 and check if it is empty (which would probably require around 18024 lines of code Surprised ), or even an option to enable Undo within the program (with the appropriate message about Pic8 being erased.) Great program by the way, would definitely use!

I like the idea about Undo being an option.
What is so special about pic8? and I dont really want to include 18K lines of code, though it would be cool.
Caleb_Hill wrote:
Eightx84 wrote:
You could use Pic8 and check if it is empty (which would probably require around 18024 lines of code Surprised ), or even an option to enable Undo within the program (with the appropriate message about Pic8 being erased.) Great program by the way, would definitely use!

I like the idea about Undo being an option.
What is so special about pic8? and I dont really want to include 18K lines of code, though it would be cool.


I believe that number is a reference to the number of pixels that you have to test. This can easily be done with loops or with a Monte Carlo method.
Pic8 is good because usually I see people use one Pic var at a time (Pic1), and Pic8 seems like the next best variable at the end of the list.
Eightx84 wrote:
Pic8 is good because usually I see people use one Pic var at a time (Pic1), and Pic8 seems like the next best variable at the end of the list.

I guess that kind of makes sense. So I should use Pic8 instead of Pic0 because it is least used.
I guess that is definitely more simple than running code that tests for finding the empty picVar.
On a color calculator you have so many possibilities...
Why not adding color blending? Smooth edges for brushes instead of the hard ones? (I know this will take a long time to process, but you can generate a preview and when the user has finished drawing render the whole thing.)

Also, although you said you didn't want that, you could optionally add some library functions, for example this would allow you to implement an undo and store it in a list as fast as you would store a picture (And many more things which are faster and smaller than in pure basic).
Or using hacked picture variables, which only require you to have an assembly program, the result runs without any libraries and you can use any picture from 0 to 255.

This seems to be a great project, and I would really like to test it, if I only had a color calculator.
  
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
Page 1 of 1
» All times are UTC - 5 Hours
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

 

Advertisement