How do you save a screen

Discuss all aspects of programming here. From 8-bit through to modern architectures.
User avatar
pixelblip
Posts: 487
Joined: Wed Feb 04, 2015 7:19 pm

Re: How do you save a screen

Postby pixelblip » Sat Jun 10, 2017 3:35 am

That is awesome ! Aren't you clever. How you did those patterns. Im gonna try a pic now with it. Well done Fourthstone. It's great to see it moving forward. :D


Its lovely to paint with.

User avatar
FourthStone
Posts: 400
Joined: Thu Nov 17, 2016 2:29 am
Location: Melbourne, Australia

Re: How do you save a screen

Postby FourthStone » Sat Jun 10, 2017 3:38 am

Wow that's a ripping picture, really well done, was that done with the tablet?

=D> :o \:D/

User avatar
pixelblip
Posts: 487
Joined: Wed Feb 04, 2015 7:19 pm

Re: How do you save a screen

Postby pixelblip » Sat Jun 10, 2017 3:39 am

The colour slider is lovely....much better.

User avatar
pixelblip
Posts: 487
Joined: Wed Feb 04, 2015 7:19 pm

Re: How do you save a screen

Postby pixelblip » Sat Jun 10, 2017 3:40 am

No the pic was done with Art v1 just now

User avatar
pixelblip
Posts: 487
Joined: Wed Feb 04, 2015 7:19 pm

Re: How do you save a screen

Postby pixelblip » Sat Jun 10, 2017 3:47 am

The hues and colours are much more subtle now even with 7 colours . People are going to love this art software. Bring on more BBC art on the web. Well done for getting your head around the dithering routine!

User avatar
pixelblip
Posts: 487
Joined: Wed Feb 04, 2015 7:19 pm

Re: How do you save a screen

Postby pixelblip » Sat Jun 10, 2017 4:01 am

Ps yes it was done with the tablet.

User avatar
FourthStone
Posts: 400
Joined: Thu Nov 17, 2016 2:29 am
Location: Melbourne, Australia

Re: How do you save a screen

Postby FourthStone » Sat Jun 10, 2017 4:16 am

pixelblip wrote:How you did those patterns. Im gonna try a pic now with it. Well done Fourthstone. It's great to see it moving forward. :D

Its lovely to paint with.


Patterns are the standard bayer ordered dithering, it's all programmed in straight basic, should be easy to understand.

I love how smooth it draws :D My 5 year old noticed me drawing and asked how to clear the screen so I showed how I could draw a box and make the program do something if I click in the box... hence the over sized clear box in top left right corner.

If you think you might make use of it I'll add more features.

User avatar
pixelblip
Posts: 487
Joined: Wed Feb 04, 2015 7:19 pm

Re: How do you save a screen

Postby pixelblip » Sat Jun 10, 2017 7:23 am

Ah that would be fab
Maybe we can get your 5 year old to do some art or programming and start -em early.....us BBC Artists are a dying breed :D

If you can implement some kind of save state or undo history that would be good. Also a mode 2 resolution (like the Beeb one) if that is possible..........and one thing down the line which would be a challege would be transparency - that might be difficult to achieve.....

So far it's looking really good. Well done and thank you.
Last edited by pixelblip on Sat Jun 10, 2017 10:53 am, edited 1 time in total.

User avatar
FourthStone
Posts: 400
Joined: Thu Nov 17, 2016 2:29 am
Location: Melbourne, Australia

Re: How do you save a screen

Postby FourthStone » Sat Jun 10, 2017 9:14 am

pixelblip wrote:If you can implement some kind of save state or undo history that would be good. Also a mode 2 resolution (like the Beeb one) if that is possible..........and one thing down the line which would be a challege would be transparency - that might be difficult to achieve.....


Hey pixel,

The current drawing resolution is for mode 2 (160x256 7 colours)... unless I've made a blunder???

Undo is definitely something I can put in, transparency is also on the cards, I've got a long weekend thanks to Queens birthday so I'll see I can whip up :wink:

User avatar
SimonSideburns
Posts: 257
Joined: Mon Aug 26, 2013 8:09 pm
Location: Purbrook, Hampshire
Contact:

Re: How do you save a screen

Postby SimonSideburns » Sat Jun 10, 2017 9:20 am

