Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
LSTYLES.BAS
#1
Here's a little something I wrote and posted on FidoNet back in 1997. It's just an illustration of some of the styles of line that you can have when you use the LINE command. If nothing else grab one or more of the included constants at the top of the code. When run you will get a small window that shows the linestyles (maybe too small for anything larger than full HD).


Code: (Select All)
'===========================================================================
' Subject: DIFFERENT LINE STYLES              Date: 12-22-97 (12:06)
'  Author: TarotRedhand                      Code: QB
'===========================================================================
'Just for a change I am posting a small program that illustrates what
'is probably an underused parameter of a well known command, LINE.  If
'you check out either the manual or the help system, you will see that
'the final (optional) parameter that can be passed to the LINE
'statement is one called linestyle.  In order to show what this
'parameter can produce when properly used here are 13 (12a? <g>)
'constants, for you to use, that are part of the following small
'program.

CONST DenseDotted% = &HAAAA            '| "- - - - - - - - "
CONST MediumDotted% = &H8888          '| "-  -  -  -  "
CONST SparseDotted% = &H8080          '| "-      -      "
CONST OneDot% = &H80                  '| "        -      "
CONST LongDash% = &HFFFC              '| "--------------  "
CONST MediumDash% = &HFCFC            '| "------  ------  "
CONST ShortDash% = &HDDDD              '| "--- --- --- --- "
CONST WideGapped% = &HF0F0            '| "----    ----    "
CONST SparseDash% = &HCCCC            '| "--  --  --  --  "
CONST LongShort% = &HFDBF              '| "------ -- ------"
CONST DashDot% = &HFAFA                '| "----- - ----- - "
CONST DotDashDot% = &H9FE4            '| "-  --------  -  "
CONST SixThreeOne% = &HFCE4            '| "------  ---  -  "

SCREEN 1
COLOR 8, 1
MyY% = 7
Gap% = 14
MyColour% = 3
X1% = 15
X2% = 302
LINE (X1%, MyY%)-(X2%, MyY%), MyColour%
MyY% = MyY% + Gap%
LINE (X1%, MyY%)-(X2%, MyY%), MyColour%, , DenseDotted%
MyY% = MyY% + Gap%
LINE (X1%, MyY%)-(X2%, MyY%), MyColour%, , MediumDotted%
MyY% = MyY% + Gap%
LINE (X1%, MyY%)-(X2%, MyY%), MyColour%, , SparseDotted%
MyY% = MyY% + Gap%
LINE (X1%, MyY%)-(X2%, MyY%), MyColour%, , OneDot%
MyY% = MyY% + Gap%
LINE (X1%, MyY%)-(X2%, MyY%), MyColour%, , LongDash%
MyY% = MyY% + Gap%
LINE (X1%, MyY%)-(X2%, MyY%), MyColour%, , MediumDash%
MyY% = MyY% + Gap%
LINE (X1%, MyY%)-(X2%, MyY%), MyColour%, , ShortDash%
MyY% = MyY% + Gap%
LINE (X1%, MyY%)-(X2%, MyY%), MyColour%, , WideGapped%
MyY% = MyY% + Gap%
LINE (X1%, MyY%)-(X2%, MyY%), MyColour%, , SparseDash%
MyY% = MyY% + Gap%
LINE (X1%, MyY%)-(X2%, MyY%), MyColour%, , LongShort%
MyY% = MyY% + Gap%
LINE (X1%, MyY%)-(X2%, MyY%), MyColour%, , DashDot%
MyY% = MyY% + Gap%
LINE (X1%, MyY%)-(X2%, MyY%), MyColour%, , DotDashDot%
MyY% = MyY% + Gap%
LINE (X1%, MyY%)-(X2%, MyY%), MyColour%, , SixThreeOne%
Q$ = INPUT$(1)
END

Enjoy.

TR
Reply
#2
(04-28-2022, 12:09 AM)TarotRedhand Wrote: Here's a little something I wrote and posted on FidoNet back in 1997. It's just an illustration of some of the styles of line that you can have when you use the LINE command. If nothing else grab one or more of the included constants at the top of the code. When run you will get a small window that shows the linestyles (maybe too small for anything larger than full HD).


