delorie.com/archives/browse.cgi   search  
Mail Archives: geda-user/2018/11/17/05:01:23

X-Authentication-Warning: delorie.com: mail set sender to geda-user-bounces using -f
X-Recipient: geda-user AT delorie DOT com
Date: Sat, 17 Nov 2018 11:00:08 +0100 (CET)
X-X-Sender: igor2 AT igor2priv
To: "Alexey Shaposhnikov (canisdirusleidy AT yandex DOT ru) [via geda-user AT delorie DOT com]" <geda-user AT delorie DOT com>
X-Debug: to=geda-user AT delorie DOT com from="gedau AT igor2 DOT repo DOT hu"
From: gedau AT igor2 DOT repo DOT hu
Subject: Re: [geda-user] (pcb, pcb-rnd) PasteBuffer action and relative
coordinates
In-Reply-To: <20181117142039.3702168c@warrawoona.sti>
Message-ID: <alpine.DEB.2.00.1811171053470.21900@igor2priv>
References: <20181117142039 DOT 3702168c AT warrawoona DOT sti>
User-Agent: Alpine 2.00 (DEB 1167 2008-08-23)
MIME-Version: 1.0
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 Alexey,

On Sat, 17 Nov 2018, Alexey Shaposhnikov (canisdirusleidy AT yandex DOT ru) [via geda-user AT delorie DOT com] wrote:

>
>Is there a way to set origin point for of PasteBuffer(ToLayout, ...)
>action then using relative coordinates (+X, +Y)? Or it's impossible
>without rewriting source code?

Relative to what? If the crosshair, in pc-rnd this works:

Cursor(pan, X, Y, mm)
PasteBuffer(ToLayout, Crosshair)

it's a cheat: it really moves the crosshair and then places the buffer at 
the new location. 

Please note that Cursor() is a rather old action and has calling 
conventions that are not in line with the conventions of modern actions. 
For example Y is flipped, positive goes up, not down (when looked from the 
top), and the unit needs to be specified in a separate arg.

We do have provisions in the code for relative placement in PasteBuffer(), 
but I couldn't decide what it should be relative to, so it's relative to 
0;0 -- which means absolute. We can easily change that if we figure what 
exactly it should do and why.


HTH,

Igor2

- Raw text -


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