Stipples View from QPC_Concepts.pdf Manual

A place to discuss general QL issues.
Post Reply
User avatar
ql_freak
Gold Card
Posts: 482
Joined: Sun Jan 18, 2015 1:29 am

Stipples View from QPC_Concepts.pdf Manual

Post by ql_freak »

Stipples is one of the things, which has been always very confusing to me. Fortunately in the QPC_concepts guide there is a nice programs which shows all stipple colours (0 to 255) for the QL color mode. Comment in QPC_Concepts guide:

This program requires QPC to be operating in at least an 800x600 pixel screen mode.

Code: Select all

100 REMark COLOUR_QL colours
110 WINDOW 750,550,25,25
120 COLOUR_QL
130 PAPER 0:INK 7
140 CLS
150 FOR x=0 TO 7
160 FOR y= 0 TO 31
170 PAPER 0:INK 7
180 AT y,15*x :PRINT_USING "#####",32*x+y; :PRINT " "; : STRIP 32*x+y:PRINT"  "
190 NEXT y
200 NEXT x
210 PAUSE
Attachments
qlStipples.png


http://peter-sulzer.bplaced.net
GERMAN! QL-Download page also available in English: GETLINE$() function, UNIX-like "ls" command, improved DIY-Toolkit function EDLINE$ - All with source. AND a good Python 3 Tutorial (German) for Win/UNIX :-)
User avatar
Andrew
QL Wafer Drive
Posts: 1032
Joined: Tue Jul 17, 2018 9:10 pm

Re: Stipples View from QPC_Concepts.pdf Manual

Post by Andrew »

ql_freak wrote: Sat Feb 01, 2025 12:05 am Stipples is one of the things, which has been always very confusing to me.
Yes, also for me. It took me some time to understand how to calculate the ink value that corresponds to a certain stipple (colour, contrast_colour, pattern)
This function calculates the value:

Code: Select all

9000 DEFine FuNction scolor(col%,con%,stp%)
9010   RETurn 64*stp%+8*(col%^^con%)+col%
9020 END DEFine scolor
Last edited by Andrew on Sat Feb 01, 2025 11:57 pm, edited 1 time in total.


Derek_Stewart
Font of All Knowledge
Posts: 4680
Joined: Mon Dec 20, 2010 11:40 am
Location: Sunny Runcorn, Cheshire, UK

Re: Stipples View from QPC_Concepts.pdf Manual

Post by Derek_Stewart »

does this work on all SMSQ/E systems?


Regards,

Derek
User avatar
Andrew
QL Wafer Drive
Posts: 1032
Joined: Tue Jul 17, 2018 9:10 pm

Re: Stipples View from QPC_Concepts.pdf Manual

Post by Andrew »

Derek_Stewart wrote: Sat Feb 01, 2025 10:04 pm does this work on all SMSQ/E systems?
My function? Yes, it works on all SMSQ/E systems

A quick & dirty test program:
(run it in High colour mode, 512x384 minimum resolution)

Code: Select all

100 WINDOW 512,384,0,0:CLS
110 DrawTable
120 n%=1:line%=3
130 FOR k%=0 TO 3
140   FOR i%=0 TO 7
150     AT line%,15:
160     FOR j%=0 TO 7
170       x=scolor(i%,j%,k%)
180       INK 7: PAPER 0: PRINT_USING "#####", x;: STRIP x:PRINT"   ";
190       n%=n%+1:
200       IF n%=9 THEN n%=1:PRINT:
210     END FOR j%
220     line%=line%+1
230   END FOR i%
240 END FOR k%
250 a$=INKEY$(-1)
255 REMark ----------------------------------
260 DEFine FuNction scolor(col%,con%,stp%)
270 RETurn 64*stp%+8*(col%^^con%)+col%
280 END DEFine scolor
285 REMark ----------------------------------
290 DEFine PROCedure DrawTable
300 LOCal i%, j%, line%
310   line%=1: INK 7:PAPER 0
320   AT line%-1,0:PRINT "        |     |";
330   AT line%,0:PRINT "Stipple | Col |";
340   AT line%+1,0:PRINT "---------------------------------------------------------------------------------";
350  FOR i%=3 TO 34: AT i%,8:PRINT"|     |";
360   FOR i%=0 TO 3
370    AT line%+1+8+i%*8,0:PRINT "______________|";
380    AT line%+5+i%*8,3:PRINT i%;
390  END FOR i%
400  AT 0,45:PRINT"Contrast";
410  FOR i%=0 TO 7: AT 1,21+i%*8:PRINT i%;
420  FOR i%=0 TO 3
430   FOR j%=0 TO 7
440    AT 3+i%*8+j%, 11: PRINT j%;
450   END FOR j%
460  END FOR i%
470 END DEFine DrawTable
Stipples.jpg


stevepoole
Aurora
Posts: 888
Joined: Mon Nov 24, 2014 2:03 pm

Re: Stipples View from QPC_Concepts.pdf Manual

Post by stevepoole »

Hi Folks,
Here is a demo of many more enhanced stipple 'hues', using four-colours instead of two...
Of course these would be much slower to use than machine code stipples !
stipples3_bas.zip
(1.3 KiB) Downloaded 26 times
By not using some of the four colours, you can get transparency :
Capture d’écran (10).png


User avatar
pjw
QL Wafer Drive
Posts: 1608
Joined: Fri Jul 11, 2014 8:44 am
Location: Norway
Contact:

Re: Stipples View from QPC_Concepts.pdf Manual

Post by pjw »

Andrew wrote: Sat Feb 01, 2025 8:45 pm
ql_freak wrote: Sat Feb 01, 2025 12:05 am Stipples is one of the things, which has been always very confusing to me.
Yes, also for me. It took me some time to understand how to calculate the ink value that corresponds to a certain stipple (colour, contrast_colour, pattern)
This function calculates the value:

Code: Select all

9000 DEFine FuNction scolor(col%,con%,stp%)
9010   RETurn 64*stp%+8*(col%^^con%)+col%
9020 END DEFine scolor
Nice routine! but what a convoluted way of implementing stipples! No wonder I never got to grips with QL graphics.

That goes for the whole original QL graphics system. Everything from non-square pixels to the weird colour definitions to the stupid flash bit in mode 8. I guess it was the hardware guys, beholden to the bean counters, geeking out, and the software dept. just having to make the best of it. Things only became "orthogonal" and rational with the arrival of GD2.


Per
I love long walks, especially when they are taken by people who annoy me.
- Fred Allen
User avatar
pjw
QL Wafer Drive
Posts: 1608
Joined: Fri Jul 11, 2014 8:44 am
Location: Norway
Contact:

Re: Stipples View from QPC_Concepts.pdf Manual

Post by pjw »

stevepoole wrote: Sun Feb 02, 2025 8:21 am Hi Folks,
Here is a demo of many more enhanced stipple 'hues', using four-colours instead of two...
Of course these would be much slower to use than machine code stipples !
stipples3_bas.zip

By not using some of the four colours, you can get transparency :
Capture d’écran (10).png
I dont understand what Im seeing here. I couldnt watch the whole movie..


Per
I love long walks, especially when they are taken by people who annoy me.
- Fred Allen
Post Reply