pixelblip wrote:There is a site ( http://colorslive.com/) that shows paintings being done that have been recorded.........you might find that useful...........


I have a Nintendo DS with an R4 card on it. I have an earlier version of Colors on it and yes, that's exactly what it does. Stores the strokes of the brush and then plays them back if you desire.

That's why I was thinking such a technique would be pretty unique for an art program. But yes, I suspect it would take too much of the processor's limited time to store and cache such information.
I'm writing a game where you can change your character from a Wizard to a monkey to a cat.

Well, Imogen that!

User avatar
Elminster
Posts: 1632
Joined: Wed Jun 20, 2012 8:09 am
Location: Essex, UK

Re: How do you save a screen

Postby Elminster » Sat Jun 10, 2017 9:30 am

SimonSideburns wrote:
pixelblip wrote:There is a site ( http://colorslive.com/) that shows paintings being done that have been recorded.........you might find that useful...........


I have a Nintendo DS with an R4 card on it. I have an earlier version of Colors on it and yes, that's exactly what it does. Stores the strokes of the brush and then plays them back if you desire.

That's why I was thinking such a technique would be pretty unique for an art program. But yes, I suspect it would take too much of the processor's limited time to store and cache such information.


I think even a Nintendo dfs has vastly more processing power than a Beeb and BASIC not that great at speed. But if it is now being ported to BASIC SDL, that would give a platform with much more power.

User avatar
pixelblip
Posts: 487
Joined: Wed Feb 04, 2015 7:19 pm

Re: How do you save a screen

Postby pixelblip » Sat Jun 10, 2017 10:34 am

The thing about Beeb em is that it supports Analogue Mousestick.
If BBC Sdl did that you'd be in with half a chance.
Anyway from what Fourthstone has done so far in Bb4w that is looking really exciting :D
Last edited by pixelblip on Sat Jun 10, 2017 10:51 am, edited 1 time in total.

User avatar
pixelblip
Posts: 487
Joined: Wed Feb 04, 2015 7:19 pm

Re: How do you save a screen

Postby pixelblip » Sat Jun 10, 2017 10:35 am

Cavern oF Europa
Attachments
Caveen of Europa.jpg
Last edited by pixelblip on Mon Jun 12, 2017 7:00 pm, edited 2 times in total.

User avatar
pixelblip
Posts: 487
Joined: Wed Feb 04, 2015 7:19 pm

Re: How do you save a screen

Postby pixelblip » Sat Jun 10, 2017 10:55 am

Ah Fourthstone sorry it looked higher res that that! Wow then.....
Oh it's her Marms birthday today. How could I forget! :lol:

User avatar
pixelblip
Posts: 487
Joined: Wed Feb 04, 2015 7:19 pm

Re: How do you save a screen

Postby pixelblip » Sat Jun 10, 2017 12:51 pm

Tweaked.......planet better now :D
Attachments
saturn5.jpg

User avatar
pixelblip
Posts: 487
Joined: Wed Feb 04, 2015 7:19 pm

Re: How do you save a screen

Postby pixelblip » Sat Jun 10, 2017 12:53 pm

You can see why transparency would be useful with that Saturn planet in the distance

User avatar
pixelblip
Posts: 487
Joined: Wed Feb 04, 2015 7:19 pm

Re: How do you save a screen

Postby pixelblip » Sat Jun 10, 2017 9:25 pm

Event Horizon
Attachments
Event Horizon.jpg

User avatar
FourthStone
Posts: 400
Joined: Thu Nov 17, 2016 2:29 am
Location: Melbourne, Australia

Re: How do you save a screen

Postby FourthStone » Sun Jun 11, 2017 10:54 am

Oh nice, very nice, sucker for blues so loving that last pic =D>

Been playing with ART for Windows again, I think I've got transparency working and starting to flesh out more features. Please note, not all buttons are implemented!

Would you be able to try out the transparency and let me know if it's working right?

Code: Select all

      REM MODE 22 : 128x48 Chars : 1024x768 Real Pixels : 2048x1536 Logical Pixels : 16 Colours

      REM Chars are 16x32

      REM Drawing window: Mode 2 160x256 pixels, 1280 x 1024 logical pixels

      MODE 22

      REM Switch off cursor and switch on print to graphics cursor
      VDU 23,1,0;0;0;0;
      VDU 5

      MOUSE ON 3

      REM Pattern array
      DIM pat{(17)c(15)}

      PROCinitPatterns

      REM Mouse coords
      LET mx%=0
      LET my%=0
      LET mb%=0

      REM Pattern and colour vars
      LET col%=1
      LET pat%=8
      LET pcol%=0
      LET pS%=0

      REM Pixel coords at mouse cursor
      LET px%=0
      LET py%=0

      REM drawing vars
      LET dX%=0
      LET dY%=0
      LET dW%=1500
      LET dT%=1
      LET dC%=0

      LET fExit=FALSE

      REM Colour definitions for drawing palette
      COLOUR 1,255,0,0
      COLOUR 2,0,255,0
      COLOUR 3,255,255,0
      COLOUR 4,0,0,255
      COLOUR 5,255,0,255
      COLOUR 6,0,255,255
      COLOUR 7,255,255,255

      REM Colour definitions for tools palette
      COLOUR 9,192,0,0
      COLOUR 10,0,192,0
      COLOUR 11,192,192,0
      COLOUR 12,0,0,192
      COLOUR 13,192,0,192
      COLOUR 14,0,192,192
      COLOUR 15,192,192,192

      REM Turn off screen refresh, must use *REFRESH to update screen
      *REFRESH OFF

      GCOL 7

      REM Draw region
      RECTANGLE 0,0,1296,1044
      RECTANGLE 2,2,1292,1040

      REM palette
      RECTANGLE 0,1072,1184,392

      REM Col select
      RECTANGLE 1200,1072,64,392
      RECTANGLE 1208,col%*48+1074,46,46

      REM Current drawing pattern
      RECTANGLE 1280,1336,128,128

      REM Brush size
      RECTANGLE 1280,1072,128,200

      REM Transparency toggle
      GCOL 2
      RECTANGLE FILL 1448,1090,34,34

      REM Tools
      RECTANGLE 1424,1072,616,392
      PROCbutton(1440,1412,"LOAD")
      PROCbutton(1440,1356,"SAVE")
      PROCbutton(1440,1300,"CLS")
      PROCbutton(1440,1244,"UNDO")
      PROCbutton(1896,1412,"EXIT")
      PROCbox(1440,1084,48,48)


      FOR I%=0 TO 7
        GCOL I%
        RECTANGLE FILL 1312,200+I%*56,56,56
        GCOL I%+8
        RECTANGLE FILL 1368,200+I%*56,56,56
      NEXT

      REM Labels
      PROCdt(1200,1496,3,"Col",0)
      PROCdt(1284,1496,3,"Pat",0)
      PROCdt(1284,1304,3,"Size",0)
      PROCdt(1428,1496,3,"Tools",0)
      PROCdt(1512,1136,3,"Brush Transparancy",0)
      PROCdt(1512,1104,3,"(only works with black pixels)",0)

      REM Stats
      PROCdt(1312,1024,2,"mX:",0)
      PROCdt(1312,992,2,"mY:",0)
      PROCdt(1312,960,2,"pX:",0)
      PROCdt(1312,928,2,"pY:",0)
      PROCdt(1312,896,2,"mB:",0)
      PROCdt(1312,864,2,"sC:",0)
      PROCdt(1312,832,2,"pC:",0)
      PROCdt(1312,800,2,"pS:",0)
      PROCdt(1312,768,2,"dW:",0)


      REM Colour select and title
      FOR I%=0 TO 7
        GCOL I%
        RECTANGLE FILL 1216,I%*48+1080,32,32
        MOVE 440+I%*4,1512+I%*2
        GCOL (I% DIV 7)*2+1
        PRINT "ART For Windows!!!"
      NEXT

      REM Size guide
      GCOL 6
      CIRCLE FILL 1344,1112,30
      CIRCLE FILL 1344,1168,20
      CIRCLE FILL 1344,1212,12
      CIRCLE FILL 1344,1240,8


      PROCpalette
      PROCbrush

      REM === Main loop ===

      REPEAT
 
        REM Make sure ART window has focus
        SYS "GetForegroundWindow" TO hw%
        IF hw% = @hwnd% THEN
   
          REM check for Z and X to change draw size
          IF INKEY-98 AND dW%>0 dW%=dW%-1
          IF INKEY-67 AND dW%<3000 dW%=dW%+1
   
          REM read mouse status
          MOUSE mx%, my%, mb%
   
          REM normalise mouse coords to pixel grid
          mx%=(mx% DIV 8)*8
          my%=(my% DIV 4)*4
   
          REM Update stats
          PROCshowstats
   
          REM left mouse button clicked
          IF mb%=4 THEN
     
            REM Check for drawing click region
            IF mx%>0 AND mx%<1288 AND my%>4 AND my%<1032 THEN
       
              REM get pixel coords
              px%=(mx% DIV 8)-(dW% DIV 400)-1
              py%=(my% DIV 4)-(dW% DIV 200)-2
       
              REM draw pattern loop
              FOR lX%=0 TO (dW% DIV 200)
                FOR lY%=0 TO (dW% DIV 100)
                  REM range check, set pattern colour and plot
                  IF (px%+lX%)>-1 AND (px%+lX%)<160 AND (py%+lY%)>-1 AND (py%+lY%)<256 THEN
                    pS%=(px%+lX%) MOD 4+((py%+lY%) MOD 4)*4
                    IF pat{(pat%)}.c(pS%) THEN
                      dC%=pcol%
                    ELSE
                      dC%=col%
                    ENDIF
             
                    REM Check for transparency
                    IF dC%-dT%>-1 THEN
                      GCOL dC%
                      RECTANGLE FILL (px%+lX%)*8+8,(py%+lY%)*4+8,8,4
                    ENDIF
                  ENDIF
                NEXT
              NEXT
            ENDIF
     
            REM Check for colour select region
            IF mx%>1200 AND mx%<1264 AND my%>1076 AND my%<1452 THEN
              I%=(my%-1072) DIV 48
              IF col%<>I% AND I%>-1 AND I%<8 THEN
                GCOL 0
                RECTANGLE 1208,col%*48+1074,46,46
                GCOL 7
                RECTANGLE 1208,I%*48+1074,46,46
                col%=I%
                PROCpalette
                PROCbrush
              ENDIF
            ENDIF
     
            REM Check for palette select region
            IF mx%>8 AND mx%<1168 AND my%>1076 AND my%<1452 THEN
              I%=((my%-1072) DIV 48) MOD 8
              J%=((mx%-16) DIV 64) MOD 18
       
              IF pcol%<>I% OR pat%<>J% THEN
                pcol%=I%
                pat%=J%
                PROCbrush
              ENDIF
            ENDIF
     
            REM Check brush size change region
            IF mx%>1280 AND mx%<1408 AND my%>1072 AND my%<1272 THEN
              I%=3200-((my%-1076) DIV 6)*100
              J%=(dW% DIV 10)*10
              IF I%<>J% THEN
                dW%=I%
              ENDIF
            ENDIF
     
            REM Tools region
            IF mx%>1432 AND mx%<2024 AND my%>1080 AND my%<1456 THEN
              REM Clear mouse botton
              REPEAT
                MOUSE mx%, my%, mb%
                PROCshowstats
                *REFRESH
              UNTIL mb%=0
       
              REM Load, Save, CLS, Undo
              IF mx%>1432 AND mx%<1568 AND my%>1240 AND my%<1456 THEN
                tool%=(my%-1240) DIV 56
         
                PROCdt(1464,1024,3,STR$(tool%),2)
              ENDIF
       
              REM Transparency toggle
              IF mx%>1432 AND mx%<1488 AND my%>1080 AND my%<11132 THEN
                dT%=(dT%+1) MOD 2
         
                GCOL dT%*2
                RECTANGLE FILL 1448,1090,34,34
         
              ENDIF
       
       
              REM Exit button
              IF mx%>1888 AND mx%<2024 AND my%>1408 AND my%<1456 THEN
                fExit=TRUE
              ENDIF
            ENDIF
     
            REM === END OF LEFT MOUSE BUTTON SECTION ===
          ENDIF
   
   
          REM Refresh the screen (no flicker)
          *REFRESH
        ENDIF
 
      UNTIL fExit

      *REFRESH ON

      QUIT

      REM === END OF MAIN PROGRAM ===

      REM === Procedures ===

      REM Draw box with current brush
      DEF PROCbrush

      bx%=1280
      by%=1332

      REM draw pattern loop
      FOR lX%=0 TO 13
        FOR lY%=0 TO 27
          pS%=(bx%+lX%) MOD 4+((by%+lY%) MOD 4)*4
          IF pat{(pat%)}.c(pS%) THEN
            GCOL pcol%
          ELSE
            GCOL col%
          ENDIF
          RECTANGLE FILL bx%+lX%*8+10,by%+lY%*4+12,8,4
        ENDIF
      NEXT
      NEXT

      ENDPROC

      REM Palette
      DEF PROCpalette

      FOR i%=0 TO 7
      FOR p%=0 TO 17
        FOR x%=0 TO 15
          IF pat{(p%)}.c(x%)=1 GCOL i% ELSE GCOL col%
          RECTANGLE FILL 16+p%*64+(x% MOD 4)*8,i%*48+(x% DIV 4)*4+1080,8,4
          RECTANGLE FILL 16+p%*64+(x% MOD 4)*8,i%*48+(x% DIV 4)*4+1096,8,4
          RECTANGLE FILL 48+p%*64+(x% MOD 4)*8,i%*48+(x% DIV 4)*4+1080,8,4
          RECTANGLE FILL 48+p%*64+(x% MOD 4)*8,i%*48+(x% DIV 4)*4+1096,8,4
        NEXT
      NEXT
      NEXT

      ENDPROC

      REM draw text at x,y
      DEF PROCdt(x%,y%,c%,s$,l%)

      IF l% THEN
      GCOL 0
      RECTANGLE FILL x%,y%-28,16*l%,32
      ENDIF

      MOVE x%,y%
      GCOL c%
      PRINT s$

      ENDPROC


      REM Draw button
      DEF PROCbutton(x%,y%,s$)

      tx%=64-LEN(s$)*8

      PROCbox(x%,y%,128,42)

      MOVE x%+tx%,y%+34
      GCOL 3
      PRINT s$

      ENDPROC

      REM Draw button box
      DEF PROCbox(x%,y%,w%,h%)

      GCOL 15
      MOVE x%,y%
      DRAW x%+w%,y%
      DRAW x%+w%,y%+h%
      MOVE x%+w%-2,y%+h%-2
      DRAW x%+w%-2,y%+2
      DRAW x%+2,y%+2

      GCOL 7
      DRAW x%+2,y%+h%-2
      DRAW x%+w%-2,y%+h%-2
      MOVE x%+w%,y%+h%
      DRAW x%,y%+h%
      DRAW x%,y%

      ENDPROC

      REM Show stats
      DEF PROCshowstats

      px%=(mx% DIV 8)-1
      py%=(my% DIV 4)-2

      PROCdt(1360,1024,2,STR$(mx%),4)
      PROCdt(1360,992,2,STR$(my%),4)
      PROCdt(1360,960,2,STR$(px%),4)
      PROCdt(1360,928,2,STR$(py%),4)
      PROCdt(1360,896,2,STR$(mb%),2)
      PROCdt(1360,864,2,STR$(col%),2)
      PROCdt(1360,832,2,STR$(pcol%),2)
      PROCdt(1360,800,2,STR$(pat%),2)
      PROCdt(1360,768,2,STR$(dW%),4)

      ENDPROC

      DEF PROCinitPatterns

      REM Pattern 0
      pat{(0)}.c(0)=0 : pat{(0)}.c(1)=0 : pat{(0)}.c(2)=0 : pat{(0)}.c(3)=0
      pat{(0)}.c(4)=0 : pat{(0)}.c(5)=0 : pat{(0)}.c(6)=0 : pat{(0)}.c(7)=0
      pat{(0)}.c(8)=0 : pat{(0)}.c(9)=0 : pat{(0)}.c(10)=0 : pat{(0)}.c(11)=0
      pat{(0)}.c(12)=0 : pat{(0)}.c(13)=0 : pat{(0)}.c(14)=0 : pat{(0)}.c(15)=0

      REM Pattern 1
      pat{(1)}.c(0)=1 : pat{(1)}.c(1)=0 : pat{(1)}.c(2)=0 : pat{(1)}.c(3)=0
      pat{(1)}.c(4)=0 : pat{(1)}.c(5)=0 : pat{(1)}.c(6)=0 : pat{(1)}.c(7)=0
      pat{(1)}.c(8)=0 : pat{(1)}.c(9)=0 : pat{(1)}.c(10)=0 : pat{(1)}.c(11)=0
      pat{(1)}.c(12)=0 : pat{(1)}.c(13)=0 : pat{(1)}.c(14)=0 : pat{(1)}.c(15)=0

      REM Pattern 2
      pat{(2)}.c(0)=1 : pat{(2)}.c(1)=0 : pat{(2)}.c(2)=0 : pat{(2)}.c(3)=0
      pat{(2)}.c(4)=0 : pat{(2)}.c(5)=0 : pat{(2)}.c(6)=0 : pat{(2)}.c(7)=0
      pat{(2)}.c(8)=0 : pat{(2)}.c(9)=0 : pat{(2)}.c(10)=1 : pat{(2)}.c(11)=0
      pat{(2)}.c(12)=0 : pat{(2)}.c(13)=0 : pat{(2)}.c(14)=0 : pat{(2)}.c(15)=0

      REM Pattern 3
      pat{(3)}.c(0)=1 : pat{(3)}.c(1)=0 : pat{(3)}.c(2)=1 : pat{(3)}.c(3)=0
      pat{(3)}.c(4)=0 : pat{(3)}.c(5)=0 : pat{(3)}.c(6)=0 : pat{(3)}.c(7)=0
      pat{(3)}.c(8)=0 : pat{(3)}.c(9)=0 : pat{(3)}.c(10)=1 : pat{(3)}.c(11)=0
      pat{(3)}.c(12)=0 : pat{(3)}.c(13)=0 : pat{(3)}.c(14)=0 : pat{(3)}.c(15)=0

      REM Pattern 4
      pat{(4)}.c(0)=1 : pat{(4)}.c(1)=0 : pat{(4)}.c(2)=1 : pat{(4)}.c(3)=0
      pat{(4)}.c(4)=0 : pat{(4)}.c(5)=0 : pat{(4)}.c(6)=0 : pat{(4)}.c(7)=0
      pat{(4)}.c(8)=1 : pat{(4)}.c(9)=0 : pat{(4)}.c(10)=1 : pat{(4)}.c(11)=0
      pat{(4)}.c(12)=0 : pat{(4)}.c(13)=0 : pat{(4)}.c(14)=0 : pat{(4)}.c(15)=0

      REM Pattern 5
      pat{(5)}.c(0)=1 : pat{(5)}.c(1)=0 : pat{(5)}.c(2)=1 : pat{(5)}.c(3)=0
      pat{(5)}.c(4)=0 : pat{(5)}.c(5)=1 : pat{(5)}.c(6)=0 : pat{(5)}.c(7)=0
      pat{(5)}.c(8)=1 : pat{(5)}.c(9)=0 : pat{(5)}.c(10)=1 : pat{(5)}.c(11)=0
      pat{(5)}.c(12)=0 : pat{(5)}.c(13)=0 : pat{(5)}.c(14)=0 : pat{(5)}.c(15)=0

      REM Pattern 6
      pat{(6)}.c(0)=1 : pat{(6)}.c(1)=0 : pat{(6)}.c(2)=1 : pat{(6)}.c(3)=0
      pat{(6)}.c(4)=0 : pat{(6)}.c(5)=1 : pat{(6)}.c(6)=0 : pat{(6)}.c(7)=0
      pat{(6)}.c(8)=1 : pat{(6)}.c(9)=0 : pat{(6)}.c(10)=1 : pat{(6)}.c(11)=0
      pat{(6)}.c(12)=0 : pat{(6)}.c(13)=0 : pat{(6)}.c(14)=0 : pat{(6)}.c(15)=1

      REM Pattern 7
      pat{(7)}.c(0)=1 : pat{(7)}.c(1)=0 : pat{(7)}.c(2)=1 : pat{(7)}.c(3)=0
      pat{(7)}.c(4)=0 : pat{(7)}.c(5)=1 : pat{(7)}.c(6)=0 : pat{(7)}.c(7)=1
      pat{(7)}.c(8)=1 : pat{(7)}.c(9)=0 : pat{(7)}.c(10)=1 : pat{(7)}.c(11)=0
      pat{(7)}.c(12)=0 : pat{(7)}.c(13)=0 : pat{(7)}.c(14)=0 : pat{(7)}.c(15)=1

      REM Pattern 8
      pat{(8)}.c(0)=1 : pat{(8)}.c(1)=0 : pat{(8)}.c(2)=1 : pat{(8)}.c(3)=0
      pat{(8)}.c(4)=0 : pat{(8)}.c(5)=1 : pat{(8)}.c(6)=0 : pat{(8)}.c(7)=1
      pat{(8)}.c(8)=1 : pat{(8)}.c(9)=0 : pat{(8)}.c(10)=1 : pat{(8)}.c(11)=0
      pat{(8)}.c(12)=0 : pat{(8)}.c(13)=1 : pat{(8)}.c(14)=0 : pat{(8)}.c(15)=1

      REM Pattern 9
      pat{(9)}.c(0)=0 : pat{(9)}.c(1)=1 : pat{(9)}.c(2)=0 : pat{(9)}.c(3)=1
      pat{(9)}.c(4)=1 : pat{(9)}.c(5)=0 : pat{(9)}.c(6)=1 : pat{(9)}.c(7)=0
      pat{(9)}.c(8)=0 : pat{(9)}.c(9)=1 : pat{(9)}.c(10)=0 : pat{(9)}.c(11)=1
      pat{(9)}.c(12)=1 : pat{(9)}.c(13)=0 : pat{(9)}.c(14)=1 : pat{(9)}.c(15)=0

      REM Pattern 10
      pat{(10)}.c(0)=0 : pat{(10)}.c(1)=1 : pat{(10)}.c(2)=0 : pat{(10)}.c(3)=1
      pat{(10)}.c(4)=1 : pat{(10)}.c(5)=0 : pat{(10)}.c(6)=1 : pat{(10)}.c(7)=0
      pat{(10)}.c(8)=0 : pat{(10)}.c(9)=1 : pat{(10)}.c(10)=0 : pat{(10)}.c(11)=1
      pat{(10)}.c(12)=1 : pat{(10)}.c(13)=1 : pat{(10)}.c(14)=1 : pat{(10)}.c(15)=0

      REM Pattern 1
      pat{(11)}.c(0)=0 : pat{(11)}.c(1)=1 : pat{(11)}.c(2)=0 : pat{(11)}.c(3)=1
      pat{(11)}.c(4)=1 : pat{(11)}.c(5)=0 : pat{(11)}.c(6)=1 : pat{(11)}.c(7)=1
      pat{(11)}.c(8)=0 : pat{(11)}.c(9)=1 : pat{(11)}.c(10)=0 : pat{(11)}.c(11)=1
      pat{(11)}.c(12)=1 : pat{(11)}.c(13)=1 : pat{(11)}.c(14)=1 : pat{(11)}.c(15)=0

      REM Pattern 12
      pat{(12)}.c(0)=0 : pat{(12)}.c(1)=1 : pat{(12)}.c(2)=0 : pat{(12)}.c(3)=1
      pat{(12)}.c(4)=1 : pat{(12)}.c(5)=0 : pat{(12)}.c(6)=1 : pat{(12)}.c(7)=1
      pat{(12)}.c(8)=0 : pat{(12)}.c(9)=1 : pat{(12)}.c(10)=0 : pat{(12)}.c(11)=1
      pat{(12)}.c(12)=1 : pat{(12)}.c(13)=1 : pat{(12)}.c(14)=1 : pat{(12)}.c(15)=1

      REM Pattern 13
      pat{(13)}.c(0)=0 : pat{(13)}.c(1)=1 : pat{(13)}.c(2)=0 : pat{(13)}.c(3)=1
      pat{(13)}.c(4)=1 : pat{(13)}.c(5)=1 : pat{(13)}.c(6)=1 : pat{(13)}.c(7)=1
      pat{(13)}.c(8)=0 : pat{(13)}.c(9)=1 : pat{(13)}.c(10)=0 : pat{(13)}.c(11)=1
      pat{(13)}.c(12)=1 : pat{(13)}.c(13)=1 : pat{(13)}.c(14)=1 : pat{(13)}.c(15)=1

      REM Pattern 14
      pat{(14)}.c(0)=0 : pat{(14)}.c(1)=1 : pat{(14)}.c(2)=0 : pat{(14)}.c(3)=1
      pat{(14)}.c(4)=1 : pat{(14)}.c(5)=1 : pat{(14)}.c(6)=1 : pat{(14)}.c(7)=1
      pat{(14)}.c(8)=1 : pat{(14)}.c(9)=1 : pat{(14)}.c(10)=0 : pat{(14)}.c(11)=1
      pat{(14)}.c(12)=1 : pat{(14)}.c(13)=1 : pat{(14)}.c(14)=1 : pat{(14)}.c(15)=1

      REM Pattern 15
      pat{(15)}.c(0)=0 : pat{(15)}.c(1)=1 : pat{(15)}.c(2)=1 : pat{(15)}.c(3)=1
      pat{(15)}.c(4)=1 : pat{(15)}.c(5)=1 : pat{(15)}.c(6)=1 : pat{(15)}.c(7)=1
      pat{(15)}.c(8)=1 : pat{(15)}.c(9)=1 : pat{(15)}.c(10)=0 : pat{(15)}.c(11)=1
      pat{(15)}.c(12)=1 : pat{(15)}.c(13)=1 : pat{(15)}.c(14)=1 : pat{(15)}.c(15)=1

      REM Pattern 16
      pat{(16)}.c(0)=0 : pat{(16)}.c(1)=1 : pat{(16)}.c(2)=1 : pat{(16)}.c(3)=1
      pat{(16)}.c(4)=1 : pat{(16)}.c(5)=1 : pat{(16)}.c(6)=1 : pat{(16)}.c(7)=1
      pat{(16)}.c(8)=1 : pat{(16)}.c(9)=1 : pat{(16)}.c(10)=1 : pat{(16)}.c(11)=1
      pat{(16)}.c(12)=1 : pat{(16)}.c(13)=1 : pat{(16)}.c(14)=1 : pat{(16)}.c(15)=1

      REM Pattern 17
      pat{(17)}.c(0)=1 : pat{(17)}.c(1)=1 : pat{(17)}.c(2)=1 : pat{(17)}.c(3)=1
      pat{(17)}.c(4)=1 : pat{(17)}.c(5)=1 : pat{(17)}.c(6)=1 : pat{(17)}.c(7)=1
      pat{(17)}.c(8)=1 : pat{(17)}.c(9)=1 : pat{(17)}.c(10)=1 : pat{(17)}.c(11)=1
      pat{(17)}.c(12)=1 : pat{(17)}.c(13)=1 : pat{(17)}.c(14)=1 : pat{(17)}.c(15)=1

      ENDPROC


User avatar
pixelblip
Posts: 487
Joined: Wed Feb 04, 2015 7:19 pm

Re: How do you save a screen

Postby pixelblip » Sun Jun 11, 2017 1:25 pm

Thank you so much Fourthstone. That is most useful! Things are coming together now aren't they. Well done for getting the save load screens in.

I think when I meant transparency ( which will also be very useful as you have done it ) I meant Opaqueness!. That is going to be much harder to implement. Sorry. Having said that Transparency is another thing that one needs so it hasn't been a waste of time!

In Deluxe paint Opaqueness was called Transparency....I think that's what I was thinking of.

You can get some really nice effects with Opaqueness. To program it in 8 colours is not so easy....simulating that.

Let's say you want to wash over a sky with a hint of blue but keep the overall colours of the sky already painted. It requires a great deal of thought on how to program that.....it's like you need varying patterns that tessellate but also contains dots of colour and dots of transparency....I think you know what I mean !

It could mean being able to paint quite subtley onto things like skies......sort of like a dilute watercolour effect....but as you only have 8 colours it will be interesting to see if it worked.

I will play around with the ART for now. It's great you have put those features in. The interface is clear and simple. I can get on with some pics :)
Have a good week - we'll talk in the week ok.
Last edited by pixelblip on Sun Jun 11, 2017 8:59 pm, edited 2 times in total.

User avatar
pixelblip
Posts: 487
Joined: Wed Feb 04, 2015 7:19 pm

Re: How do you save a screen

Postby pixelblip » Sun Jun 11, 2017 6:26 pm

Sea of Tranquility
Attachments
s.jpg

User avatar
pixelblip
Posts: 487
Joined: Wed Feb 04, 2015 7:19 pm

Re: How do you save a screen

Postby pixelblip » Sun Jun 11, 2017 8:28 pm

The transparency effect is really cool. Just been playing with it before bed.

User avatar
FourthStone
Posts: 400
Joined: Thu Nov 17, 2016 2:29 am
Location: Melbourne, Australia

Re: How do you save a screen

Postby FourthStone » Mon Jun 12, 2017 3:52 am

I hope you find a good use for transparency, I like playing around with it as well but I just can't draw anything decent :lol: There's some really interesting colour side effects that hopefully will be some use in your drawings.

Also try all the colours with black pixels as the black background patterns are the reverse to each of the other colours black background patterns... does that make sense at all?

Slightly updated version with a few bug fixes and adjustments... still no undo but working up to it although I have a suspicion that there might be memory constraints with the free version.

Code: Select all


      REM MODE 22 : 128x48 Chars : 1024x768 Real Pixels : 2048x1536 Logical Pixels : 16 Colours

      REM Chars are 16x32

      REM Drawing window: Mode 2 160x256 beeb pixels, 640x512 real pixels, 1280 x 1024 logical pixels

      MODE 22

      REM Switch off cursor and switch on print to graphics cursor
      VDU 23,1,0;0;0;0;
      VDU 5

      MOUSE ON 3

      REM Pattern AND undo array
      DIM pat{(17)c(15)}
      DIM undo{(8) bmphnd%,w,h}

      PROCinitPatterns

      REM Mouse coords
      LET mx%=0
      LET my%=0
      LET mb%=0

      REM Pattern and colour vars
      LET col%=1
      LET pat%=8
      LET pcol%=0
      LET pS%=0

      REM Pixel coords at mouse cursor
      LET px%=0
      LET py%=0

      REM drawing vars
      LET dX%=0
      LET dY%=0
      LET dW%=1500
      LET dT%=1
      LET dC%=0

      LET fExit=FALSE

      REM Colour definitions for drawing palette
      COLOUR 1,255,0,0
      COLOUR 2,0,255,0
      COLOUR 3,255,255,0
      COLOUR 4,0,0,255
      COLOUR 5,255,0,255
      COLOUR 6,0,255,255
      COLOUR 7,255,255,255

      REM Colour definitions for tools palette
      COLOUR 9,192,0,0
      COLOUR 10,0,192,0
      COLOUR 11,192,192,0
      COLOUR 12,0,0,192
      COLOUR 13,192,0,192
      COLOUR 14,0,192,192
      COLOUR 15,192,192,192

      REM Turn off screen refresh, must use *REFRESH to update screen
      *REFRESH OFF

      GCOL 7

      REM Draw region
      RECTANGLE 0,0,1296,1044
      RECTANGLE 2,2,1292,1040

      REM palette
      RECTANGLE 0,1068,1184,396

      REM Col select
      RECTANGLE 1200,1068,64,396
      RECTANGLE 1208,col%*48+1074,46,46

      REM Current drawing pattern
      RECTANGLE 1280,1336,128,128

      REM Brush size
      RECTANGLE 1280,1068,128,204


      REM Tools
      RECTANGLE 1424,1068,616,396
      PROCbutton(1440,1412,"LOAD")
      PROCbutton(1440,1356,"SAVE")
      PROCbutton(1440,1300,"CLS")
      PROCbutton(1440,1244,"UNDO")
      PROCbutton(1896,1412,"EXIT")
      PROCbox(1440,1084,48,48)

      REM Transparency toggle
      GCOL 2
      RECTANGLE FILL 1448,1090,34,34

      FOR I%=0 TO 7
        GCOL I%
        RECTANGLE FILL 1312,200+I%*56,56,56
        GCOL I%+8
        RECTANGLE FILL 1368,200+I%*56,56,56
      NEXT

      REM Labels
      PROCdt(1200,1496,3,"Col",0)
      PROCdt(1284,1496,3,"Pat",0)
      PROCdt(1284,1304,3,"Size",0)
      PROCdt(1428,1496,3,"Tools",0)
      PROCdt(1512,1136,3,"Brush Transparancy",0)
      PROCdt(1512,1104,3,"(only works with black pixels)",0)

      REM Stats
      PROCdt(1312,1024,2,"mX:",0)
      PROCdt(1312,992,2,"mY:",0)
      PROCdt(1312,960,2,"pX:",0)
      PROCdt(1312,928,2,"pY:",0)
      PROCdt(1312,896,2,"mB:",0)
      PROCdt(1312,864,2,"sC:",0)
      PROCdt(1312,832,2,"pC:",0)
      PROCdt(1312,800,2,"pS:",0)
      PROCdt(1312,768,2,"dW:",0)


      REM Colour select and title
      FOR I%=0 TO 7
        GCOL I%
        RECTANGLE FILL 1216,I%*48+1080,32,32
        MOVE 440+I%*4,1512+I%*2
        GCOL (I% DIV 7)*2+1
        PRINT "ART For Windows!!!"
      NEXT

      REM Size guide
      GCOL 6
      CIRCLE FILL 1344,1112,30
      CIRCLE FILL 1344,1168,20
      CIRCLE FILL 1344,1212,12
      CIRCLE FILL 1344,1240,8


      PROCpalette
      PROCbrush

      REM === Main loop ===

      REPEAT
 
        REM Make sure ART window has focus
        SYS "GetForegroundWindow" TO hw%
        IF hw% = @hwnd% THEN
   
          REM check for Z and X to change draw size
          IF INKEY-98 AND dW%>0 dW%=dW%-1
          IF INKEY-67 AND dW%<3000 dW%=dW%+1
   
          REM read mouse status
          MOUSE mx%, my%, mb%
   
          REM normalise mouse coords to pixel grid
          mx%=(mx% DIV 8)*8
          my%=(my% DIV 4)*4
   
          REM Update stats
          PROCshowstats
   
          REM left mouse button clicked
          IF mb%=4 THEN
     
            REM Check for drawing click region
            IF mx%>0 AND mx%<1288 AND my%>4 AND my%<1032 THEN
       
              REM get pixel coords
              px%=(mx% DIV 8)-(dW% DIV 400)-1
              py%=(my% DIV 4)-(dW% DIV 200)-2
       
              REM draw pattern loop
              FOR lX%=0 TO (dW% DIV 200)
                FOR lY%=0 TO (dW% DIV 100)
                  REM range check, set pattern colour and plot
                  IF (px%+lX%)>-1 AND (px%+lX%)<160 AND (py%+lY%)>-1 AND (py%+lY%)<256 THEN
                    pS%=(px%+lX%) MOD 4+((py%+lY%) MOD 4)*4
                    IF pat{(pat%)}.c(pS%) THEN
                      dC%=pcol%
                    ELSE
                      dC%=col%
                    ENDIF
             
                    REM Check for transparency
                    IF dC%-dT%>-1 THEN
                      GCOL dC%
                      RECTANGLE FILL (px%+lX%)*8+8,(py%+lY%)*4+8,8,4
                    ENDIF
                  ENDIF
                NEXT
              NEXT
            ENDIF
     
            REM Check for colour select region
            IF mx%>1200 AND mx%<1264 AND my%>1076 AND my%<1452 THEN
              I%=(my%-1072) DIV 48
              IF col%<>I% AND I%>-1 AND I%<8 THEN
                GCOL 0
                RECTANGLE 1208,col%*48+1074,46,46
         
                GCOL 7
                RECTANGLE 1208,I%*48+1074,46,46
                col%=I%
                PROCpalette
                PROCbrush
              ENDIF
            ENDIF
     
            REM Check for palette select region
            IF mx%>8 AND mx%<1168 AND my%>1076 AND my%<1452 THEN
              I%=((my%-1072) DIV 48) MOD 8
              J%=((mx%-16) DIV 64) MOD 18
       
              IF pcol%<>I% OR pat%<>J% THEN
                GCOL 0
                RECTANGLE FILL 16+pat%*64,1072+pcol%*48,64,4
         
                pcol%=I%
                pat%=J%
                PROCbrush
              ENDIF
            ENDIF
     
            REM Check brush size change region
            IF mx%>1280 AND mx%<1408 AND my%>1072 AND my%<1272 THEN
              I%=3200-((my%-1076) DIV 6)*100
              J%=(dW% DIV 10)*10
              IF I%<>J% THEN
                dW%=I%
              ENDIF
            ENDIF
     
            REM Tools region
            IF mx%>1432 AND mx%<2024 AND my%>1080 AND my%<1456 THEN
              REM Clear mouse botton
              REPEAT
                MOUSE mx%, my%, mb%
                PROCshowstats
                *REFRESH
              UNTIL mb%=0
       
              REM Load, Save, CLS, Undo
              IF mx%>1432 AND mx%<1568 AND my%>1240 AND my%<1456 THEN
                tool%=(my%-1240) DIV 56
         
                PROCdt(1464,1024,3,STR$(tool%),2)
         
                CASE tool% OF
                  WHEN 0 :
                  WHEN 1 : GCOL 0: RECTANGLE FILL 4,4,1288,1036
                  OTHERWISE
                ENDCASE
         
         
              ENDIF
       
              REM Transparency toggle
              IF mx%>1432 AND mx%<1488 AND my%>1080 AND my%<11132 THEN
                dT%=(dT%+1) MOD 2
         
                GCOL dT%*2
                RECTANGLE FILL 1448,1090,34,34
         
              ENDIF
       
       
              REM Exit button
              IF mx%>1888 AND mx%<2024 AND my%>1408 AND my%<1456 THEN
                fExit=TRUE
              ENDIF
            ENDIF
     
            REM === END OF LEFT MOUSE BUTTON SECTION ===
          ENDIF
   
   
          REM Refresh the screen (no flicker)
          *REFRESH
        ENDIF
 
      UNTIL fExit

      *REFRESH ON

      QUIT

      REM === END OF MAIN PROGRAM ===

      REM === Procedures ===

      REM Draw box with current brush
      DEF PROCbrush

      bx%=1280
      by%=1332

      REM draw pattern loop
      FOR lX%=0 TO 13
        FOR lY%=0 TO 27
          pS%=(bx%+lX%) MOD 4+((by%+lY%) MOD 4)*4
          IF pat{(pat%)}.c(pS%) THEN
            GCOL pcol%
          ELSE
            GCOL col%
          ENDIF
          RECTANGLE FILL bx%+lX%*8+10,by%+lY%*4+12,8,4
        ENDIF
      NEXT
      NEXT

      REM highlight selected pattern
      GCOL 7
      RECTANGLE FILL 16+pat%*64,1072+pcol%*48,64,4

      ENDPROC

      REM Palette
      DEF PROCpalette

      FOR i%=0 TO 7
      FOR p%=0 TO 17
        FOR x%=0 TO 15
          IF pat{(p%)}.c(x%)=1 GCOL i% ELSE GCOL col%
          RECTANGLE FILL 16+p%*64+(x% MOD 4)*8,i%*48+(x% DIV 4)*4+1080,8,4
          RECTANGLE FILL 16+p%*64+(x% MOD 4)*8,i%*48+(x% DIV 4)*4+1096,8,4
          RECTANGLE FILL 48+p%*64+(x% MOD 4)*8,i%*48+(x% DIV 4)*4+1080,8,4
          RECTANGLE FILL 48+p%*64+(x% MOD 4)*8,i%*48+(x% DIV 4)*4+1096,8,4
        NEXT
      NEXT
      NEXT

      ENDPROC

      REM draw text at x,y
      DEF PROCdt(x%,y%,c%,s$,l%)

      IF l% THEN
      GCOL 0
      RECTANGLE FILL x%,y%-28,16*l%,32
      ENDIF

      MOVE x%,y%
      GCOL c%
      PRINT s$

      ENDPROC


      REM Draw button
      DEF PROCbutton(x%,y%,s$)

      tx%=64-LEN(s$)*8

      PROCbox(x%,y%,128,42)

      MOVE x%+tx%,y%+34
      GCOL 3
      PRINT s$

      ENDPROC

      REM Draw button box
      DEF PROCbox(x%,y%,w%,h%)

      GCOL 15
      MOVE x%,y%
      DRAW x%+w%,y%
      DRAW x%+w%,y%+h%
      MOVE x%+w%-2,y%+h%-2
      DRAW x%+w%-2,y%+2
      DRAW x%+2,y%+2

      GCOL 7
      DRAW x%+2,y%+h%-2
      DRAW x%+w%-2,y%+h%-2
      MOVE x%+w%,y%+h%
      DRAW x%,y%+h%
      DRAW x%,y%

      ENDPROC

      REM Show stats
      DEF PROCshowstats

      px%=(mx% DIV 8)-1
      py%=(my% DIV 4)-2

      PROCdt(1360,1024,2,STR$(mx%),4)
      PROCdt(1360,992,2,STR$(my%),4)
      PROCdt(1360,960,2,STR$(px%),4)
      PROCdt(1360,928,2,STR$(py%),4)
      PROCdt(1360,896,2,STR$(mb%),2)
      PROCdt(1360,864,2,STR$(col%),2)
      PROCdt(1360,832,2,STR$(pcol%),2)
      PROCdt(1360,800,2,STR$(pat%),2)
      PROCdt(1360,768,2,STR$(dW%),4)

      ENDPROC

      DEF PROCinitPatterns

      REM Pattern 0
      pat{(0)}.c(0)=0 : pat{(0)}.c(1)=0 : pat{(0)}.c(2)=0 : pat{(0)}.c(3)=0
      pat{(0)}.c(4)=0 : pat{(0)}.c(5)=0 : pat{(0)}.c(6)=0 : pat{(0)}.c(7)=0
      pat{(0)}.c(8)=0 : pat{(0)}.c(9)=0 : pat{(0)}.c(10)=0 : pat{(0)}.c(11)=0
      pat{(0)}.c(12)=0 : pat{(0)}.c(13)=0 : pat{(0)}.c(14)=0 : pat{(0)}.c(15)=0

      REM Pattern 1
      pat{(1)}.c(0)=1 : pat{(1)}.c(1)=0 : pat{(1)}.c(2)=0 : pat{(1)}.c(3)=0
      pat{(1)}.c(4)=0 : pat{(1)}.c(5)=0 : pat{(1)}.c(6)=0 : pat{(1)}.c(7)=0
      pat{(1)}.c(8)=0 : pat{(1)}.c(9)=0 : pat{(1)}.c(10)=0 : pat{(1)}.c(11)=0
      pat{(1)}.c(12)=0 : pat{(1)}.c(13)=0 : pat{(1)}.c(14)=0 : pat{(1)}.c(15)=0

      REM Pattern 2
      pat{(2)}.c(0)=1 : pat{(2)}.c(1)=0 : pat{(2)}.c(2)=0 : pat{(2)}.c(3)=0
      pat{(2)}.c(4)=0 : pat{(2)}.c(5)=0 : pat{(2)}.c(6)=0 : pat{(2)}.c(7)=0
      pat{(2)}.c(8)=0 : pat{(2)}.c(9)=0 : pat{(2)}.c(10)=1 : pat{(2)}.c(11)=0
      pat{(2)}.c(12)=0 : pat{(2)}.c(13)=0 : pat{(2)}.c(14)=0 : pat{(2)}.c(15)=0

      REM Pattern 3
      pat{(3)}.c(0)=1 : pat{(3)}.c(1)=0 : pat{(3)}.c(2)=1 : pat{(3)}.c(3)=0
      pat{(3)}.c(4)=0 : pat{(3)}.c(5)=0 : pat{(3)}.c(6)=0 : pat{(3)}.c(7)=0
      pat{(3)}.c(8)=0 : pat{(3)}.c(9)=0 : pat{(3)}.c(10)=1 : pat{(3)}.c(11)=0
      pat{(3)}.c(12)=0 : pat{(3)}.c(13)=0 : pat{(3)}.c(14)=0 : pat{(3)}.c(15)=0

      REM Pattern 4
      pat{(4)}.c(0)=1 : pat{(4)}.c(1)=0 : pat{(4)}.c(2)=1 : pat{(4)}.c(3)=0
      pat{(4)}.c(4)=0 : pat{(4)}.c(5)=0 : pat{(4)}.c(6)=0 : pat{(4)}.c(7)=0
      pat{(4)}.c(8)=1 : pat{(4)}.c(9)=0 : pat{(4)}.c(10)=1 : pat{(4)}.c(11)=0
      pat{(4)}.c(12)=0 : pat{(4)}.c(13)=0 : pat{(4)}.c(14)=0 : pat{(4)}.c(15)=0

      REM Pattern 5
      pat{(5)}.c(0)=1 : pat{(5)}.c(1)=0 : pat{(5)}.c(2)=1 : pat{(5)}.c(3)=0
      pat{(5)}.c(4)=0 : pat{(5)}.c(5)=1 : pat{(5)}.c(6)=0 : pat{(5)}.c(7)=0
      pat{(5)}.c(8)=1 : pat{(5)}.c(9)=0 : pat{(5)}.c(10)=1 : pat{(5)}.c(11)=0
      pat{(5)}.c(12)=0 : pat{(5)}.c(13)=0 : pat{(5)}.c(14)=0 : pat{(5)}.c(15)=0

      REM Pattern 6
      pat{(6)}.c(0)=1 : pat{(6)}.c(1)=0 : pat{(6)}.c(2)=1 : pat{(6)}.c(3)=0
      pat{(6)}.c(4)=0 : pat{(6)}.c(5)=1 : pat{(6)}.c(6)=0 : pat{(6)}.c(7)=0
      pat{(6)}.c(8)=1 : pat{(6)}.c(9)=0 : pat{(6)}.c(10)=1 : pat{(6)}.c(11)=0
      pat{(6)}.c(12)=0 : pat{(6)}.c(13)=0 : pat{(6)}.c(14)=0 : pat{(6)}.c(15)=1

      REM Pattern 7
      pat{(7)}.c(0)=1 : pat{(7)}.c(1)=0 : pat{(7)}.c(2)=1 : pat{(7)}.c(3)=0
      pat{(7)}.c(4)=0 : pat{(7)}.c(5)=1 : pat{(7)}.c(6)=0 : pat{(7)}.c(7)=1
      pat{(7)}.c(8)=1 : pat{(7)}.c(9)=0 : pat{(7)}.c(10)=1 : pat{(7)}.c(11)=0
      pat{(7)}.c(12)=0 : pat{(7)}.c(13)=0 : pat{(7)}.c(14)=0 : pat{(7)}.c(15)=1

      REM Pattern 8
      pat{(8)}.c(0)=1 : pat{(8)}.c(1)=0 : pat{(8)}.c(2)=1 : pat{(8)}.c(3)=0
      pat{(8)}.c(4)=0 : pat{(8)}.c(5)=1 : pat{(8)}.c(6)=0 : pat{(8)}.c(7)=1
      pat{(8)}.c(8)=1 : pat{(8)}.c(9)=0 : pat{(8)}.c(10)=1 : pat{(8)}.c(11)=0
      pat{(8)}.c(12)=0 : pat{(8)}.c(13)=1 : pat{(8)}.c(14)=0 : pat{(8)}.c(15)=1

      REM Pattern 9
      pat{(9)}.c(0)=0 : pat{(9)}.c(1)=1 : pat{(9)}.c(2)=0 : pat{(9)}.c(3)=1
      pat{(9)}.c(4)=1 : pat{(9)}.c(5)=0 : pat{(9)}.c(6)=1 : pat{(9)}.c(7)=0
      pat{(9)}.c(8)=0 : pat{(9)}.c(9)=1 : pat{(9)}.c(10)=0 : pat{(9)}.c(11)=1
      pat{(9)}.c(12)=1 : pat{(9)}.c(13)=0 : pat{(9)}.c(14)=1 : pat{(9)}.c(15)=0

      REM Pattern 10
      pat{(10)}.c(0)=0 : pat{(10)}.c(1)=1 : pat{(10)}.c(2)=0 : pat{(10)}.c(3)=1
      pat{(10)}.c(4)=1 : pat{(10)}.c(5)=0 : pat{(10)}.c(6)=1 : pat{(10)}.c(7)=0
      pat{(10)}.c(8)=0 : pat{(10)}.c(9)=1 : pat{(10)}.c(10)=0 : pat{(10)}.c(11)=1
      pat{(10)}.c(12)=1 : pat{(10)}.c(13)=1 : pat{(10)}.c(14)=1 : pat{(10)}.c(15)=0

      REM Pattern 1
      pat{(11)}.c(0)=0 : pat{(11)}.c(1)=1 : pat{(11)}.c(2)=0 : pat{(11)}.c(3)=1
      pat{(11)}.c(4)=1 : pat{(11)}.c(5)=0 : pat{(11)}.c(6)=1 : pat{(11)}.c(7)=1
      pat{(11)}.c(8)=0 : pat{(11)}.c(9)=1 : pat{(11)}.c(10)=0 : pat{(11)}.c(11)=1
      pat{(11)}.c(12)=1 : pat{(11)}.c(13)=1 : pat{(11)}.c(14)=1 : pat{(11)}.c(15)=0

      REM Pattern 12
      pat{(12)}.c(0)=0 : pat{(12)}.c(1)=1 : pat{(12)}.c(2)=0 : pat{(12)}.c(3)=1
      pat{(12)}.c(4)=1 : pat{(12)}.c(5)=0 : pat{(12)}.c(6)=1 : pat{(12)}.c(7)=1
      pat{(12)}.c(8)=0 : pat{(12)}.c(9)=1 : pat{(12)}.c(10)=0 : pat{(12)}.c(11)=1
      pat{(12)}.c(12)=1 : pat{(12)}.c(13)=1 : pat{(12)}.c(14)=1 : pat{(12)}.c(15)=1

      REM Pattern 13
      pat{(13)}.c(0)=0 : pat{(13)}.c(1)=1 : pat{(13)}.c(2)=0 : pat{(13)}.c(3)=1
      pat{(13)}.c(4)=1 : pat{(13)}.c(5)=1 : pat{(13)}.c(6)=1 : pat{(13)}.c(7)=1
      pat{(13)}.c(8)=0 : pat{(13)}.c(9)=1 : pat{(13)}.c(10)=0 : pat{(13)}.c(11)=1
      pat{(13)}.c(12)=1 : pat{(13)}.c(13)=1 : pat{(13)}.c(14)=1 : pat{(13)}.c(15)=1

      REM Pattern 14
      pat{(14)}.c(0)=0 : pat{(14)}.c(1)=1 : pat{(14)}.c(2)=0 : pat{(14)}.c(3)=1
      pat{(14)}.c(4)=1 : pat{(14)}.c(5)=1 : pat{(14)}.c(6)=1 : pat{(14)}.c(7)=1
      pat{(14)}.c(8)=1 : pat{(14)}.c(9)=1 : pat{(14)}.c(10)=0 : pat{(14)}.c(11)=1
      pat{(14)}.c(12)=1 : pat{(14)}.c(13)=1 : pat{(14)}.c(14)=1 : pat{(14)}.c(15)=1

      REM Pattern 15
      pat{(15)}.c(0)=0 : pat{(15)}.c(1)=1 : pat{(15)}.c(2)=1 : pat{(15)}.c(3)=1
      pat{(15)}.c(4)=1 : pat{(15)}.c(5)=1 : pat{(15)}.c(6)=1 : pat{(15)}.c(7)=1
      pat{(15)}.c(8)=1 : pat{(15)}.c(9)=1 : pat{(15)}.c(10)=0 : pat{(15)}.c(11)=1
      pat{(15)}.c(12)=1 : pat{(15)}.c(13)=1 : pat{(15)}.c(14)=1 : pat{(15)}.c(15)=1

      REM Pattern 16
      pat{(16)}.c(0)=0 : pat{(16)}.c(1)=1 : pat{(16)}.c(2)=1 : pat{(16)}.c(3)=1
      pat{(16)}.c(4)=1 : pat{(16)}.c(5)=1 : pat{(16)}.c(6)=1 : pat{(16)}.c(7)=1
      pat{(16)}.c(8)=1 : pat{(16)}.c(9)=1 : pat{(16)}.c(10)=1 : pat{(16)}.c(11)=1
      pat{(16)}.c(12)=1 : pat{(16)}.c(13)=1 : pat{(16)}.c(14)=1 : pat{(16)}.c(15)=1

      REM Pattern 17
      pat{(17)}.c(0)=1 : pat{(17)}.c(1)=1 : pat{(17)}.c(2)=1 : pat{(17)}.c(3)=1
      pat{(17)}.c(4)=1 : pat{(17)}.c(5)=1 : pat{(17)}.c(6)=1 : pat{(17)}.c(7)=1
      pat{(17)}.c(8)=1 : pat{(17)}.c(9)=1 : pat{(17)}.c(10)=1 : pat{(17)}.c(11)=1
      pat{(17)}.c(12)=1 : pat{(17)}.c(13)=1 : pat{(17)}.c(14)=1 : pat{(17)}.c(15)=1

      ENDPROC


User avatar
pixelblip
Posts: 487
Joined: Wed Feb 04, 2015 7:19 pm

Re: How do you save a screen

Postby pixelblip » Mon Jun 12, 2017 10:33 am

Cheers Fourth stone.
I can't wait until I can do a picture with your new software.

User avatar
pixelblip
Posts: 487
Joined: Wed Feb 04, 2015 7:19 pm

Re: How do you save a screen

Postby pixelblip » Mon Jun 12, 2017 11:46 am

Playing with the Transparency it is like Opaqueness.....it's very cool.......so I can do washes....
One thing to think about is what happens if you get orange (red and yellow pixels) and you try transparency.......do you think there might be a way of doing this......it's not easy.......sorry I am pushing it a bit asking! I don't know how that could be done. Anyway there is enough there to get on with eh! :D

User avatar
FourthStone
Posts: 400
Joined: Thu Nov 17, 2016 2:29 am
Location: Melbourne, Australia

Re: How do you save a screen

Postby FourthStone » Mon Jun 12, 2017 10:54 pm

pixelblip wrote:One thing to think about is what happens if you get orange (red and yellow pixels) and you try transparency.......do you think there might be a way of doing this......it's not easy.......sorry I am pushing it a bit asking! I don't know how that could be done. Anyway there is enough there to get on with eh! :D


Hey Pixel, not quite sure what you mean, do you want to mix in a third colour with the red/yellow?

Could you show me an example of before and after, say start with red/yellow pattern then wash another colour through like cyan or white? What does the new pattern look like?

I might have a play with additive opaqueness where using a third colour can be laid over the top of the drawing and it slowly increases saturation... is this what you mean?

Otherwise I might be confused about it, I can't think of a way to blend colours as the beeb only uses full intensity RGB values so it would have to be a pattern or dithering effect using solid colours.

User avatar
pixelblip
Posts: 487
Joined: Wed Feb 04, 2015 7:19 pm

Re: How do you save a screen

Postby pixelblip » Tue Jun 13, 2017 6:24 am

Yes Fourthstone you got it right....additive opaqueness......that's what I'm looking for......so it builds up the more you wash over it.

As for orange.......well is there a way of getting say additive orange .......I can't see how you could achieve that .....you might be able to.....within the confines of 8 colours......but no worries if not....... if im sure it could be achieved with the solid colours......I can just imagine lots of nice hues coming out .....

I tried art out again last night....it really seems incredible the colours you can get still working in mode 2 still........moving it onto windows has been an interesting development.

User avatar
Elminster
Posts: 1632
Joined: Wed Jun 20, 2012 8:09 am
Location: Essex, UK

Re: How do you save a screen

Postby Elminster » Tue Jun 13, 2017 8:32 am

As an asside I assume you are aware of the work being done by RobC on the VideoNula?

I think you wil end up with 16 colours from a pallette of 4096 on a real Beeb. Not as good as SDL version I expect but pretty good for a Beeb.

Be interesting to incorporate support for the board when it comes out in Beeb version of ART.

User avatar
FourthStone
Posts: 400
Joined: Thu Nov 17, 2016 2:29 am
Location: Melbourne, Australia

Re: How do you save a screen

Postby FourthStone » Tue Jun 13, 2017 8:36 pm

Yes have been following that thread closely, amazing stuff to be able to extend the vid capabilities of the beeb.

Will have to think how ART might accommodate that many colours, could be a disk side 2 version perhaps :lol:

User avatar
SimonSideburns
Posts: 257
Joined: Mon Aug 26, 2013 8:09 pm
Location: Purbrook, Hampshire
Contact:

Re: How do you save a screen

Postby SimonSideburns » Tue Jun 13, 2017 9:38 pm

I've just tried to have a play with your BBC Basic for Windows version of this excellent package.

Apart from my lousy drawing skills when using a mouse, the thing that I did notice that was a little annoying was this:

Holding down the mouse button and drawing, I went off the top of the drawing area and ended up selecting a different colour from the grid. When I moved the mouse down back into the drawing area, the colour that I had just ended up selecting was now being used.

If there were a way that once you hold down the mouse button and start drawing that going outside the drawing area didn't do anything that would be really great.

Thanks for your great work. Now, I only wish I could draw. Probably better with a touch screen of some sort and/or a graphics tablet.
I'm writing a game where you can change your character from a Wizard to a monkey to a cat.

Well, Imogen that!

User avatar
FourthStone
Posts: 400
Joined: Thu Nov 17, 2016 2:29 am
Location: Melbourne, Australia

Re: How do you save a screen

Postby FourthStone » Tue Jun 13, 2017 10:27 pm

SimonSideburns wrote:Holding down the mouse button and drawing, I went off the top of the drawing area and ended up selecting a different colour from the grid. When I moved the mouse down back into the drawing area, the colour that I had just ended up selecting was now being used.


I was wondering when someone might discover this glaring bug :lol:

Will have a look at this and make it more robust, the tools section already doesn't allow dragging a click to other area's so I'll do something similar.

Short disclaimer, this software is a proof of concept rather than a finished polished application, intended use is for testing drawing concepts and implementation based on mode 2 graphics restrictions... probably the best part is it's written in basic so anyone could make changes as they see fit :D

Will post another update shortly.


Return to “programming”

Who is online

Users browsing this forum: No registered users and 1 guest