QB64.org Forum

Active Forums => Programs => Topic started by: SierraKen on June 25, 2020, 11:08:57 pm

Title: Paint Pixels 7 With JPG Saves And No Gaps In Drawing And Thicker Drawing!
Post by: SierraKen on June 25, 2020, 11:08:57 pm
I had a blast updated this one year old project tonight! I finally have JPG saves and no gaps when drawing! I also made thicker drawing using my old .25 sz loops. :) The way I made no gaps was to use oldx and oldy that it draws the mouse coordinates to with a LINE command. And when the mouse isn't clicked, oldx and oldy becomes the mouse coordinates again so it won't draw a line from where you clicked before. I can't believe I figured this out finally. :)))
Last year B+ added the color picker screen which I kept. And pretty much everything else I kept. Here is the tech notes. Please tell me what you all think of this. It would be nice to figure out how to use the PAINT option to fill in places but I don't know how to do that using different colors as its borders. Does anyone know how?
The 3 needed files are in a zip file attached.
Thanks and Enjoy! 

Paint Pixels 7
by Sierraken and B+
Made on June 25, 2020
Technical Notes:
Changed from .bmp pictures to .jpg pictures.
Fixed the Drawing so that there's no gaps.
Fixed the Erasing so that there's no gaps.
Deleted tiny dot in center of orbits when turning them off.


EDIT NOTE: I just put a newer attachment zip file in because I forgot to change some simple text on the loading of the picture section. If yours says you cannot edit a picture, you actually can load and edit and save it.


Update: Huge memory issue found, please delete this version if you have it. Zip file has been removed.
Title: Re: Paint Pixels 7 With JPG Saves And No Gaps In Drawing And Thicker Drawing!
Post by: bplus on June 26, 2020, 02:47:40 am
Quote
It would be nice to figure out how to use the PAINT option to fill in places but I don't know how to do that using different colors as its borders. Does anyone know how?

Dang! I always thought PAINT without border option filled out from whatever color it started out on that color only until it was stopped by any other color, but just tested and it does't. PAINT without border color option fills out to itself's color ie the PAINT's fill color is the border color. That's the usual way to make filled circles.

Can make a PAINT that fills out on the color it starts on until it hit's some other color, piece of cake, but would likely fill slower ie it checks the start color with POINT and PAINTs out only on that color. It's too late to dig around tonight I will find or make tomorrow, if Steve or someone else doesn't already have it by then.
Title: Re: Paint Pixels 7 With JPG Saves And No Gaps In Drawing And Thicker Drawing!
Post by: bplus on June 26, 2020, 03:44:40 am
Yeah I found something already mostly there:
Code: QB64: [Select]
  1. _TITLE "PAINT3 test" 'b+ 2020-06-26
  2. SCREEN _NEWIMAGE(800, 600, 32)
  3. _DELAY .25
  4. DIM i, mb, mx, my
  5. FOR i = 1 TO 50
  6.     LINE (RND * 800, RND * 600)-(RND * 800, RND * 600), _RGB32(RND * 255, RND * 255, RND * 255, 128 + RND * 128)
  7.     CIRCLE (RND * 800, RND * 600), RND * 50 + 10, _RGB32(RND * 255, RND * 255, RND * 255, 128 + RND * 128)
  8.     mx = _MOUSEX: my = _MOUSEY: mb = _MOUSEBUTTON(1)
  9.     IF mb THEN paint3 mx, my, &HFFFFFFFF
  10.      _LIMIT 200
  11.  
  12. SUB paint3 (x0, y0, fill AS _UNSIGNED LONG) ' needs max, min functions
  13.     DIM fillColor AS _UNSIGNED LONG, W, H, parentF, tick, ystart, ystop, xstart, xstop, x, y
  14.     fillColor = POINT(x0, y0)
  15.     'PRINT fillColor
  16.     W = _WIDTH - 1: H = _HEIGHT - 1
  17.     DIM temp(W, H)
  18.     temp(x0, y0) = 1: parentF = 1
  19.     PSET (x0, y0), fill
  20.     WHILE parentF = 1
  21.         parentF = 0: tick = tick + 1
  22.         ystart = max(y0 - tick, 0): ystop = min(y0 + tick, H)
  23.         y = ystart
  24.         WHILE y <= ystop
  25.             xstart = max(x0 - tick, 0): xstop = min(x0 + tick, W)
  26.             x = xstart
  27.             WHILE x <= xstop
  28.                 IF POINT(x, y) = fillColor AND temp(x, y) = 0 THEN
  29.                     IF temp(max(0, x - 1), y) THEN
  30.                         temp(x, y) = 1: parentF = 1: PSET (x, y), fill
  31.                     ELSEIF temp(min(x + 1, W), y) THEN
  32.                         temp(x, y) = 1: parentF = 1: PSET (x, y), fill
  33.                     ELSEIF temp(x, max(y - 1, 0)) THEN
  34.                         temp(x, y) = 1: parentF = 1: PSET (x, y), fill
  35.                     ELSEIF temp(x, min(y + 1, H)) THEN
  36.                         temp(x, y) = 1: parentF = 1: PSET (x, y), fill
  37.                     END IF
  38.                 END IF
  39.                 x = x + 1
  40.             WEND
  41.             y = y + 1
  42.         WEND
  43.     WEND
  44.  
  45. FUNCTION min (n1, n2)
  46.     IF n1 > n2 THEN min = n2 ELSE min = n1
  47.  
  48. FUNCTION max (n1, n2)
  49.     IF n1 < n2 THEN max = n2 ELSE max = n1
  50.  
  51.  
Title: Re: Paint Pixels 7 With JPG Saves And No Gaps In Drawing And Thicker Drawing!
Post by: SierraKen on June 26, 2020, 02:41:43 pm
Thank you B+! I added that to Paint Pixels 7 and also let the user pick from 5 different screen sizes to draw on: 320 x 240, 640 x 480, 800 x 600, 1024 x 768, and 1536 x 1024.
Here is the updated zip file. Check it out! I also added a picture below of a fill-in example.



Title: Re: Paint Pixels 7 With JPG Saves And No Gaps In Drawing And Thicker Drawing!
Post by: bplus on June 26, 2020, 02:46:26 pm
Good it's working for you!

