#N canvas 6 61 625 531 10;
#X declare -lib Gem;
#X text 447 8 GEM object;
#X obj 8 335 cnv 15 430 130 empty empty empty 20 12 0 14 #e0e0e0 #404040 0;
#X text 39 338 Inlets:;
#X text 38 435 Outlets:;
#X obj 8 297 cnv 15 430 30 empty empty empty 20 12 0 14 #bcbcbc #404040 0;
#X text 17 296 Arguments:;
#X obj 7 56 cnv 15 430 235 empty empty empty 20 12 0 14 #e0e0e0 #404040 0;
#X obj 449 77 cnv 15 170 250 empty empty empty 20 12 0 14 #dce4fc #404040 0;
#X text 453 60 Example:;
#X obj 484 284 cnv 15 100 60 empty empty empty 20 12 0 14 #bcbcbc #404040 0;
#X obj 450 135 cnv 15 160 115 empty empty empty 20 12 0 14 #14e814 #404040 0;
#X obj 451 84 gemhead;
#X text 71 31 Class: pix object;
#X obj 510 85 bng 15 250 50 0 empty empty pix_load 20 8 0 8 #fcfcfc #000000 #000000;
#N canvas 0 0 587 366 image 0;
#X obj 77 48 inlet;
#X obj 77 344 outlet;
#X obj 77 205 pix_image examples/data/fractal.JPG;
#X obj 223 55 inlet;
#X msg 223 123 open \$1;
#X obj 223 100 openpanel;
#X connect 0 0 2 0;
#X connect 2 0 1 0;
#X connect 3 0 5 0;
#X connect 4 0 2 0;
#X connect 5 0 4 0;
#X restore 451 113 pd image;
#X text 63 307 <none>;
#X text 56 448 Outlet 1: gemlist;
#X text 63 352 Inlet 1: gemlist;
#X obj 451 253 _pix2rectangle 3;
#X text 516 105 open an image;
#X text 509 118 (JPEG \, TIFF \, ..);
#X text 63 365 Inlet 1: 1|0 : apply/don't apply (default:1);
#X floatatom 464 177 3 0.01 16 1 - - - 0;
#X obj 35 477 cnv 15 375 20 empty empty empty 20 12 0 14 #fcac44 #404040 0;
#X text 44 480 (ported from "pete's plugins" \, www.petewarden.com);
#X msg 464 195 refract \$1;
#X msg 544 195 mag \$1;
#X floatatom 464 137 3 0 0 1 - - - 0;
#X floatatom 544 137 3 0 0 1 - - - 0;
#X msg 464 155 width \$1;
#X msg 544 155 height \$1;
#X obj 451 226 pix_refraction;
#X obj 544 176 tgl 15 0 empty empty empty 0 -6 0 8 #fcfcfc #000000 #000000 0 1;
#X text 29 56 Description: display a pix through glass bricks;
#X text 80 158 range = 0.01 to 16 \, default = 2;
#X text 79 198 range = 1 to 255 \, default = 16;
#X text 80 230 range = 1 to 255 \, default = 16;
#X text 80 273 range = 0 or 1 \, default = 1;
#X text 28 77 The input image is broken up into rectangular cells \, and scaled up or down within them. The effect is like looking through a wall of glass bricks \, each acting as a magnifying or shrinking lens for its part of the image;
#X text 37 138 How much to shrink or expand the input image within each cell;
#X text 37 182 Width of each cell \, where 1 is the image width;
#X text 37 214 Height of each cell \, where 1 is the image height;
#X text 28 244 Turning this off prevents the image from being expanded to larger than it's original size (within each cell);
#X text 63 380 Inlet 1: width <float>;
#X text 63 406 Inlet 1: mag 1|0;
#X text 63 421 Inlet 1: refract <float>;
#X text 63 392 Inlet 1: height <float>;
#X text 49 12 Synopsis: [pix_refraction];
#N canvas 484 243 450 300 META 0;
#X obj 10 25 declare -lib Gem;
#X text 10 45 DESCRIPTION display a pix through glass bricks;
#X text 10 65 KEYWORDS Gem pix image;
#X text 20 85 INLET_0 gemlist bool width height mag refract;
#X text 20 105 OUTLET_0 gemlist;
#X text 10 125 AUTHOR IOhannes m zmölnig;
#X text 10 145 LICENSE GPL v2;
#X restore 519 8 pd META;
#X obj 489 288 _gemwin;
#X connect 11 0 14 0;
#X connect 13 0 14 1;
#X connect 14 0 31 0;
#X connect 22 0 25 0;
#X connect 25 0 31 0;
#X connect 26 0 31 0;
#X connect 27 0 29 0;
#X connect 28 0 30 0;
#X connect 29 0 31 0;
#X connect 30 0 31 0;
#X connect 31 0 18 0;
#X connect 32 0 26 0;
