Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.sys.acorn.programmer > #5404

Re: Printing dotted lines

From Harriet Bazley <harriet@bazleyfamily.co.uk>
Newsgroups comp.sys.acorn.programmer
Subject Re: Printing dotted lines
Message-ID <cc9769c756.harriet@blueyonder.co.uk> (permalink)
References <ece4cdc456.harriet@blueyonder.co.uk> <cb223dc0-3aed-4fed-8d15-c336506abd35@googlegroups.com> <3aba32c556.harriet@blueyonder.co.uk> <mpro.p3ne3x043fndh01x2.news@stevefryatt.org.uk>
Organization virginmedia.com
Date 2018-02-09 01:15 +0000

Show all headers | View raw


On 4 Feb 2018 as I do recall,
          Steve Fryatt  wrote:

> On 4 Feb, Harriet Bazley wrote in message
>     <3aba32c556.harriet@blueyonder.co.uk>:
>
> > On 4 Feb 2018 as I do recall,
> >           news@sprow.co.uk wrote:
> >
> > > On Saturday, 3 February 2018 23:52:08 UTC, Harriet Bazley  wrote:
> > > > Trying to work out why Powerbase prints dotted lines to screen but not
> > > > to printer - I've managed the following attempted test case program.
> > > >
> > > > Are the PLOT codes in the range 16-23 not suitable for use in hard
> > > > copy?
> >
> > [snip]
> >
> > > Or, in short, no - solid lines only at the moment,
> >
> > Thanks - is there a recommended way of printing dotted lines? (Surely
> > commercial programs must do this sometimes?)
>
> The Draw module (Draw_Stroke, etc).

Substituting the following code

DEF PROChrule(x%,y%,plot%)
SYS "Wimp_SetColour",rulewimpcol%
MOVE x%,y%
CASE plot% OF
  WHEN 1:PLOT plot%,LenLineP%,0
  WHEN 17:
  draw%!200=0:REM offset of first dash
  draw%!204=1:REM number of on/off elements in pattern
  draw%!208=70:REM length of first (and only) element
  REM set up draw path block
  !draw%=2:REM Start of path, i.e. move to x,y
  draw%!4=x%*256:REM draw units are 1/256 of OS units
  draw%!8=y%*256
  draw%!12=8:REM Draw line
  draw%!16=draw%!4+(LenLineP%*256):REM absolute x value
  draw%!20=draw%!8:REM no change in y
  draw%!24=0: REM end of path
  SYS "Draw_Stroke",draw%,0,0,0,0,0,draw%+200
ENDCASE
ENDPROC

for the PLOT 17 commands produces what looks like dashed lines on the
screen, but what looks like solid lines when printing to paper/PDF.   Redraw
on the PDF is also *incredibly* slow (as is screen redraw under emulation on
Windows, apparently).   If I zoom right in on the PDF I get what looks like
incredibly fine dots giving the impression of a solid line.

What is a sensible set of values for the 'dash pattern' block in order to
give the impression of a dotted line, and would it help if I could get
Draw_Stroke to produce something other than the default 'thin' line?
(Apparently you need to set up start and end cap information to alter the
line thickness....)



-- 
Harriet Bazley                     ==  Loyaulte me lie ==

Do not underestimate the power of the Force.

Back to comp.sys.acorn.programmer | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Printing dotted lines Harriet Bazley <harriet@bazleyfamily.co.uk> - 2018-02-03 23:42 +0000
  Re: Printing dotted lines news@sprow.co.uk - 2018-02-03 23:55 -0800
    Re: Printing dotted lines Harriet Bazley <harriet@bazleyfamily.co.uk> - 2018-02-04 18:03 +0000
      Re: Printing dotted lines Rick Murray <Rick@bogus.email.address> - 2018-02-04 20:27 +0100
      Re: Printing dotted lines Steve Fryatt <news@stevefryatt.org.uk> - 2018-02-04 22:50 +0000
        Re: Printing dotted lines Martin Wuerthner <spamtrap@mw-software.com> - 2018-02-08 12:06 +0100
        Re: Printing dotted lines Harriet Bazley <harriet@bazleyfamily.co.uk> - 2018-02-09 01:15 +0000
          Re: Printing dotted lines Matthew Phillips <spam2011m@yahoo.co.uk> - 2018-02-09 08:20 +0000
            Re: Printing dotted lines Harriet Bazley <harriet@bazleyfamily.co.uk> - 2018-02-09 14:52 +0000

csiph-web