Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
LSTYLES.BAS
#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


Messages In This Thread
LSTYLES.BAS - by TarotRedhand - 04-28-2022, 12:09 AM
RE: LSTYLES.BAS - by Keybone - 05-06-2022, 02:24 PM
RE: LSTYLES.BAS - by Dav - 05-06-2022, 03:43 PM
RE: LSTYLES.BAS - by TarotRedhand - 05-08-2022, 06:26 PM
RE: LSTYLES.BAS - by Dav - 05-08-2022, 06:53 PM
RE: LSTYLES.BAS - by James D Jarvis - 05-14-2022, 03:06 PM



Users browsing this thread: 1 Guest(s)