That is an obvious 3rd way to do PAINT! :)
Title: Re: Paint Pixels 7 With JPG Saves And No Gaps In Drawing And Thicker Drawing!
Post by: SierraKen on June 26, 2020, 06:39:53 pm
I've been working all day on this and have added a JPG file list on your Notepad when you just press Enter and nothing else in the Load section. At first I tried the Wiki open and save files window example but it froze the program for some reason, like Scotty on Star Trek says, "She just can't take it anymore Captain!" So I removed that and went with the Notepad temp .txt file example using the SHELL commands. I also decided to remove the sounds and fixed one or two minor things. Here is the latest update for Paint Pixels 7 again. I might not add anything else for awhile. The updated zip file is in the attachment. I also decided to show off what this little program can do. I found a real nice lake picture online and added a boat with this. lol I added it below too. The program calculates the size of the picture and resizes the screen to show and edit it. 
Title: Re: Paint Pixels 7 With JPG Saves And No Gaps In Drawing And Thicker Drawing!
Post by: johnno56 on June 26, 2020, 08:11:30 pm
Wow! From "Scene1" to a Mountain vista in one day!... Then I opened the thumbnail... "boatinlake"... *sigh*

She looks like a sturdy craft, Captain! A fine vessel. A credit to the designing shipyard. Oh... and the scenery is ok as well...
Title: Re: Paint Pixels 7 With JPG Saves And No Gaps In Drawing And Thicker Drawing!
Post by: SierraKen on June 26, 2020, 08:16:31 pm
Johnno, logic would assume I was no artist to begin with. :D
But thanks, was a good project today. :)
Title: Re: Paint Pixels 7 With JPG Saves And No Gaps In Drawing And Thicker Drawing!
Post by: johnno56 on June 26, 2020, 10:26:52 pm
"no artist to begin with"? I disagree... I can create planets, star fields, nebulae, restore old photos etc using Gimp... But, I can assure you that, your free hand drawing is a 'Michelangelo' compared to my 'crayon' skills... You are too modest....

Just realized.... It's lunchtime and I have had only one coffee... Best correct that before my circulatory system thinks it is being 'weaned'...
Title: Re: Paint Pixels 7 With JPG Saves And No Gaps In Drawing And Thicker Drawing!
Post by: SierraKen on June 27, 2020, 12:24:55 am
LOL Thanks.
Title: Re: Paint Pixels 7 With JPG Saves And No Gaps In Drawing And Thicker Drawing!
Post by: bplus on June 27, 2020, 12:32:06 am
@SierraKen

If you'd like to try a really nice Filename Dialog for Windows I set up a little demo for what Petr and Spriggsy had worked out, looks quite professional. Then Spriggsy helped with syntax of files masks.

File Dialog demo
https://www.qb64.org/forum/index.php?topic=2702.msg119702#msg119702

a couple of replies up are the .BI (include at start) and .BM files (include at the end of your code after subs).
Title: Re: Paint Pixels 7 With JPG Saves And No Gaps In Drawing And Thicker Drawing!
Post by: SierraKen on June 27, 2020, 03:02:22 am
Awesome B+! I got it to Open new pictures perfectly, but I can't find the right dialog for some reason to Save them. I replied to that other thread you mentioned here:

https://www.qb64.org/forum/index.php?topic=2702.15

Title: Re: Paint Pixels 7 With JPG Saves And No Gaps In Drawing And Thicker Drawing!
Post by: TempodiBasic on June 27, 2020, 03:21:11 am
Hi Ken
this your program have made steps towards on!

I hope that my feedbacks are useful:

1.Splashscreen in opening:
can I suggest to use different frames or colors to separate the logical sections of Opening Splashscreen?
  [ This attachment cannot be displayed inline in 'Print Page' view ]  

2. Color setting:
can the user get more informations about how to use the Color Setting window?
What is the box with gradients at bottom?
How can I use them?
  [ This attachment cannot be displayed inline in 'Print Page' view ]  

3.
It is not clear for me new beginner user that with the keyboard I can select the action to do and with mouse I can only draw.  Moreover I have learned after attempts that I must press  keyboard to select and then again to UNselect the same tool/action

4.
It is not clear for me new beginner user that to draw an Orbit first I must put the pointer of mouse in the place where is the center of the Orbit that I want draw, and I must press key "O"
In other program you select the tool and then you click to start drawing it and then drag until releasing the button of mouse to stop drawing.

5.
I start to Draw a line with free hand, then I try to draw a Rays and magically the thickness of the line is very different! 
 5.1 Why not the same thickness of line?
 5.2 How to increase /decreadse the thickness of the line drawn?
  [ This attachment cannot be displayed inline in 'Print Page' view ]  
Title: Re: Paint Pixels 7 With JPG Saves And No Gaps In Drawing And Thicker Drawing!
Post by: SierraKen on June 27, 2020, 11:39:26 am
Thanks TempodiBasic, but I am sticking with what I have now and getting the "meat" of it finished before I round off the details. I did think of the rays already though, I don't know if I can make them thicker or not. But I'll think of all what you said on your post.
Oh, and the bottom part of the color picker screen you can't use, it's just examples in colors that are close to what you draw with. B+ would know more about it since he made it.
Title: Re: Paint Pixels 7 With JPG Saves And No Gaps In Drawing And Thicker Drawing!
Post by: SierraKen on June 27, 2020, 02:13:37 pm
I fixed the Windows Open and Save File Dialogue! Now you can open a picture and save a picture using the regular Windows way. It just needed to add an extension to the name it chooses for it to Save, and also even for it to be Saved in the right directory. Without adding the extension, it would putting the files in the Windows User directory in the Recent folder, without the .jpg extension. lol
I also just now added an IF/THEN to it to make sure the user didn't already add the extension to the name when it saves, before it adds the extension automatically.
Below is the updated attachment zip with 4 library files and 1 .bas file.



Update: Huge memory issue found, please delete this version if you have it. Zip file has been removed.
Title: Re: Paint Pixels 7 With JPG Saves And No Gaps In Drawing And Thicker Drawing!
Post by: bplus on June 27, 2020, 02:19:40 pm
I admit that color picker is confusing, the box at the bottom should Simply and Only show the current color selected.

I will fix up after getting this Tree Maker settled and the dog walked.

@SierraKen

I haven't checked yet but sounds like you have File Dialog working, I will assume you like very much ;-))
The BM file had a 2nd routine for file save AS, I hope that is what you found and didn't have to go through a bunch of extra work.
Title: Re: Paint Pixels 7 With JPG Saves And No Gaps In Drawing And Thicker Drawing!
Post by: SierraKen on June 27, 2020, 03:45:44 pm
Thanks B+. Nah I didn't change the BM file. I just added one line of code to automatically rename it to a jpg file if it wasn't already one.
I made many more small fixes since my last post, including thicker Ray lines. I'll wait until you are done with your color picker before I make a new zip file, but here's the code you can use. I'll add a picture of the thicker ray lines used with your fill-in code example in the attachments.


