Page 1 of 1
Stipples View from QPC_Concepts.pdf Manual
Posted: Sat Feb 01, 2025 12:05 am
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
Re: Stipples View from QPC_Concepts.pdf Manual
Posted: Sat Feb 01, 2025 8:45 pm
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
Re: Stipples View from QPC_Concepts.pdf Manual
Posted: Sat Feb 01, 2025 10:04 pm
by Derek_Stewart
does this work on all SMSQ/E systems?
Re: Stipples View from QPC_Concepts.pdf Manual
Posted: Sat Feb 01, 2025 11:48 pm
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

Re: Stipples View from QPC_Concepts.pdf Manual
Posted: Sun Feb 02, 2025 8:21 am
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 !
By not using some of the four colours, you can get transparency :
Re: Stipples View from QPC_Concepts.pdf Manual
Posted: Sun Feb 02, 2025 12:03 pm
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.
Re: Stipples View from QPC_Concepts.pdf Manual
Posted: Sun Feb 02, 2025 12:05 pm
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..