[PD] GEM: Nembie question

Frank Barknecht fbar at footils.org
Wed Nov 2 20:23:59 CET 2005


Hallo,
Thomas Ouellet Fredericks hat gesagt: // Thomas Ouellet Fredericks wrote:

> This patch SHOULD keep the pixel size of a rectangle.
> 
> You MUST set the size of the gem window when you create it. Press the
> red button then change the width and height of the rect.

I found, that part of your calculation is unnecessary, because you
divide and multiply with the width at the same time, which will always
be times 1 anyway. Attached is a version where this is omited.
Interestingly the factor to scale between screen pixels and the Gem
coordinate (in the default view) only seems to depend on the height of
the Gem window. 

Ciao
-- 
 Frank Barknecht                 _ ______footils.org_ __goto10.org__
-------------- next part --------------
#N canvas 425 268 524 616 10;
#X obj 107 518 gemhead;
#X obj 197 199 gemwin;
#X obj 76 22 bng 15 250 50 0 empty empty empty 0 -6 0 8 -258699 -1
-1;
#X msg 197 150 destroy \, dimen \$1 \$2 \, border 0 \, create \, 1
;
#X obj 167 483 *;
#X obj 232 498 *;
#X floatatom 167 378 5 0 0 0 width(px) - -;
#X floatatom 232 378 5 0 0 1 height(px) - -;
#X text 205 24 Window size;
#X obj 176 444 t b f;
#X obj 260 462 t b f;
#X obj 167 250 gemmouse;
#X obj 167 346 unpack 0 0;
#X floatatom 87 177 8 0 0 0 - - -;
#X obj 167 281 pack 0 0;
#X obj 167 313 spigot;
#X msg 209 175 0 \, destroy;
#X obj 76 152 expr 4 / $f1;
#X msg 76 130 \$2;
#X obj 76 197 send aspect;
#X obj 176 414 receive aspect;
#X obj 260 436 receive aspect;
#X obj 76 100 t l l;
#X floatatom 106 23 5 0 0 0 - - -;
#X floatatom 155 22 5 0 0 0 - - -;
#X obj 76 42 f 400;
#X obj 76 62 pack 400 480;
#X obj 107 548 rectangle 5.3333 4;
#X connect 0 0 27 0;
#X connect 2 0 25 0;
#X connect 3 0 1 0;
#X connect 4 0 27 1;
#X connect 5 0 27 2;
#X connect 6 0 4 0;
#X connect 7 0 5 0;
#X connect 9 0 4 0;
#X connect 9 1 4 1;
#X connect 10 0 5 0;
#X connect 10 1 5 1;
#X connect 11 0 14 0;
#X connect 11 1 14 1;
#X connect 11 2 15 1;
#X connect 12 0 6 0;
#X connect 12 1 7 0;
#X connect 14 0 15 0;
#X connect 15 0 12 0;
#X connect 16 0 1 0;
#X connect 17 0 13 0;
#X connect 17 0 19 0;
#X connect 18 0 17 0;
#X connect 20 0 9 0;
#X connect 21 0 10 0;
#X connect 22 0 18 0;
#X connect 22 1 3 0;
#X connect 23 0 25 1;
#X connect 24 0 26 1;
#X connect 25 0 26 0;
#X connect 26 0 22 0;


More information about the Pd-list mailing list