Update: Huge memory issue found, please delete this version if you have it. Code has been removed.
Title: Re: Paint Pixels 7 With JPG Saves And No Gaps In Drawing And Thicker Drawing!
Post by: bplus on June 27, 2020, 04:23:38 pm
@SierraKen

OK I left the colorDialog$ Function in the tester sub in case you want to play with settings yourself, otherwise just replace the function with this one. I don't think I messed with slider code.

I have made changes besides the giant color sample color box (not so pretty but not so confusing either):
1. Moved Color Dialogue to screen _middle
2. gave the test sample box a black background color, so the sample color is over black, keep that in mind when changing alpha = transparency
3. I defaulted alpha to full opaque 255, maybe some or mostly want solid color.

Color Dialog in tester:
Code: QB64: [Select]
  1. _TITLE "Color Dialog rev 2020-06-27" 'b+ 2020-06-27
  2. SCREEN _NEWIMAGE(400, 300, 32)
  3. _DELAY .25
  4.  
  5. WHILE _KEYDOWN(27) = 0
  6.     CLS
  7.     k~& = VAL(colorDialog$)
  8.     PRINT "Color is: "; k~&
  9.     LINE (20, 40)-(_WIDTH - 20, _HEIGHT - 20), k~&, BF
  10.     _DELAY 2
  11.  
  12. FUNCTION colorDialog$
  13.  
  14.     'first screen dimensions items to restore at exit
  15.     DIM curRow AS INTEGER, curCol AS INTEGER, autoDisplay AS INTEGER
  16.     DIM curScrn AS LONG, backScrn AS LONG 'some handles
  17.  
  18.     DIM cd AS LONG
  19.     DIM makeConst$, k$
  20.     DIM f AS SINGLE
  21.  
  22.     'save old settings to restore at end ofsub
  23.     curRow = CSRLIN
  24.     curCol = POS(0)
  25.     autoDisplay = _AUTODISPLAY
  26.     sw = _WIDTH
  27.     sh = _HEIGHT
  28.     fg = _DEFAULTCOLOR
  29.     bg = _BACKGROUNDCOLOR
  30.     _KEYCLEAR
  31.     'screen snapshot
  32.     curScrn = _DEST
  33.     backScrn = _NEWIMAGE(sw, sh, 32)
  34.     _PUTIMAGE , curScrn, backScrn
  35.  
  36.     cd = _NEWIMAGE(800, 600, 32)
  37.     SCREEN cd
  38.     _DELAY .25
  39.     r = 128: g = 128: b = 128: a = 255
  40.     COLOR &HFFDDDDDD, &HFF000000
  41.     DO
  42.         CLS
  43.         makeConst$ = "&H" + RIGHT$(STRING$(8, "0") + HEX$(_RGBA32(r, g, b, a)), 8)
  44.         COLOR &HFFDDDDDD, 0
  45.         slider 16, 10, r, "Red"
  46.         slider 16, 60, g, "Green"
  47.         slider 16, 110, b, "Blue"
  48.         slider 16, 160, a, "Alpha"
  49.         COLOR &HFFDDDDDD, &HFF000000
  50.         _PRINTSTRING (150, 230), "Current Color Setting is shown below (Alphas on Black Background)"
  51.         _PRINTSTRING (150, 260), "Press Enter or Spacebar, if you want to use the color: " + makeConst$
  52.         _PRINTSTRING (210, 280), "Press Escape or Q to not use any color, returns 0."
  53.         LINE (90, 300)-(710, 590), &HFF000000, BF
  54.         LINE (90, 300)-(710, 590), VAL(makeConst$), BF
  55.         WHILE _MOUSEINPUT: WEND
  56.         mb = _MOUSEBUTTON(1)
  57.         IF mb THEN 'clear it
  58.             mx = _MOUSEX: my = _MOUSEY
  59.             IF mx >= 16 AND mx <= 781 THEN
  60.                 IF my >= 10 AND my <= 50 THEN
  61.                     r = INT((mx - 16) / 3)
  62.                 ELSEIF my >= 60 AND my <= 100 THEN
  63.                     g = INT((mx - 16) / 3)
  64.                 ELSEIF my >= 110 AND my <= 150 THEN
  65.                     b = INT((mx - 16) / 3)
  66.                 ELSEIF my >= 160 AND my <= 200 THEN
  67.                     a = INT((mx - 16) / 3)
  68.                 END IF
  69.             END IF
  70.         END IF
  71.         k$ = INKEY$
  72.         IF LEN(k$) THEN
  73.             IF ASC(k$) = 27 OR k$ = "q" THEN EXIT DO
  74.             IF ASC(k$) = 13 OR k$ = " " THEN colorDialog$ = makeConst$: EXIT DO
  75.         END IF
  76.         _DISPLAY
  77.         _LIMIT 60
  78.     LOOP
  79.  
  80.     'put things back
  81.     SCREEN curScrn
  82.     COLOR _RGB32(255, 255, 255), _RGB32(0, 0, 0): CLS
  83.     _PUTIMAGE , backScrn
  84.     _DISPLAY
  85.     COLOR fg, bg
  86.     _FREEIMAGE backScrn
  87.     _FREEIMAGE cd
  88.     IF autoDisplay THEN _AUTODISPLAY
  89.     'clear key presses
  90.     _KEYCLEAR
  91.     'clear mouse clicks
  92.     mb = _MOUSEBUTTON(1)
  93.     IF mb THEN 'clear it
  94.         WHILE mb 'OK!
  95.             IF _MOUSEINPUT THEN mb = _MOUSEBUTTON(1)
  96.             _LIMIT 10
  97.         WEND
  98.     END IF
  99.     LOCATE curRow, curCol
  100.  
  101.  
  102. SUB slider (x, y, value, label$)
  103.     DIM c~&, s$
  104.     SELECT CASE label$
  105.         CASE "Red": c~& = &HFFFF0000
  106.         CASE "Green": c~& = &HFF008800
  107.         CASE "Blue": c~& = &HFF0000FF
  108.         CASE "Alpha": c~& = &H88FFFFFF
  109.     END SELECT
  110.     LINE (x, y)-STEP(765, 40), c~&, B
  111.     LINE (x, y)-STEP(3 * value, 40), c~&, BF
  112.     s2$ = STR$(value)
  113.     s3$ = LTRIM$(RTRIM$(s2$))
  114.     s$ = label$ + " = " + s3$
  115.     _PRINTSTRING (x + 384 - 4 * LEN(s$), y + 12), s$
  116.  
  117.  

We could go back to that pretty color box, the user clicks a point and that becomes the color picked.

That is like killing 3 sliders with one click! ;-))

