unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
From: Luis Felipe <luis.felipe.la@protonmail.com>
To: "guile-user@gnu.org" <guile-user@gnu.org>,
	Ricardo Wurmus <rekado@elephly.net>
Subject: [WISH] Picture language: Improve editability of generated SVG
Date: Thu, 07 Apr 2022 20:36:38 +0000	[thread overview]
Message-ID: <HWBWPtH8Uc4NMTplrY52_WEzceNicM55i7yVqJGTObDZXNRdZzrRybRvpToaCboCmMJHflz-TZJs_ePAb8ZFG3ROA8zAFdzY60qVpaQbLag=@protonmail.com> (raw)


[-- Attachment #1.1: Type: text/plain, Size: 1274 bytes --]

Hi,

After reading the home page of the project, I understand this may be out of the scope, but I'm enjoying this tool and would enjoy it even more if the objects in the generated SVGs were easier to edit (in Inkscape, for example).

So, the following may be already known, but I'll explain just in case.

Take this program for example:

~~~
(use-modules (pict))

(define hat (triangle 20 20))
(define hat-pile
  (vc-append (hc-append hat hat)
             (hc-append hat hat)))

(pict->file hat-pile "hat-pile.svg")
~~~

In the resulting SVG, the hat objects are deeply nested one into each other, which makes it hard to select them individually. For example, to select the bottom-right hat, one has to double-click hats minus one times to get to it. Also, once you select an object, you can't move it around nor rotate it.

In (Dr)Racket, for example, the resulting hats would be all into one group; ungrouping lets them all readily available for edition. For example:

~~~
(require 2htdp/image)

(define hat (triangle 20 "solid" "orange"))
(define hat-pile
  (above (beside hat hat)
         (beside hat hat)))

(save-svg-image hat-pile "racket-hat-pile.svg")
~~~

Best,

---
Luis Felipe López Acevedo
https://luis-felipe.gitlab.io/

[-- Attachment #1.2: publickey - luis.felipe.la@protonmail.com - 0x12DE1598.asc --]
[-- Type: application/pgp-keys, Size: 1815 bytes --]

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 509 bytes --]

                 reply	other threads:[~2022-04-07 20:36 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/guile/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='HWBWPtH8Uc4NMTplrY52_WEzceNicM55i7yVqJGTObDZXNRdZzrRybRvpToaCboCmMJHflz-TZJs_ePAb8ZFG3ROA8zAFdzY60qVpaQbLag=@protonmail.com' \
    --to=luis.felipe.la@protonmail.com \
    --cc=guile-user@gnu.org \
    --cc=rekado@elephly.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).