← Back to team overview

geda-developers team mailing list archive

Re: [COMMIT] libgeda: support of rotation and mirroring in '%set-complex!'

 

Hi Peter,

On Thu, Aug 07, 2014 at 04:31:52PM +0100, Peter TB Brett wrote:
...
> How about adding a Scheme function called 'set-complex-with-transform!'?

I've named it 'set-component-with-transform!' like the procedure
'set-component!' we already have. The fix has been pushed. 

What do you think of changing the 'make-component' and
'make-component/library' procedures?
Would it be better to add 'make-component-with-transform' and
'make-component-with-transform/library' likewise or just let the
above procedures use 'set-component-with-transform!' instead of
'set-component!'?

'info geda-scheme' vaguely says about them so I've spent some time
to understand what's wrong when I'm adding a component with
transformation in gschem using the 'make-component/library'
function.

Now I can workaround it by using the following code:
  (define old-make-component/library make-component/library)
  (define (make-component/library . args)
      (apply set-component-with-transform!
        (old-make-component/library
        (car args) '(0 . 0) 0 #f #f) (cdr args)))
but IMHO for an ordinary user it would be an overhead.

Thanks,
  Vladimir


References