(That is maybe what TempodiBasic thought was supposed to happen.)
Title: Re: Paint Pixels 7 With JPG Saves And No Gaps In Drawing And Thicker Drawing!
Post by: SierraKen on June 27, 2020, 06:00:37 pm
The new color picker works GREAT! Thanks! One thing though I should mention is that for some reason the Fill-in Sub sometimes doesn't gets used when it needs it. I tested that by putting a PRINT "test" in the Sub and sometimes it just won't do anything. I thought maybe it has to wait until the other one is finished but I don't think that's the case because I wait a bit longer and sometimes it still doesn't work. When I added the different colors to the Sub I might have messed it up, I don't know. Can you check it for me? Here is the code. Oh by the way, I think the 3 Sliders is an awesome thing because it helps the user get in control of exactly what color they want, instead of just guessing on a click.

The first section:
Code: QB64: [Select]
  1.     'Here is Fill-In
  2.     IF a$ = "f" OR a$ = "F" THEN
  3.         fMode = 1 - fMode
  4.         m = 6
  5.         IF fMode THEN lastx = mousex: lastY = mousey
  6.     END IF
  7.     IF fMode AND m = 6 THEN
  8.         _TITLE "Mode: (F)ill | (D)raw, (E)rase, 1 = New, (C)olors, (R)ays, (O)rbits, (B)oxes, (S)ave, (L)oad, (P)rint"
  9.         IF mouseLeftButton THEN paint3 lastx, lastY, clr~&, &HFFFFFFFF
  10.         lastx = mousex
  11.         lastY = mousey
  12.         _PUTIMAGE , s&, picture&
  13.     END IF
  14.  

Here is the Sub itself:
Code: QB64: [Select]
  1. SUB paint3 (x0, y0, clr~&, fill AS _UNSIGNED LONG) ' needs max, min functions
  2.     DIM fillColor AS _UNSIGNED LONG, W, H, parentF, tick, ystart, ystop, xstart, xstop, x, y
  3.     fillColor = POINT(x0, y0)
  4.     W = _WIDTH - 1: H = _HEIGHT - 1
  5.     DIM temp(W, H)
  6.     temp(x0, y0) = 1: parentF = 1
  7.     PSET (x0, y0), clr~&
  8.     WHILE parentF = 1
  9.         parentF = 0: tick = tick + 1
  10.         ystart = max(y0 - tick, 0): ystop = min(y0 + tick, H)
  11.         y = ystart
  12.         WHILE y <= ystop
  13.             xstart = max(x0 - tick, 0): xstop = min(x0 + tick, W)
  14.             x = xstart
  15.             WHILE x <= xstop
  16.                 IF POINT(x, y) = fillColor AND temp(x, y) = 0 THEN
  17.                     IF temp(max(0, x - 1), y) THEN
  18.                         temp(x, y) = 1: parentF = 1: PSET (x, y), clr~&
  19.                     ELSEIF temp(min(x + 1, W), y) THEN
  20.                         temp(x, y) = 1: parentF = 1: PSET (x, y), clr~&
  21.                     ELSEIF temp(x, max(y - 1, 0)) THEN
  22.                         temp(x, y) = 1: parentF = 1: PSET (x, y), clr~&
  23.                     ELSEIF temp(x, min(y + 1, H)) THEN
  24.                         temp(x, y) = 1: parentF = 1: PSET (x, y), clr~&
  25.                     END IF
  26.                 END IF
  27.                 x = x + 1
  28.             WEND
  29.             y = y + 1
  30.         WEND
  31.     WEND
  32.  

Oh, and here are the 2 tiny Functions.
Code: QB64: [Select]
  1. FUNCTION min (n1, n2)
  2.     IF n1 > n2 THEN min = n2 ELSE min = n1
  3.  
  4. FUNCTION max (n1, n2)
  5.     IF n1 < n2 THEN max = n2 ELSE max = n1
  6.  
Title: Re: Paint Pixels 7 With JPG Saves And No Gaps In Drawing And Thicker Drawing!
Post by: SierraKen on June 27, 2020, 06:13:16 pm
I just changed one line from lastx, lasty to mousex, mousey. But it still does the same thing sometimes.

Code: QB64: [Select]
  1. IF mouseLeftButton THEN paint3 mousex, mousey, clr~&, &HFFFFFFFF
  2.  
Title: Re: Paint Pixels 7 With JPG Saves And No Gaps In Drawing And Thicker Drawing!
Post by: bplus on June 27, 2020, 07:13:15 pm
I checked fill from code in reply #16
 

Looks OK

Remember fill only fills all color around it that is exactly the same as point you click.

If you try fill over photo where nearly every color is different you will want to fill to a border color, draw the border and then use PAINT (x, y), fillColor, toBorderColor

Wait....


Why are there 4 parameters in PAINT3? It should look like this:
Code: QB64: [Select]
  1. SUB paint3 (x0, y0, fill AS _UNSIGNED LONG) ' needs max, min functions
  2.     DIM fillColor AS _UNSIGNED LONG, W, H, parentF, tick, ystart, ystop, xstart, xstop, x, y
  3.     fillColor = POINT(x0, y0)
  4.     'PRINT fillColor
  5.     W = _WIDTH - 1: H = _HEIGHT - 1
  6.     DIM temp(W, H)
  7.     temp(x0, y0) = 1: parentF = 1
  8.     PSET (x0, y0), fill
  9.     WHILE parentF = 1
  10.         parentF = 0: tick = tick + 1
  11.         ystart = max(y0 - tick, 0): ystop = min(y0 + tick, H)
  12.         y = ystart
  13.         WHILE y <= ystop
  14.             xstart = max(x0 - tick, 0): xstop = min(x0 + tick, W)
  15.             x = xstart
  16.             WHILE x <= xstop
  17.                 IF POINT(x, y) = fillColor AND temp(x, y) = 0 THEN
  18.                     IF temp(max(0, x - 1), y) THEN
  19.                         temp(x, y) = 1: parentF = 1: PSET (x, y), fill
  20.                     ELSEIF temp(min(x + 1, W), y) THEN
  21.                         temp(x, y) = 1: parentF = 1: PSET (x, y), fill
  22.                     ELSEIF temp(x, max(y - 1, 0)) THEN
  23.                         temp(x, y) = 1: parentF = 1: PSET (x, y), fill
  24.                     ELSEIF temp(x, min(y + 1, H)) THEN
  25.                         temp(x, y) = 1: parentF = 1: PSET (x, y), fill
  26.                     END IF
  27.                 END IF
  28.                 x = x + 1
  29.             WEND
  30.             y = y + 1
  31.         WEND
  32.     WEND

