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=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=hOwnzssfCeY9u8H0fNrMH3Vt6KhteGaPsf4TDQh60tI=; b=U3+zmQ6CLVBwyZySvtNwwZO6+9CzVDNU+63RCEI/etQTkEXPZElb/csq5ZjMYt7DVr CR/eVwTViBK97xeBbAZDIuz3EE2ZwGCPV9ae+Qby0lxcSjZvLzlRpqrnI/H0LR1EGHoo Fch09c0B6E4NfnRu1TWk6kVLPEAb1pGL43zd5jTDzPohA41zzF3XyuvfDKgWR7ZyBzu3 3GVNLyvfkM0FtOLUjl05quA3JDl+WblAN1OCB+7DEfaXtoKUlEfXiChWIDw0iit1zn4M mkksfbK04nc+SJvPzHb/H8ecJve+nolTeVHc0DZ2GBJp8k/t2ynmVnBrTOxtFg0IxlUR XIkA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=hOwnzssfCeY9u8H0fNrMH3Vt6KhteGaPsf4TDQh60tI=; b=HVLaxvXJAcYA0hvqS3vbu8t2xbagbjAvwfpgviJuLovJfCGrUjRkcEZpg5uKsH6YOF 9H//lI2MDTwK41QKFlTkVBbN1DjNqr0Ac8Y79AEzV3SOJDbwvvTEtOWMwIZwLry8/0un anjdv7fQHvEPYZw5p2MxfYg6ClnKDFvNwAuF0GJXBBDoDjYDaGwNTs1sc9/qz08ID6w0 O1yX01JA1AYiSOkMIvRAUJgQ9Z+1LTFNnD2URY3LVPa1PGh+6kaRqvXHBGIxj7Z2mtVb /b81Ox6y+6DBlePsUFsnqD2y0FJllZXY3baJ0y5G58K1zJB+Ds5xEO7fzKOzLXeYUzuv XwHQ== X-Gm-Message-State: AOUpUlFXcf9gAgEHEixCMc5XPNoeRxEW5SQWJhQbqlceCGMtkAt9K35s iM8+75uNim8vMYfaevPaeVh1tak7gGePWw/ANzSjgA== X-Google-Smtp-Source: AAOMgpcszIJ8PLhGRH39/cNA5qnGvsT6NeRVTnf3wYNNbEr3A0OW6kPEmAWH1lqMXZHFlU0L/z/kMHjSxF02mMEWQxo= X-Received: by 2002:a2e:991:: with SMTP id 139-v6mr1195255ljj.150.1531418284655; Thu, 12 Jul 2018 10:58:04 -0700 (PDT) MIME-Version: 1.0 References: <20180702125528 DOT D32CF81F76FE AT turkos DOT aspodata DOT se> <20180712172330 DOT 33B1B8420410 AT turkos DOT aspodata DOT se> In-Reply-To: <20180712172330.33B1B8420410@turkos.aspodata.se> From: "Sergey Stepanov (no DOT such DOT process AT gmail DOT com) [via geda-user AT delorie DOT com]" Date: Thu, 12 Jul 2018 22:57:50 +0500 Message-ID: Subject: Re: [geda-user] adventures using arrows (for documentation), or cross my lines To: geda-user AT delorie DOT com Content-Type: multipart/mixed; boundary="000000000000dc32aa0570d11a84" Reply-To: geda-user AT delorie DOT com --000000000000dc32aa0570d11a84 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hello, there. Some times ago I tried to solve similar problem about arrows. The result is in the attached patch. It adds new "Line cap style" as Arrow. The result can be seen at http://tinypic.com/r/b4htnl/9 . The provided code is quick and dirty, arrow length is hardcoded, pdf export problems, and so on, and so forth.. :-( So, you can do everything you want with it. It is applied to the latest git sources. =D1=87=D1=82, 12 =D0=B8=D1=8E=D0=BB. 2018 =D0=B3. =D0=B2 22:31, : > > Roland Lutz: > > On Mon, 2 Jul 2018, karl AT aspodata DOT se wrote: > > > 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 entr= y > > > which is currently completely ignored and and an undocumented cap > > > style is used instead (called "miter" in postscript), see [3]. > > > > "miter" is a join style, not a cap style. Cap styles are honored in pa= th > > objects, but they only effect the ends of the path and don't have any > > effect on closed paths at all. > > Correct. > > > > I'd prefer c to happen, since that would solve other line corner to > > > straight line situations. > > > > I agree that it is preferable to solve this "properly", but cap styles > > aren't going to help here. IMHO, gEDA/gaf should be trying to be as > > "standard" as possible here and allow the user to specify a PostScript > > join style. > > Great. > > Ps and cairo has matching names of calls and settings for line cap, > join and miter limit; geda only has for line caps. > > One way to solve this would be to match line caps and line joins: > end none (butt cap style) --- line join bevel > end square --- line join miter > end round --- line join round > > That would suffice for me. > > > This would mean adding an additional field to box and path objects. > > Adding fields to the file format has been done before, it should be > > considered carefully but can be done. > > > > > How difficult is that to implement and would such a patch be accepted= ? > > > > Implementing this would be a bit finicky but possible. The problem her= e > > is not to produce a working patch but to consider all the implications = in > > the different places that would be affected. Since this makes reviewing > > such a patch almost as bad as writing it in the first place, I don't th= ink > > submitting a patch will help. > > My guess is that the path diretive is only used within symbols. Looking > through cvs.gedasymbols I found 103 (out of 2577) symbols with paths. > > $ find /Net/cvs/cvs.gedasymbols.org/www/user/ -type f -name \*.sym -print= 0 | > > xargs -0 grep -l "^H " | wc -l > 85 > $ find /Net/cvs/cvs.gedasymbols.org/www/user/ -type f -name \*.sym | wc -= l > 2577 > > In all cases, except for > theese 33: > edward_hennessy/symbols/ech-regulator-current-1.sym > edward_hennessy/symbols/ech-diode-schottky-1.sym > edward_hennessy/symbols/ech-diode-schottky-2.sym > edward_hennessy/symbols/ech-diode-tvs-1.sym > edward_hennessy/symbols/ech-diode-tvs-2.sym > edward_hennessy/symbols/ech-diode-zener-1.sym > edward_hennessy/symbols/ech-diode-zener-2.sym > edward_hennessy/symbols/ech-fuse-resettable-1.sym > edward_hennessy/symbols/ech-fuse-resettable-2.sym > edward_hennessy/symbols/ech-switch-momentary-no-3.sym > edward_hennessy/symbols/ech-switch-momentary-no-4.sym > edward_hennessy/symbols/ech-resistor-1.sym > edward_hennessy/symbols/ech-resistor-2.sym > edward_hennessy/symbols/ech-opamp-ti-lmv324idr-5.sym > edward_hennessy/symbols/ech-transistor-npn-prebiased-1.sym > edward_hennessy/symbols/ech-opamp-ti-lmv324idr-3.sym > edward_hennessy/symbols/ech-opamp-ti-opa2348aid-1.sym > edward_hennessy/symbols/ech-opamp-ti-opa2348aid-5.sym > edward_hennessy/symbols/ech-thyristor-scr-1.sym > edward_hennessy/symbols/ech-diode-littelfuse-smaj5.0a-1.sym > edward_hennessy/symbols/ech-transistor-pnp-1.sym > edward_hennessy/symbols/ech-ground-analog-1.sym > edward_hennessy/symbols/ech-transistor-pnp-prebiased-1.sym > edward_hennessy/symbols/ech-ground-chassis-1.sym > edward_hennessy/symbols/ech-ground-digital-1.sym > edward_hennessy/symbols/ech-ground-signal-1.sym > edward_hennessy/symbols/ech-led-nichia-nesm026d-1.sym > edward_hennessy/symbols/ech-thyristor-scr-2.sym > edward_hennessy/symbols/ech-transistor-mosfet-nch-enh-dio-1.sym > edward_hennessy/symbols/ech-transistor-mosfet-nch-dep-dio-1.sym > edward_hennessy/symbols/ech-transistor-mosfet-pch-enh-dio-1.sym > edward_hennessy/symbols/ech-diode-littelfuse-sm24canb-1.sym > edward_hennessy/symbols/ech-opamp-ti-lmv324idr-1.sym > > the path operator is used for filled arrows (solid fill except for one > case of a mesh filled arrow). > > $ find /Net/cvs/cvs.gedasymbols.org/www/user/ -type f -name \*.sym -print= 0 | > > xargs -0 grep -l '^H ' | grep -v edward | xargs grep -h "^H " | > > sort | uniq -c > 56 H 3 0 0 0 -1 -1 1 -1 -1 -1 -1 -1 4 > 26 H 3 0 0 0 -1 -1 1 -1 -1 -1 -1 -1 5 > 1 H 3 0 0 0 -1 -1 2 -1 -1 -1 -1 -1 5 > 5 H 6 0 0 0 -1 -1 1 -1 -1 -1 -1 -1 4 > I.e. everybody (other than Ed) uses filled paths with a line "width" > of 0, and they use it for arrow tips. > > Filled arrow case definitely gain by having width =3D 0 =3D> actual width= =3D > 0 so that the arrow tip doesn't go too far. > > I'd like filled paths with width to have a width of 0, and to be able to > have round line join style. > > So we could ask Edward for his opinion. Ed, what is your take on this ? > > ... > > As an immediate solutiuon to your problem, I suggest moving the arrow > > object up a bit. If you set a non-zero line width, the bottom tip of t= he > > arrow is well-defined, so if you wanted to, you could even calculate th= e > > perfect offset by which to move the arrow up. > > Already done so. > > Regards, > /Karl Hammar > > ----------------------------------------------------------------------- > Asp=C3=B6 Data > Lilla Asp=C3=B6 148 > S-742 94 =C3=96sthammar > Sweden > +46 173 140 57 > > --000000000000dc32aa0570d11a84 Content-Type: text/x-patch; charset="US-ASCII"; name="arrow.patch" Content-Disposition: attachment; filename="arrow.patch" Content-Transfer-Encoding: base64 Content-ID: X-Attachment-Id: f_jjiuu15w0 Y29tbWl0IGVjNWU2ZWE4MTYwMGRiMzg3Mjk0MWU1N2I2MWZhY2M5OGZlN2RmN2UKQXV0aG9yOiBT ZXJnZXkgU3RlcGFub3YgPG5vLnN1Y2gucHJvY2Vzc0BnbWFpbC5jb20+CkRhdGU6ICAgVGh1IEp1 bCAxMiAyMjowODo1NiAyMDE2ICswNTAwCgogICAgYWRkIGFycm93CgpkaWZmIC0tZ2l0IGEvZ3Nj aGVtL3NyYy94X2xpbmVjYXBjYi5jIGIvZ3NjaGVtL3NyYy94X2xpbmVjYXBjYi5jCmluZGV4IGMz ODA2ZWUuLjk3ODU2YTAgMTAwNjQ0Ci0tLSBhL2dzY2hlbS9zcmMveF9saW5lY2FwY2IuYworKysg Yi9nc2NoZW0vc3JjL3hfbGluZWNhcGNiLmMKQEAgLTkxLDYgKzkxLDEzIEBAIGNyZWF0ZV9saW5l X2NhcF9saXN0X3N0b3JlICgpCiAgICAgLTEKICAgICApOwogCisgIGd0a19saXN0X3N0b3JlX2Fw cGVuZCAoc3RvcmUsICZpdGVyKTsKKyAgZ3RrX2xpc3Rfc3RvcmVfc2V0IChzdG9yZSwgJml0ZXIs CisgICAgQ09MVU1OX05BTUUsICAgICAgIF8oIkFycm93IiksCisgICAgQ09MVU1OX0lOREVYLCAg ICAgIEVORF9BUlJPVywKKyAgICAtMQorICAgICk7CisKICAgcmV0dXJuIHN0b3Jl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iL2xpYmdlZGFjYWlyby9lZGFjYWlyby5jCmluZGV4IGVlNDE4Y2QuLmEwMWU1MjIg MTAwNjQ0Ci0tLSBhL2xpYmdlZGFjYWlyby9lZGFjYWlyby5jCisrKyBiL2xpYmdlZGFjYWlyby9l ZGFjYWlyby5jCkBAIC0xMzgsNiArMTM4LDMyIEBAIGVkYV9jYWlyb19saW5lIChjYWlyb190ICpj ciwgaW50IGZsYWdzLCBpbnQgbGluZV9lbmQsCiAgIGNhaXJvX2RldmljZV90b191c2VyIChjciwg JngyLCAmeTIpOwogICBjYWlyb19tb3ZlX3RvIChjciwgeDEsIHkxKTsKICAgY2Fpcm9fbGluZV90 byAoY3IsIHgyLCB5Mik7CisKKyNkZWZpbmUgdGFuXzE1CTAuMjY3OTQ5MTkyCisjZGVmaW5lIGNv c180NQkwLjcwNzEwNjc4MQorI2RlZmluZSBfM21tCTEyMC4wCisjZGVmaW5lIGRlZzEzNQkoMi4z NTYxOTQ0OStNX1BJKQorI2RlZmluZSBkZWcyMjUJKC0yLjM1NjE5NDQ5K01fUEkpCisgICAgaWYg KGxpbmVfZW5kID09IEVORF9BUlJPVykgeworICAgICAgICBkb3VibGUgYW5nbGUgPSBNX1BJIC0g YXRhbjIod195MiAtIHdfeTEsIHdfeDIgLSB3X3gxKTsKKyAgICAgICAgZG91YmxlIHgsIHk7Cisg ICAgICAgIGRvdWJsZSBweCwgcHk7CisgICAgICAgIGRvdWJsZSByLCBwOworCisgICAgICAgIGNh aXJvX21vdmVfdG8oY3IsIHdfeDEsIHdfeTEpOworCisgICAgICAgIHggPSB3X3gxIC0gXzNtbSpj b3MoYW5nbGUpIC0gXzNtbSp0YW5fMTUqc2luKGFuZ2xlKTsKKyAgICAgICAgeSA9IHdfeTEgKyBf M21tKnNpbihhbmdsZSkgLSBfM21tKnRhbl8xNSpjb3MoYW5nbGUpOworICAgICAgICBjYWlyb19s aW5lX3RvKGNyLCB4LCB5KTsKKworICAgICAgICB4ID0gd194MSAtIF8zbW0qKDEgKyB0YW5fMTUp KmNvcyhhbmdsZSk7CisgICAgICAgIHkgPSB3X3kxICsgXzNtbSooMSArIHRhbl8xNSkqc2luKGFu Z2xlKTsKKyAgICAgICAgciA9IF8zbW0qdGFuXzE1L2Nvc180NTsKKyAgICAgICAgY2Fpcm9fYXJj KGNyLCB4LCB5LCByLCBkZWcxMzUtYW5nbGUsIGRlZzIyNS1hbmdsZSk7CisKKyAgICAgICAgY2Fp cm9fY2xvc2VfcGF0aChjcik7CisgICAgICAgIGNhaXJvX2ZpbGxfcHJlc2VydmUoY3IpOworICAg IH0KIH0KIAogCkBAIC0zODgsNiArNDE0LDcgQEAgZWRhX2NhaXJvX3N0cm9rZSAoY2Fpcm9fdCAq Y3IsIGludCBmbGFncywgaW50IGxpbmVfdHlwZSwgaW50IGxpbmVfZW5kLAogICAgIGNhc2UgRU5E X05PTkU6ICAgY2FwID0gQ0FJUk9fTElORV9DQVBfQlVUVDsgICBicmVhazsKICAgICBjYXNlIEVO RF9TUVVBUkU6IGNhcCA9IENBSVJPX0xJTkVfQ0FQX1NRVUFSRTsgYnJlYWs7CiAgICAgY2FzZSBF TkRfUk9VTkQ6ICBjYXAgPSByb3VuZF9jYXBfaWZfbGVnaWJsZTsgIGJyZWFrOworICAgIGNhc2Ug RU5EX0FSUk9XOiAgY2FwID0gcm91bmRfY2FwX2lmX2xlZ2libGU7ICBicmVhazsKICAgICBkZWZh dWx0OgogICAgICAgZ193YXJuX2lmX3JlYWNoZWQgKCk7CiAgICAgICBjYXAgPSBDQUlST19MSU5F X0NBUF9CVVRUOwo= --000000000000dc32aa0570d11a84--