Re: [PD] Tk Zoom

2012-02-22 Thread Hans-Christoph Steiner

On Feb 22, 2012, at 12:48 AM, Mathieu Bouchard wrote:

 Le 2012-02-20 à 22:51:00, Hans-Christoph Steiner a écrit :
 
 Thanks for your email, I always find it interesting to hear people's 
 perspectives.  I'm happy to see more people getting involved in development, 
 so that means we can have more things like zooming interfaces. :-)  Tcl/Tk 
 can do zooming just fine, by the way ;-)
 
 How do you do zooming with Tcl/Tk ?
 
 I mean... I implemented zooming using a big workaround which wouldn't have 
 worked with Pd externals... is there a trouble-free way to zoom ?

Didn't you use Tk scaling?  That's what I mean. Yes, this would not work with 
existing GUI objects.

.hc



I have the audacity to believe that peoples everywhere can have three meals a 
day for their bodies, education and culture for their minds, and dignity, 
equality and freedom for their spirits.  - Martin Luther King, Jr.



___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management - 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] Tk Zoom

2012-02-22 Thread Mathieu Bouchard

Le 2012-02-22 à 09:31:00, Hans-Christoph Steiner a écrit :

On Feb 22, 2012, at 12:48 AM, Mathieu Bouchard wrote:

How do you do zooming with Tcl/Tk ?
I mean... I implemented zooming using a big workaround which wouldn't have 
worked with Pd externals... is there a trouble-free way to zoom ?


Didn't you use Tk scaling?  That's what I mean. Yes, this would not work with 
existing GUI objects.


« Tk Scaling » is the name of a font measurement ratio for pt/px 
conversions, right ?


TkCanvas' «scale» command is unrelated, and does not do zoom, because it 
changes the size of items. The difference between that and zoom is that Tk 
doesn't make you see the prescaled coordinates, it still interacts with 
you only in terms of actual pixels. This means that most of the time, 
you'd have to scale the values on your own using [expr {$x*$scale}] and 
stuff.


In DesireData, I avoid TkCanvas's «scale» command entirely, and I make 
every canvas item creation/modification through a function that scans the 
arguments of the item, scales all coords it sees, scales the thickness of 
lines, scales the font sizes, automatically decides tags to be used, and 
figures out what to do differently in create vs modify.


That way, the widget's behaviour does not have to implement zoom, it does 
not have to implement modification-functions (because the create-function 
is able to redraw an existing thing), it does not have to implement the 
delete-function (because the enforced common tag makes a single command 
delete), etc.


That's not compatible with t_widgetbehavior and couldn't possibly be made 
to be.


 __
| Mathieu BOUCHARD - téléphone : +1.514.383.3801 - Montréal, QC___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management - 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] Tk Zoom

2012-02-22 Thread Scott R. Looney
i may be totally out of my depth here as i'm not a programmer but i believe
MaxMSP was able to do zooming through the use of Juce. it certainly wasn't
available beforehand in any of the 4.X series. personally i find zooming to
be one the most massively useful things when editing patches. being old-ish
my eyes definitely have more issues than they used to...

scott

On Wed, Feb 22, 2012 at 10:32 AM, Mathieu Bouchard ma...@artengine.cawrote:

 Le 2012-02-22 à 09:31:00, Hans-Christoph Steiner a écrit :

 On Feb 22, 2012, at 12:48 AM, Mathieu Bouchard wrote:

 How do you do zooming with Tcl/Tk ?
 I mean... I implemented zooming using a big workaround which wouldn't
 have worked with Pd externals... is there a trouble-free way to zoom ?


 Didn't you use Tk scaling?  That's what I mean. Yes, this would not work
 with existing GUI objects.


 « Tk Scaling » is the name of a font measurement ratio for pt/px
 conversions, right ?

 TkCanvas' «scale» command is unrelated, and does not do zoom, because it
 changes the size of items. The difference between that and zoom is that Tk
 doesn't make you see the prescaled coordinates, it still interacts with you
 only in terms of actual pixels. This means that most of the time, you'd
 have to scale the values on your own using [expr {$x*$scale}] and stuff.

 In DesireData, I avoid TkCanvas's «scale» command entirely, and I make
 every canvas item creation/modification through a function that scans the
 arguments of the item, scales all coords it sees, scales the thickness of
 lines, scales the font sizes, automatically decides tags to be used, and
 figures out what to do differently in create vs modify.

 That way, the widget's behaviour does not have to implement zoom, it does
 not have to implement modification-functions (because the create-function
 is able to redraw an existing thing), it does not have to implement the
 delete-function (because the enforced common tag makes a single command
 delete), etc.

 That's not compatible with t_widgetbehavior and couldn't possibly be made
 to be.


  __**__**
 __
 | Mathieu BOUCHARD - téléphone : +1.514.383.3801 - Montréal, QC

___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management - 
http://lists.puredata.info/listinfo/pd-list


[PD] Tk Zoom

2012-02-21 Thread Mathieu Bouchard

Le 2012-02-20 à 22:51:00, Hans-Christoph Steiner a écrit :

Thanks for your email, I always find it interesting to hear people's 
perspectives.  I'm happy to see more people getting involved in 
development, so that means we can have more things like zooming 
interfaces. :-)  Tcl/Tk can do zooming just fine, by the way ;-)


How do you do zooming with Tcl/Tk ?

I mean... I implemented zooming using a big workaround which wouldn't have 
worked with Pd externals... is there a trouble-free way to zoom ?


 __
| Mathieu BOUCHARD - téléphone : +1.514.383.3801 - Montréal, QC___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management - 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] Tk Zoom

2012-02-21 Thread Jonathan Wilkes
- Original Message -

 From: Mathieu Bouchard ma...@artengine.ca
 To: Hans-Christoph Steiner h...@at.or.at
 Cc: pd-list@iem.at pd-list@iem.at
 Sent: Wednesday, February 22, 2012 12:48 AM
 Subject: [PD] Tk Zoom
 
 Le 2012-02-20 à 22:51:00, Hans-Christoph Steiner a écrit :
 
  Thanks for your email, I always find it interesting to hear people's 
 perspectives.  I'm happy to see more people getting involved in development, 
 so that means we can have more things like zooming interfaces. :-)  Tcl/Tk 
 can 
 do zooming just fine, by the way ;-)
 
 How do you do zooming with Tcl/Tk ?
 
 I mean... I implemented zooming using a big workaround which wouldn't have 
 worked with Pd externals... is there a trouble-free way to zoom ?

Curious about that, too.

 
 __
 | Mathieu BOUCHARD - téléphone : +1.514.383.3801 - Montréal, QC
 ___
 Pd-list@iem.at mailing list
 UNSUBSCRIBE and account-management - 
 http://lists.puredata.info/listinfo/pd-list
 

___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management - 
http://lists.puredata.info/listinfo/pd-list