When you call it inside your program
PAINT3 mousex, mousey, colorToFillInWith '< the color selected off picker 

No 4th argument!
Title: Re: Paint Pixels 7 With JPG Saves And No Gaps In Drawing And Thicker Drawing!
Post by: SierraKen on June 27, 2020, 07:22:30 pm
The more you use it on one image, the lesser it works on my end. The first few times it works fine. But if you use it like over 5 times, every other time it doesn't work, and sometimes it only works every few times. So please try it again. Make a big scribble and try it about 10 times. If it works perfectly on your end, then something is off. By the way, my QB64 version is 1.3 still. I think it's time to get 1.4.
Title: Re: Paint Pixels 7 With JPG Saves And No Gaps In Drawing And Thicker Drawing!
Post by: bplus on June 27, 2020, 07:25:39 pm
No I see you mucked up PAINT3, only 3 arguments in the call.

It's a wonder it works at all?

OK new Color Picker and PAINT3 returned to 3 arguments and yes, I see what you mean. After awhile the clicks don't work or only rarely.

EDIT: Sorry wrong copy posted, seems I lost track of proper mod.
Title: Re: Paint Pixels 7 With JPG Saves And No Gaps In Drawing And Thicker Drawing!
Post by: SierraKen on June 27, 2020, 07:27:42 pm
Bplus, yours doesn't work with a white background. And yours only produces a white fill-in. So I had to add the current color variable to it. Maybe I did mess it up, but that's why I'm asking you.
Title: Re: Paint Pixels 7 With JPG Saves And No Gaps In Drawing And Thicker Drawing!
Post by: SierraKen on June 27, 2020, 07:28:24 pm
Here it is with your SUB... try it out..


Update: Huge memory issue found, please delete this version if you have it. Code has been removed.
Title: Re: Paint Pixels 7 With JPG Saves And No Gaps In Drawing And Thicker Drawing!
Post by: bplus on June 27, 2020, 07:39:03 pm
Yeah I plugged in the old PAINT3 and new Color Picker and see what you mean about clicks not working after awhile.

I updated here: https://www.qb64.org/forum/index.php?topic=2751.msg119938#msg119938

BTW your orbits and boxes work funny too?

But I do like the thicker lines, that's new right?
Title: Re: Paint Pixels 7 With JPG Saves And No Gaps In Drawing And Thicker Drawing!
Post by: SierraKen on June 27, 2020, 07:52:07 pm
Thanks for adding the color. Well, I never changed your orbits and boxes. But they work good for me. This isn't a professional app :).
But yeah, the Fill-In still has the same problem of not working sometimes. I don't know if there's a fix for this or not. I wonder if it's trying to squeeze in between points and filling up other stuff, because I did notice that one shade of an already-existing fill-in changed color a tiny bit when I used the fill-in on a different place. If you think I should just remove the fill-in that's OK with me. I'm just having fun with this. Oh and yeah I made the lines thicker earlier today. I like them too. :) Those and the open and save windows dialog totally made my weekend.
Title: Re: Paint Pixels 7 With JPG Saves And No Gaps In Drawing And Thicker Drawing!
Post by: bplus on June 27, 2020, 08:01:04 pm
Dang it I posted wrong code here:
https://www.qb64.org/forum/index.php?topic=2751.msg119938#msg119938

It has your paint3, I am getting confused... I know PAINT3 works if you don't mess with parameters and it's innards.

You could check if you have a shared variable that PAINT3 might be changing or be change by but I doubt you share variables that much.

What is difference between your oldx, oldy and lastx, lasty?

Title: Re: Paint Pixels 7 With JPG Saves And No Gaps In Drawing And Thicker Drawing!
Post by: bplus on June 27, 2020, 08:03:41 pm
Code: QB64: [Select]
  1.     IF fMode AND m = 6 THEN
  2.         _TITLE "Mode: (F)ill | (D)raw, (E)rase, 1 = New, (C)olors, (R)ays, (O)rbits, (B)oxes, (S)ave, (L)oad, (P)rint"
  3.         IF mouseLeftButton THEN paint3 mousex, mousey, &HFFFFFFFF '<<<<<<<<<<<<<< no use the users Clr~& pick
  4.         lastx = mousex
  5.         lastY = mousey
  6.         _PUTIMAGE , s&, picture&
  7.     END IF
Title: Re: Paint Pixels 7 With JPG Saves And No Gaps In Drawing And Thicker Drawing!
Post by: SierraKen on June 27, 2020, 08:12:21 pm
I don't know why, but without that HFFFFFF, it makes a Syntax Error.
When I do this:
Code: QB64: [Select]
  1. IF mouseLeftButton THEN paint3 mousex, mousey, clr~&  
  2.  
Title: Re: Paint Pixels 7 With JPG Saves And No Gaps In Drawing And Thicker Drawing!
Post by: SierraKen on June 27, 2020, 08:16:22 pm
oldx and oldy are used with the draw and erase. lastx and lasty are used with everything else. I guess I could try using lastx and lasty on draw and erase instead, will try that.
Title: Re: Paint Pixels 7 With JPG Saves And No Gaps In Drawing And Thicker Drawing!
Post by: SierraKen on June 27, 2020, 08:27:24 pm
OK I removed oldx and oldy and it seems to work fine with just lastx and lasty, thanks. But before I post the code again, I just need to figure out how to remove &HFFFFFFFF without getting a Syntax Error. I know I am a total newbie at SUBs. lol
Title: Re: Paint Pixels 7 With JPG Saves And No Gaps In Drawing And Thicker Drawing!
Post by: bplus on June 27, 2020, 08:32:15 pm
I don't know why, but without that HFFFFFF, it makes a Syntax Error.
When I do this:
Code: QB64: [Select]
  1. IF mouseLeftButton THEN paint3 mousex, mousey, clr~&  
  2.  

The above looks right and works in my copy with old PAINT3 restored to 3 arguments instead of 4.

Does the first line of PAINT3 sub look like this:
SUB paint3 (x0, y0, fill AS _UNSIGNED LONG) ' needs max, min functions
Title: Re: Paint Pixels 7 With JPG Saves And No Gaps In Drawing And Thicker Drawing!
Post by: SierraKen on June 27, 2020, 08:47:45 pm
The SUB line had the clr~& also, so I just pasted yours in instead. But now Fill doesn't work at all. Here, let show you what I have. I do appreciate your help as always but if you are getting tired of this, just let me know and we can call it a day. Up to you.