Code: (Select All)
'===========================================================================
' Subject: DIFFERENT LINE STYLES              Date: 12-22-97 (12:06)
'  Author: TarotRedhand                      Code: QB
'===========================================================================
'Just for a change I am posting a small program that illustrates what
'is probably an underused parameter of a well known command, LINE.  If
'you check out either the manual or the help system, you will see that
'the final (optional) parameter that can be passed to the LINE
'statement is one called linestyle.  In order to show what this
'parameter can produce when properly used here are 13 (12a? <g>)
'constants, for you to use, that are part of the following small
'program.

CONST DenseDotted% = &HAAAA            '| "- - - - - - - - "
CONST MediumDotted% = &H8888          '| "-  -  -  -  "
CONST SparseDotted% = &H8080          '| "-      -      "
CONST OneDot% = &H80                  '| "        -      "
CONST LongDash% = &HFFFC              '| "--------------  "
CONST MediumDash% = &HFCFC            '| "------  ------  "
CONST ShortDash% = &HDDDD              '| "--- --- --- --- "
CONST WideGapped% = &HF0F0            '| "----    ----    "
CONST SparseDash% = &HCCCC            '| "--  --  --  --  "
CONST LongShort% = &HFDBF              '| "------ -- ------"
CONST DashDot% = &HFAFA                '| "----- - ----- - "
CONST DotDashDot% = &H9FE4            '| "-  --------  -  "
CONST SixThreeOne% = &HFCE4            '| "------  ---  -  "

SCREEN 1
COLOR 8, 1
MyY% = 7
Gap% = 14
MyColour% = 3
X1% = 15
X2% = 302
LINE (X1%, MyY%)-(X2%, MyY%), MyColour%
MyY% = MyY% + Gap%
LINE (X1%, MyY%)-(X2%, MyY%), MyColour%, , DenseDotted%
MyY% = MyY% + Gap%
LINE (X1%, MyY%)-(X2%, MyY%), MyColour%, , MediumDotted%
MyY% = MyY% + Gap%
LINE (X1%, MyY%)-(X2%, MyY%), MyColour%, , SparseDotted%
MyY% = MyY% + Gap%
LINE (X1%, MyY%)-(X2%, MyY%), MyColour%, , OneDot%
MyY% = MyY% + Gap%
LINE (X1%, MyY%)-(X2%, MyY%), MyColour%, , LongDash%
MyY% = MyY% + Gap%
LINE (X1%, MyY%)-(X2%, MyY%), MyColour%, , MediumDash%
MyY% = MyY% + Gap%
LINE (X1%, MyY%)-(X2%, MyY%), MyColour%, , ShortDash%
MyY% = MyY% + Gap%
LINE (X1%, MyY%)-(X2%, MyY%), MyColour%, , WideGapped%
MyY% = MyY% + Gap%
LINE (X1%, MyY%)-(X2%, MyY%), MyColour%, , SparseDash%
MyY% = MyY% + Gap%
LINE (X1%, MyY%)-(X2%, MyY%), MyColour%, , LongShort%
MyY% = MyY% + Gap%
LINE (X1%, MyY%)-(X2%, MyY%), MyColour%, , DashDot%
MyY% = MyY% + Gap%
LINE (X1%, MyY%)-(X2%, MyY%), MyColour%, , DotDashDot%
MyY% = MyY% + Gap%
LINE (X1%, MyY%)-(X2%, MyY%), MyColour%, , SixThreeOne%
Q$ = INPUT$(1)
END

Enjoy.

TR

Wow. thats cool. I totally forgot that LINE had that option.
Thats not something you see used everyday.
Reply
#3
This brings back memories - the reason I got online was to read the fidonet QB echo (via BBS first), and to download the ABC code packets which contained snippets like these.

Thanks for the code and reminder of the great LINE parameters that are great and so underused.

- Dav

Find my programs here in Dav's QB64 Corner
Reply
#4
Thanks guys. @Dav, did you post any code to FidoNet?

TR
Reply
#5
I don’t think so, I mostly just lurked and learned back then.

- Dav

Find my programs here in Dav's QB64 Corner
Reply
#6
Thanks for posting this. I was playing with line styles and had an accidental discovery due to a poorly thought out algorithm that produced more interesting borders than I though it would:  
Boxing accident (qb64phoenix.com)
Reply




Users browsing this thread: 1 Guest(s)