www.delorie.com/archives/browse.cgi   search  
Mail Archives: geda-user/2018/07/11/23:59:41

X-Authentication-Warning: delorie.com: mail set sender to geda-user-bounces using -f
X-Recipient: geda-user AT delorie DOT com
X-Mailer: exmh version 2.8.0 04/21/2012 with nmh-1.6
X-Exmh-Isig-CompType: repl
X-Exmh-Isig-Folder: inbox
From: karl AT aspodata DOT se
To: geda-user AT delorie DOT com
Mail-Followup-To: geda-user AT delorie DOT com
Subject: Re: [geda-user] adventures using arrows (for documentation), or cross my lines
In-reply-to: <20180709204944.GA921@debian.lokolhoz>
References: <20180702125528 DOT D32CF81F76FE AT turkos DOT aspodata DOT se> <20180709204944 DOT GA921 AT debian DOT lokolhoz>
Comments: In-reply-to "vovka (vzhbanov AT gmail DOT com) [via geda-user AT delorie DOT com]" <geda-user AT delorie DOT com>
message dated "Mon, 09 Jul 2018 23:49:44 +0300."
Mime-Version: 1.0
Message-Id: <20180712035814.AAF7E8420410@turkos.aspodata.se>
Date: Thu, 12 Jul 2018 05:58:14 +0200 (CEST)
X-Virus-Scanned: ClamAV using ClamSMTP
Reply-To: geda-user AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: geda-user AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

Vladimir:
> On Mon, Jul 02, 2018 at 02:55:28PM +0200, karl AT aspodata DOT se wrote:
> >  I'm trying to make arrows to be used when writing about electronic
> > design and theory.
...
> > c, use same line width as horiz. line, and use round cap style, i.e. 
> >    patch gschem/lepton-schematic so that they honor the cap style entry
> >    which is currently completely ignored and and an undocumented cap 
> >    style is used instead (called "miter" in postscript), see [3].
> 
> You can mitigate the issue a bit by using a smaller line
> width. The smallest width is 1, since 0 means "default width"
> which is really 10. E.g. use the following path definition line:
> 
> H 3 1 0 0 -1 -1 1 -1 -1 -1 -1 -1 4

Having 0 beeing greater that 1 is not sane, better is to set a width > 0
for lines and not allowing 0, and only allow 0 in filled paths.

Another reason for setting line width to > 0 is so that when printed,
the nets and pins have the same line widths.

> > I'd prefer c to happen, since that would solve other line corner to 
> > straight line situations.
> > 
> > How difficult is that to implement and would such a patch be accepted ?
> 
> Dunno. I implemented capstyle support for lines a few years ago
> though some things have changed since then. Please look at
> edacairo.c. You can see how it is currently done for lines, and
> the eda_cairo_path function is the one to play with in this case,
> I believe. You'll probably have to read some docs of how things
> are done with cairo. Your patch will be accepted if it works
> properly.

Seems cairo is used somewhat like postscript, set linewidth etc.
make a path, stroke it.

instead of 
 cairo_set_line_join (cr, CAIRO_LINE_JOIN_MITER);
in line 385, add 

  switch (cap) {
  case CAIRO_LINE_CAP_BUTT:
    cairo_set_line_join (cr, CAIRO_LINE_JOIN_BEVEL);
    break;
  case CAIRO_LINE_CAP_SQUARE:
    cairo_set_line_join (cr, CAIRO_LINE_JOIN_MITER);
    break;
  case CAIRO_LINE_CAP_ROUND:
    cairo_set_line_join (cr, CAIRO_LINE_JOIN_ROUND);
    break;
  }

after switch (line_end) { ... }, or perhaps merge thoose two switch 
statements. Any preference ?

Since "lines" doesn't have joints, the join setting is only relevant for 
paths; and using multiple lines to build up e.g. a triangle, will make
their corners look ugly with the default butt caps style.

> Just open a PR as described at [1] or send it here.
> [1] https://github.com/lepton-eda/lepton-eda/blob/master/CONTRIBUTING.md

That would require me to get a github account and accepting:

https://help.github.com/articles/github-terms-of-service/
https://help.github.com/articles/github-privacy-statement/

I haven't read thoose, and I don't like beeing forced to make a 
contract just so I can help.

Wouldn't it be sufficient just publish any patches in the mailing list.

Regards,
/Karl Hammar

-----------------------------------------------------------------------
Aspö Data
Lilla Aspö 148
S-742 94 Östhammar
Sweden
+46 173 140 57




- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019