Code: QB64: [Select]
  1.     IF fMode AND m = 6 THEN
  2.         _TITLE "Mode: (F)ill | (D)raw, (E)rase, 1 = New, (C)olors, (R)ays, (O)rbits, (B)oxes, (S)ave, (L)oad, (P)rint"
  3.         IF mouseLeftButton THEN paint3 mousex, mousey, clr~&
  4.         lastx = mousex
  5.         lasty = mousey
  6.         _PUTIMAGE , s&, picture&
  7.     END IF
  8.  


Code: QB64: [Select]
  1. SUB paint3 (x0, y0, fill AS _UNSIGNED LONG) ' needs max, min functions
  2.     DIM fillColor AS _UNSIGNED LONG, W, H, parentF, tick, ystart, ystop, xstart, xstop, x, y
  3.     fillColor = POINT(x0, y0)
  4.     W = _WIDTH - 1: H = _HEIGHT - 1
  5.     DIM temp(W, H)
  6.     temp(x0, y0) = 1: parentF = 1
  7.     PSET (x0, y0), clr~&
  8.     WHILE parentF = 1
  9.         parentF = 0: tick = tick + 1
  10.         ystart = max(y0 - tick, 0): ystop = min(y0 + tick, H)
  11.         y = ystart
  12.         WHILE y <= ystop
  13.             xstart = max(x0 - tick, 0): xstop = min(x0 + tick, W)
  14.             x = xstart
  15.             WHILE x <= xstop
  16.                 IF POINT(x, y) = fillColor AND temp(x, y) = 0 THEN
  17.                     IF temp(max(0, x - 1), y) THEN
  18.                         temp(x, y) = 1: parentF = 1: PSET (x, y), clr~&
  19.                     ELSEIF temp(min(x + 1, W), y) THEN
  20.                         temp(x, y) = 1: parentF = 1: PSET (x, y), clr~&
  21.                     ELSEIF temp(x, max(y - 1, 0)) THEN
  22.                         temp(x, y) = 1: parentF = 1: PSET (x, y), clr~&
  23.                     ELSEIF temp(x, min(y + 1, H)) THEN
  24.                         temp(x, y) = 1: parentF = 1: PSET (x, y), clr~&
  25.                     END IF
  26.                 END IF
  27.                 x = x + 1
  28.             WEND
  29.             y = y + 1
  30.         WEND
  31.     WEND
  32.  
Title: Re: Paint Pixels 7 With JPG Saves And No Gaps In Drawing And Thicker Drawing!
Post by: bplus on June 27, 2020, 08:58:22 pm
Here is the original PAINT3 before you changed variable names
Code: QB64: [Select]
  1. SUB paint3 (x0, y0, fill AS _UNSIGNED LONG) ' needs max, min functions
  2.     DIM fillColor AS _UNSIGNED LONG, W, H, parentF, tick, ystart, ystop, xstart, xstop, x, y
  3.     fillColor = POINT(x0, y0)
  4.     'PRINT fillColor
  5.     W = _WIDTH - 1: H = _HEIGHT - 1
  6.     DIM temp(W, H)
  7.     temp(x0, y0) = 1: parentF = 1
  8.     PSET (x0, y0), fill
  9.     WHILE parentF = 1
  10.         parentF = 0: tick = tick + 1
  11.         ystart = max(y0 - tick, 0): ystop = min(y0 + tick, H)
  12.         y = ystart
  13.         WHILE y <= ystop
  14.             xstart = max(x0 - tick, 0): xstop = min(x0 + tick, W)
  15.             x = xstart
  16.             WHILE x <= xstop
  17.                 IF POINT(x, y) = fillColor AND temp(x, y) = 0 THEN
  18.                     IF temp(max(0, x - 1), y) THEN
  19.                         temp(x, y) = 1: parentF = 1: PSET (x, y), fill
  20.                     ELSEIF temp(min(x + 1, W), y) THEN
  21.                         temp(x, y) = 1: parentF = 1: PSET (x, y), fill
  22.                     ELSEIF temp(x, max(y - 1, 0)) THEN
  23.                         temp(x, y) = 1: parentF = 1: PSET (x, y), fill
  24.                     ELSEIF temp(x, min(y + 1, H)) THEN
  25.                         temp(x, y) = 1: parentF = 1: PSET (x, y), fill
  26.                     END IF
  27.                 END IF
  28.                 x = x + 1
  29.             WEND
  30.             y = y + 1
  31.         WEND
  32.     WEND
  33.  

Keep it how it is and then the call to it
Code: QB64: [Select]
  1. IF mouseLeftButton THEN paint3 mousex, mousey, clr~&  

will work, clr~& will get passed through and be used where ever fill is in the SUB just like mousex will replace all x0, and mousey will replace all y0. That's how sub arguments work.

That's the beauty of SUBs all the x,y's inside a SUB have their own meanings only inside the SUB and have no relation to x, y's outside the SUB. You don't have to worry about changing x, y in the main code because you are using them in the SUB, that is the real advantage of SUBs. 
Title: Re: Paint Pixels 7 With JPG Saves And No Gaps In Drawing And Thicker Drawing!
Post by: SierraKen on June 27, 2020, 09:08:26 pm
Thanks again. I just replaced mine with all of yours completely with your new code. And the colors work pretty good. Still has a bit of a problem of sometimes not working but let's leave it at that. It might even have something to do with the Mouse left button detection. But we can leave it as it is and since it works around 80% of the time or so, people can just click a few more times in the same area to make it work. I'm off for the night myself. If you want to work on it more, go right ahead. Here is the entire program besides the 4 needed library files, which can be found on an earlier post.
Thanks for your time and effort B+, it's still a GREAT program and soon I might add more to it sometime.


Update: Huge memory issue found, please delete this version if you have it. Code has been removed.
Title: Re: Paint Pixels 7 With JPG Saves And No Gaps In Drawing And Thicker Drawing!
Post by: SierraKen on June 27, 2020, 09:26:07 pm
Just a quick note, I just found out that when it doesn't work, it's because the whole program freezes up for a few seconds. So, there's either a loop that won't end somewhere or a memory glitch. I have a pretty good computer though, Windows 10 Quadcore with 16 GB RAM.
Title: Re: Paint Pixels 7 With JPG Saves And No Gaps In Drawing And Thicker Drawing!
Post by: SierraKen on June 27, 2020, 09:43:59 pm
Whew... I just figured something really important out. The mouse detection is 2 times per click sometimes. So it was doing 2 entire processes at once sometimes. I know this from what I did earlier today with using the PRINT command, it made 2 words every time the Fill click happened. So, I just put in a quick IF  mouseLeftButton then mouseLeftButton = 0 right after the paint3 call on the next line. And now it works around 100% of the time!!! It also works faster. Here is the updated and fixed code. B+ please check it out because you spent tons of time on this. Attached is the new zip file with all the files and also attached is a picture of a scribble I made with 50 1-click fill-ins that were perfect every time. Thanks again B+ for the help and keeping me going at this.



