www.delorie.com/archives/browse.cgi   search  
Mail Archives: geda-user/2018/07/09/16:51:42

X-Authentication-Warning: delorie.com: mail set sender to geda-user-bounces using -f
X-Recipient: geda-user AT delorie DOT com
X-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=gmail.com; s=20161025;
h=from:date:to:subject:message-id:mail-followup-to:references
:mime-version:content-disposition:in-reply-to:user-agent;
bh=VToY6QzVLIBV/KEUAnq9R0l92K/tcSvz0wR0OZXhWxA=;
b=Y99TtsS1/eODQLVBpL4rDbH8VcaYv8Z82sbjE3+kjujsOco/0upLyDJGV0rU5z9psq
2piDikqp/1a8Dz/byvXceBu5lCaFatgWqiKBgjcla8FX2UZygi6lxPwvyvCdXfmGhS2/
cuxAkhl6mgGKagzCSaRIpB1qjJ/j2etMFMUn1dSIiuanq21IEg46n8cQ3f2hN1l8tc2Y
sMRFKIkykT/AD4jvWuWbVxdose9h6A2QHE6BVK6R4VL/ZvQOU3fOo8i69vnrVFZq/nor
2H+HGk25F82Oe9zYMWkhomAPj91Un2RaMupk7k3IYpKdg4x4JjhkrdtMt9SaEZFtL1hI
9jLA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20161025;
h=x-gm-message-state:from:date:to:subject:message-id:mail-followup-to
:references:mime-version:content-disposition:in-reply-to:user-agent;
bh=VToY6QzVLIBV/KEUAnq9R0l92K/tcSvz0wR0OZXhWxA=;
b=hWpOH3+8gtnpdVO6mbgAyCAZ0I01avuQSLMx9zje8IXpUFZ8MiUbkMbvxyNLnxCoJI
9Il27A6BISuupke3cfUabX48qwicNo0+xdgpE4vmloR3IpHHCFh9cirQT19jd3mIu9FG
qOD+yg3lKi9UYVkdRONOOEcGBAwMwU35HTdoPrE1lPcC8KEgptfGpnmCI6YoxsY1NenL
xz0sAyJrjBjSlVtuUoe+01cu+0TSGLGxVuGOtZ8fzFXpb+YBooARY8ivgTP7tRLi+nhC
Wd6uSTAzr1mq4cDqt8vwFW08xjdeWr5EzyS1ugGcm4ZKvZVMKZo6UqC312BuEE2FxSeE
cU8Q==
X-Gm-Message-State: APt69E3MKV61I68jFD6StEFdpwRvK6P9WdKoFu7ayTtMENw3wm0e66qE
o4M8nj28s2hNz6uzFOqEVgXQRQ==
X-Google-Smtp-Source: AAOMgpflmhDI44/K611J6Ahb/Bma0UA7+GFRYUnzSM+u9XJ+dAN5fVMvZDdDtCeg0WEx6fM51a4t2g==
X-Received: by 2002:a2e:557:: with SMTP id 84-v6mr12990299ljf.152.1531169387048;
Mon, 09 Jul 2018 13:49:47 -0700 (PDT)
From: "vovka (vzhbanov AT gmail DOT com) [via geda-user AT delorie DOT com]" <geda-user AT delorie DOT com>
X-Google-Original-From: vovka <vovka AT gmail DOT com>
Date: Mon, 9 Jul 2018 23:49:44 +0300
To: geda-user AT delorie DOT com
Subject: Re: [geda-user] adventures using arrows (for documentation), or
cross my lines
Message-ID: <20180709204944.GA921@debian.lokolhoz>
Mail-Followup-To: geda-user AT delorie DOT com
References: <20180702125528 DOT D32CF81F76FE AT turkos DOT aspodata DOT se>
MIME-Version: 1.0
In-Reply-To: <20180702125528.D32CF81F76FE@turkos.aspodata.se>
User-Agent: Mutt/1.10.0 (2018-05-17)
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

Hi Karl,

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.
> 
> Here is such a symbol:
> 
> $ cat arrow.sym
> v 20150930 2
> H 3 0 0 0 -1 -1 1 -1 -1 -1 -1 -1 4
> M 0,0
> L -15,74
> L  15,74
> z
> $
> 
> and I can use something like [1] to scale it to a suitable size.
> 
> With thoose symbols I can create things like [2] so I can write about
> the relationship between currents and voltages.
> 
> As can seen from [2] the current arrow looks nice, but the voltage
> arrow goes below the horizontal line, it should stop at the line, not
> go beyond it.
> 
> If we look at the arrow sym (Hierarchy->Down symbol) and set the fill
> type to hollow, we see that the lines has a witdh > 0. Line width = 0
> is useful for filled polygons, since then the corners would be at line
> end coordinates and the arrow wouldn't go below the line in [2].
> 
> There are three ways I could solve the "go below" problem.
> 
> a, nudge the arrow upwards
> b, make the "PATH" object have true line width of 0, at least for filled
>    polygons, i.e. patch gschem/lepton-schematic to make that happen.
> 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

> 
> 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. Just open a PR as described at [1] or send it here.

[1] https://github.com/lepton-eda/lepton-eda/blob/master/CONTRIBUTING.md

-- 
  Vladimir

- Raw text -


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