Title: Re: Paint Pixels 7 With JPG Saves And No Gaps In Drawing And Thicker Drawing!
Post by: bplus on June 27, 2020, 10:00:12 pm
Good! and the old color picker was prettier anyway :-))

Glad we got PAINT3 working, it is nice variation to other PAINT options but you might want a paint fill to a border color for filling in on an image in the future.

Title: Re: Paint Pixels 7 With JPG Saves And No Gaps In Drawing And Thicker Drawing!
Post by: SierraKen on June 27, 2020, 10:13:02 pm
LOL Woops! I forgot to put the new color picker on it again. I think I will because I like how it's very easy to tell what the new color is from the big color box you made. I'll post the new zip in a few minutes. Thanks for telling me! My memory (in my noggin) is very bad sometimes.
Title: Re: Paint Pixels 7 With JPG Saves And No Gaps In Drawing And Thicker Drawing!
Post by: bplus on June 27, 2020, 10:20:01 pm
I think one can get a little batty trying to chase down two mice! Tom and Jerry and Jerry's twin brother Gary. ;)
Title: Re: Paint Pixels 7 With JPG Saves And No Gaps In Drawing And Thicker Drawing!
Post by: SierraKen on June 27, 2020, 10:21:14 pm
LOL and the Gremlins strike again! I replaced your older color dialog Function with your newer one again and now the Fill is doing that same problem. So I'm going to stop while I'm ahead and just keep the old color picker. :)) I have absolutely no idea what happened but I'm going to back away... LOL
Title: Re: Paint Pixels 7 With JPG Saves And No Gaps In Drawing And Thicker Drawing!
Post by: SierraKen on June 27, 2020, 10:23:20 pm
I once heard, a long time ago, that color can "bleed" through to another screen somehow? LOL here I go again, trying to hunt down the mice. LOL
Title: Re: Paint Pixels 7 With JPG Saves And No Gaps In Drawing And Thicker Drawing!
Post by: bplus on June 27, 2020, 10:36:49 pm
Here is the one with new simpler Color Dialog, since my name is on this too I can help ;)

Update: OK download seems to be working correctly.

You know this fill reminds me of Dav's Game of filling colors until the whole screen is one color.

Title: Re: Paint Pixels 7 With JPG Saves And No Gaps In Drawing And Thicker Drawing!
Post by: SierraKen on June 27, 2020, 11:09:02 pm
Bplus, by now you probably hate me LOL but I just found something I totally forgot today. To add what the Cancel button does on the Open and Save dialogues. It's not hard to fix though. I just added IF NM$ = "" THEN GOTO.....
Just copy/paste this into your Save Section and Open Section.

Code: QB64: [Select]
  1. 'Saving Section
  2. saving:
  3. nm$ = GetSaveFileName("Save Image" + CHR$(0), ".\", "JPG Image (.JPG)|*.JPG" + CHR$(0), 1, OFN_OVERWRITEPROMPT + OFN_NOCHANGEDIR, _WINDOWHANDLE)
  4. IF nm$ = "" THEN GOTO skipsave:
  5. IF RIGHT$(nm$, 4) <> ".jpg" THEN nm$ = nm$ + ".jpg"
  6. _DELAY .25
  7. Result = SaveImage(nm$, 0, 0, 0, _WIDTH(img), _HEIGHT(img)) 'first zero is your screen, second zero is X start, 3th zero is y start
  8. _DELAY .25
  9. nm$ = ""
  10. skipsave:
  11. dMode = 1
  12. m = 1
  13.  
  14. 'Loading Section
  15. loading:
  16. nm$ = GetOpenFileName("Open Image" + CHR$(0), ".\", "JPG Image (.JPG)|*.JPG" + CHR$(0), 1, OFN_FILEMUSTEXIST + OFN_NOCHANGEDIR + OFN_READONLY, _WINDOWHANDLE)
  17. l = 0
  18. IF nm$ = "" THEN GOTO skipopen:
  19. i& = _LOADIMAGE(nm$, 32)
  20. s& = i&
  21. i& = 0
  22. screenx = _WIDTH
  23. screeny = _HEIGHT
  24. picture& = _NEWIMAGE(screenx, screeny, 32)
  25. skipopen:
  26. dMode = 1
  27. m = 1
  28.  
Title: Re: Paint Pixels 7 With JPG Saves And No Gaps In Drawing And Thicker Drawing!
Post by: SierraKen on June 27, 2020, 11:13:37 pm
Here is the fixed version in its own zip file with the 4 needed libraries.

 
Update: Huge memory issue found, please delete this version if you have it. Zip file has been removed.

Title: Re: Paint Pixels 7 With JPG Saves And No Gaps In Drawing And Thicker Drawing!
Post by: bplus on June 27, 2020, 11:37:06 pm
And still the prettier old Color Dialog!
Title: Re: Paint Pixels 7 With JPG Saves And No Gaps In Drawing And Thicker Drawing!
Post by: SpriggsySpriggs on June 28, 2020, 01:13:24 am
@SierraKen I apologize, you are correct. The extension is not attached in 64 bit. I got it to work in 32 bit. This just tells me there is something wrong in a variable size in the 64 bit that Petr and I have been using. I'll have to fiddle around with variable types in the 64 bit type and see what makes it finally click. Thank you for letting me know about this! The issue is with nFilterIndex. In 32 bit, it returns the index of the selected extension, allowing it to be found and added automatically. In 64 bit, there is a variable type issue somewhere and it is causing it to return 4.7E whatever which is obviously not an index in the filter. I'll check this out in the coming week and keep changing variable types until something hits.
Title: Re: Paint Pixels 7 With JPG Saves And No Gaps In Drawing And Thicker Drawing!
Post by: SierraKen on June 28, 2020, 01:46:49 am
Welcome Spriggsy, am always glad I can help.

Late tonight I added something fun that B+ gave me the idea for, different background colors to start out with. I didn't use any color picker, just a list of 9 common colors to choose from. The picture below doesn't have one of the chosen backgrounds (I accidentally did Fill on the whole sky LOL). But it's very similar.


Update: Huge memory issue found, please delete this version if you have it. Zip file has been removed.


Title: Re: Paint Pixels 7 With JPG Saves And No Gaps In Drawing And Thicker Drawing!
Post by: SierraKen on June 28, 2020, 06:43:38 pm
The next Paint Pixels update is coming soon. It will have a color wheel of 170 different colors and shades to choose the background color. It uses a graphic file that is loaded to the screen and the POINT command to choose the color. I'm still going to use the color picker sliders that B+ made for the paint color. The update will also have the ability to save your graphic as JPG, PNG, or BMP files, thanks to Petr's work on the open and save libraries.
Title: Re: Paint Pixels 7 With JPG Saves And No Gaps In Drawing And Thicker Drawing!
Post by: Petr on June 28, 2020, 07:23:05 pm
You can also add a GIF option. Steve's library can do that, too.
Title: Re: Paint Pixels 7 With JPG Saves And No Gaps In Drawing And Thicker Drawing!
Post by: SMcNeill on June 28, 2020, 07:34:58 pm
You can also add a GIF option. Steve's library can do that, too.

And, if we ever expand _LOADIMAGE to work with other formats, I'll probably expand SaveImage to work with those formats also.  ;)
Title: Re: Paint Pixels 7 With JPG Saves And No Gaps In Drawing And Thicker Drawing!
Post by: SierraKen on June 28, 2020, 08:09:16 pm
I just now tried to add GIF and got an error message for the library. This is what I got:

Line: 1539 (in saveimage.bm) Subscript out of range. Continue?

It happened as soon as I tried to save an image to GIF. The dialogue window opened fine though. Here is my dialogue script:

Code: QB64: [Select]
  1. nm$ = GetSaveFileName("Save Image", ".\", "JPG Image (.jpg)|*.jpg|PNG Image (.png)|*.png|GIF Image (.gif)|*.gif|BMP Image (.bmp)|*.bmp", 1, OFN_OVERWRITEPROMPT + OFN_NOCHANGEDIR, _WINDOWHANDLE)
  2.  

It saves a JPG right though. But I just checked my folder and it saves some of the GIF image but not the complete image.
Title: Re: Paint Pixels 7 With JPG Saves And No Gaps In Drawing And Thicker Drawing!
Post by: SMcNeill on June 28, 2020, 08:46:56 pm
I'll dig into it tomorrow and see what's going on.  Which version of the library are you using, so I know which line to look at for that subscript error.
Title: Re: Paint Pixels 7 With JPG Saves And No Gaps In Drawing And Thicker Drawing!
Post by: SierraKen on June 28, 2020, 09:07:39 pm
I'm using these... I don't know if they are out of date or what. I've had them for awhile. I'll put them in attachments. Thanks for your help Steve.

Title: Re: Paint Pixels 7 With JPG Saves And No Gaps In Drawing And Thicker Drawing!
Post by: Petr on June 29, 2020, 05:58:38 am
Quote
I just now tried to add GIF and got an error message for the library. This is what I got:

Line: 1539 (in saveimage.bm) Subscript out of range. Continue?

It happened as soon as I tried to save an image to GIF. The dialogue window opened fine though. Here is my dialogue script:


Code: QB64: [Select]
nm$ = GetSaveFileName("Save Image", ".\", "JPG Image (.jpg)|*.jpg|PNG Image (.png)|*.png|GIF Image (.gif)|*.gif|BMP Image (.bmp)|*.bmp", 1, OFN_OVERWRITEPROMPT + OFN_NOCHANGEDIR, _WINDOWHANDLE)
 

This section, which you mention, has nothing to do with the SaveImage library. This section only returns the path to the file.

Try use:
Code: QB64: [Select]
  1. Result = SaveImage(nm$, 0, 0, 0, _WIDTH-1, _HEIGHT-1)
  2.  

Can you also post here, how is writed this row in your current program?

Result = SaveImage...

I use newerest SaveImage library + opensave library and no problem, when saving image as GIF.
Title: Re: Paint Pixels 7 With JPG Saves And No Gaps In Drawing And Thicker Drawing!
Post by: SierraKen on June 29, 2020, 02:34:56 pm
Thanks Petr, I found your newest SaveImage libraries on the other forum thread and those seem to work fine. One thing you should know is that if you use the  _WIDTH - 1, _HEIGHT - 1 like you said, the outcome doesn't look smooth at all, it's a bit crunched up on the lines. So I used this:

Code: QB64: [Select]
  1. Result = SaveImage(nm$, 0, 0, 0, _WIDTH(img), _HEIGHT(img)) 'first zero is your screen, second zero is X start, 3th zero is y start
  2.  

Don't ask me what the (img) is from, might be something b+ did almost a year ago for an example or something, but for some weird reason it works better than not using it I think.
But yes, the SaveImage 2.3b works just fine now. Steve, there's no need to fix my problem with it I believe.
Also, I think I fixed the _TITLE text getting inside the Save dialog box list, although it might still show up every once in awhile. It's not a big problem since most people won't try to save their picture as a bunch of strange letters as the extension LOL.
I'll post the newest update in a minute, it has lots of goodies I've been adding. :)))

Title: Re: Paint Pixels 7 With JPG Saves And No Gaps In Drawing And Thicker Drawing!
Post by: SierraKen on June 29, 2020, 03:06:56 pm
OK, here is the big (and probably last for version 7) update. I will re-post all of what I did for version 7 below. But I just want to say thank you everyone for all your help. I couldn't have done this without you. Today and yesterday I added GIF support, 170 different background colors to choose from using a color wheel graphic, user defined screen sizes (as well as the regular sizes), and an Undo feature. The Undo feature lets people remove their last action on the picture they make. More information on how to use it is on the front page.
The updated zip file with all the needed files is below in attachments. As well as a simple .png house using fill-in and ray lines.

Here is all of the additions I have made on version 7:

Changed from just bmp pictures to jpg, png, gif, and bmp pictures.
Fixed the Drawing so that there's no gaps.
Fixed the Erasing so that there's no gaps.
Deleted tiny dot in center of orbits when turning them off.
Added different sizes of screens to select from.
Removed sounds.
Changed antique way of saving and opening to Windows Open and Save File Dialog.
Made Ray lines thicker.
Added the ability to see instructions without picture being lost.
Added 170 different background colors to choose from on a color wheel.
Minor fixes.
Thank you to B+ for the Fill-In code!
Thank you Petr, B+, and SpriggySpriggs for the help and examples for Open and Save File Dialog.
Added Undo feature.
Added User Defined Screen Size.


Update: Huge memory issue found, please delete this version if you have it. Zip file has been removed.
Title: Re: Paint Pixels 7 With JPG Saves And No Gaps In Drawing And Thicker Drawing!
Post by: SierraKen on June 30, 2020, 02:55:32 pm
I just fixed a small problem. A few days ago I changed the eraser to white whenever someone loaded a new picture with it. But I forgot to not change it white when someone just clicks Cancel on the open dialog. So it's fixed now and uploaded above in the zip file.