27
$author = $copyright = 'Jo\xc3\xa3o S. O. Bueno Calligaris';
32
sub drawable_arg () {{
35
desc => 'The affected drawable'
38
sub transform_options_args () {
39
{ name => 'transform_direction', type => 'enum GimpTransformDirection',
40
desc => 'Direction of Transformation: { %%desc%% }' },
41
{ name => 'interpolation', type => 'enum GimpInterpolationType',
42
desc => 'Type of interpolation: { %%desc%% }' },
43
{ name => 'supersample', type => 'boolean',
44
desc => 'Whether to perform supersample' },
45
{ name => 'recursion_level', type => '0 < int32',
46
desc => 'Level of recursion (3 is a nice default)' },
47
{ name => 'clip_result', type => 'boolean',
48
desc => 'Whether to clip results' }
51
sub transform_options_default_args () {
52
{ name => 'interpolate', type => 'boolean',
53
desc => 'Whether to use interpolation and supersampling' },
54
{ name => 'clip_result', type => 'boolean',
55
desc => 'Whether to clip results' }
58
sub drawable_out_arg {
60
my $arg = &drawable_arg;
61
$arg->{desc} = "The $type drawable";
62
$arg->{no_declare} = 1;
66
26
sub transform_invoke {
67
my ($progress_text, $assemble_matrix, $variables, $check) = @_;
27
my ($progress_text, $assemble_matrix, $check) = @_;
68
28
my $success_check = 'gimp_item_is_attached (GIMP_ITEM (drawable));';
71
$success_check = "(gimp_item_is_attached (GIMP_ITEM (drawable)) &&\n" . $check;
31
$success_check = "(gimp_item_is_attached (GIMP_ITEM (drawable)) && " . $check . ");";
78
37
gint x, y, width, height;
114
73
sub transform_default_invoke {
115
my ($progress_text, $assemble_matrix, $variables, $check) = @_;
74
my ($progress_text, $assemble_matrix, $check) = @_;
116
75
my $success_check = 'gimp_item_is_attached (GIMP_ITEM (drawable));';
119
$success_check = "(gimp_item_is_attached (GIMP_ITEM (drawable)) &&\n" . $check;
78
$success_check = "(gimp_item_is_attached (GIMP_ITEM (drawable)) && " . $check . ");";
126
84
gint x, y, width, height;
184
142
Otherwise, this will be the newly created and flipped drawable.
145
&joao_pdb_misc('2004', '2.2');
191
{ name => 'flip_type', type => &std_orientation_enum,
192
desc => 'Type of flip: %%desc%%' },
148
{ name => 'drawable', type => 'drawable',
149
desc => 'The affected drawable' },
150
{ name => 'flip_type',
151
type => 'enum GimpOrientationType (no GIMP_ORIENTATION_UNKNOWN)',
152
desc => 'Type of flip' },
193
153
{ name => 'auto_center', type => 'boolean',
194
154
desc => 'Whether to automatically position the axis in the selection center' },
195
155
{ name => 'axis', type => 'float',
239
202
results parameter specifies wheter current selection will affect the transform.
205
&joao_pdb_misc('2004', '2.2');
208
{ name => 'drawable', type => 'drawable',
209
desc => 'The affected drawable' },
246
210
{ name => 'x0', type => 'float',
247
211
desc => 'horz. coord. of one end of axis' },
248
212
{ name => 'y0', type => 'float',
251
215
desc => 'horz. coord. of other end of axis' },
252
216
{ name => 'y1', type => 'float',
253
217
desc => 'vert. coord. of other end of axis' },
254
&transform_options_args
257
@outargs = ( &drawable_out_arg('flipped') );
259
transform_invoke ("Flip...", <<CODE);
260
gimp_transform_matrix_flip_free (x, y, width, height,
218
{ name => 'transform_direction', type => 'enum GimpTransformDirection',
219
desc => 'Direction of transformation' },
220
{ name => 'interpolation', type => 'enum GimpInterpolationType',
221
desc => 'Type of interpolation' },
222
{ name => 'supersample', type => 'boolean',
223
desc => 'Whether to perform supersample' },
224
{ name => 'recursion_level', type => '1 <= int32',
225
desc => 'Level of recursion (3 is a nice default)' },
226
{ name => 'clip_result', type => 'boolean',
227
desc => 'Whether to clip results' }
231
{ name => 'drawable', type => 'drawable', no_declare => 1,
232
desc => 'The flipped drawable' }
235
transform_invoke ("Flipping", <<CODE);
236
gimp_matrix3_identity (&matrix);
237
gimp_transform_matrix_flip_free (&matrix,
275
251
(depending on the 'interpolate' parameter).
254
&joao_pdb_misc('2004', '2.2');
257
{ name => 'drawable', type => 'drawable',
258
desc => 'The affected drawable' },
282
259
{ name => 'x0', type => 'float',
283
260
desc => 'horz. coord. of one end of axis' },
284
261
{ name => 'y0', type => 'float',
287
264
desc => 'horz. coord. of other end of axis' },
288
265
{ name => 'y1', type => 'float',
289
266
desc => 'vert. coord. of other end of axis' },
290
&transform_options_default_args
293
@outargs = ( &drawable_out_arg('flipped') );
295
transform_default_invoke ("Flip...", <<CODE);
296
gimp_transform_matrix_flip_free (x, y, width, height,
267
{ name => 'interpolate', type => 'boolean',
268
desc => 'Whether to use interpolation and supersampling' },
269
{ name => 'clip_result', type => 'boolean',
270
desc => 'Whether to clip results' }
274
{ name => 'drawable', type => 'drawable', no_declare => 1,
275
desc => 'The flipped drawable' }
278
transform_default_invoke ("Flipping", <<CODE);
279
gimp_matrix3_identity (&matrix);
280
gimp_transform_matrix_flip_free (&matrix,
323
306
a perspective transform.
309
&joao_pdb_misc('2004', '2.2');
333
foreach $where (qw(upper-left upper-right lower-left lower-right)) {
336
{ name => "$_$pos", type => 'float',
337
desc => "The new $_ coordinate of $where corner of original
339
alias => "trans_info[\U$_\E$pos]", no_declare => 1 }
344
&transform_options_args
347
@outargs = ( &drawable_out_arg('newly mapped') );
349
transform_invoke ("Perspective...", <<CODE, [ 'gdouble trans_info[8]' ]);
350
gimp_transform_matrix_perspective (x, y, width, height,
351
trans_info[X0], trans_info[Y0],
352
trans_info[X1], trans_info[Y1],
353
trans_info[X2], trans_info[Y2],
354
trans_info[X3], trans_info[Y3],
312
{ name => 'drawable', type => 'drawable',
313
desc => 'The affected drawable' },
314
{ name => 'x0', type => 'float',
315
desc => 'The new x coordinate of upper-left corner of original
317
{ name => 'y0', type => 'float',
318
desc => 'The new y coordinate of upper-left corner of original
320
{ name => 'x1', type => 'float',
321
desc => 'The new x coordinate of upper-right corner of original
323
{ name => 'y1', type => 'float',
324
desc => 'The new y coordinate of upper-right corner of original
326
{ name => 'x2', type => 'float',
327
desc => 'The new x coordinate of lower-left corner of original
329
{ name => 'y2', type => 'float',
330
desc => 'The new y coordinate of lower-left corner of original
332
{ name => 'x3', type => 'float',
333
desc => 'The new x coordinate of lower-right corner of original
335
{ name => 'y3', type => 'float',
336
desc => 'The new y coordinate of lower-right corner of original
338
{ name => 'transform_direction', type => 'enum GimpTransformDirection',
339
desc => 'Direction of transformation' },
340
{ name => 'interpolation', type => 'enum GimpInterpolationType',
341
desc => 'Type of interpolation' },
342
{ name => 'supersample', type => 'boolean',
343
desc => 'Whether to perform supersample' },
344
{ name => 'recursion_level', type => '1 <= int32',
345
desc => 'Level of recursion (3 is a nice default)' },
346
{ name => 'clip_result', type => 'enum GimpTransformResize',
347
desc => 'How to clip results' }
351
{ name => 'drawable', type => 'drawable', no_declare => 1,
352
desc => 'The newly mapped drawable' }
355
transform_invoke ("Perspective", <<CODE);
356
gimp_matrix3_identity (&matrix);
357
gimp_transform_matrix_perspective (&matrix,
368
373
(depending on the 'interpolate' parameter).
376
&joao_pdb_misc('2004', '2.2');
378
foreach $where (qw(upper-left upper-right lower-left lower-right)) {
381
{ name => "$_$pos", type => 'float',
382
desc => "The new $_ coordinate of $where corner of original
384
alias => "trans_info[\U$_\E$pos]", no_declare => 1 }
389
&transform_options_default_args
392
@outargs = ( &drawable_out_arg('newly mapped') );
394
transform_default_invoke ("Perspective...", <<CODE, [ 'gdouble trans_info[8]' ]);
395
gimp_transform_matrix_perspective (x, y, width, height,
396
trans_info[X0], trans_info[Y0],
397
trans_info[X1], trans_info[Y1],
398
trans_info[X2], trans_info[Y2],
399
trans_info[X3], trans_info[Y3],
379
{ name => 'drawable', type => 'drawable',
380
desc => 'The affected drawable' },
381
{ name => 'x0', type => 'float',
382
desc => 'The new x coordinate of upper-left corner of original
384
{ name => 'y0', type => 'float',
385
desc => 'The new y coordinate of upper-left corner of original
387
{ name => 'x1', type => 'float',
388
desc => 'The new x coordinate of upper-right corner of original
390
{ name => 'y1', type => 'float',
391
desc => 'The new y coordinate of upper-right corner of original
393
{ name => 'x2', type => 'float',
394
desc => 'The new x coordinate of lower-left corner of original
396
{ name => 'y2', type => 'float',
397
desc => 'The new y coordinate of lower-left corner of original
399
{ name => 'x3', type => 'float',
400
desc => 'The new x coordinate of lower-right corner of original
402
{ name => 'y3', type => 'float',
403
desc => 'The new y coordinate of lower-right corner of original
405
{ name => 'interpolate', type => 'boolean',
406
desc => 'Whether to use interpolation and supersampling' },
407
{ name => 'clip_result', type => 'enum GimpTransformResize',
408
desc => 'How to clip results' }
412
{ name => 'drawable', type => 'drawable', no_declare => 1,
413
desc => 'The newly mapped drawable' }
416
transform_default_invoke ("Perspective", <<CODE);
417
gimp_matrix3_identity (&matrix);
418
gimp_transform_matrix_perspective (&matrix,
417
438
this will be the newly created and rotated drawable.
441
&joao_pdb_misc('2004', '2.2');
444
{ name => 'drawable', type => 'drawable',
445
desc => 'The affected drawable' },
424
446
{ name => 'rotate_type', type => 'enum GimpRotationType',
425
desc => 'Type of rotation: %%desc%%' },
447
desc => 'Type of rotation' },
426
448
{ name => 'auto_center', type => 'boolean',
427
449
desc => 'Whether to automatically rotate around the selection center' },
428
450
{ name => 'center_x', type => 'int32',
470
496
this will be the newly created and rotated drawable.
499
&joao_pdb_misc('2004', '2.2');
502
{ name => 'drawable', type => 'drawable',
503
desc => 'The affected drawable' },
477
504
{ name => 'angle', type => 'float',
478
505
desc => 'The angle of rotation (radians)' },
479
506
{ name => 'auto_center', type => 'boolean',
482
509
desc => 'The hor. coordinate of the center of rotation' },
483
510
{ name => 'center_y', type => 'int32',
484
511
desc => 'The vert. coordinate of the center of rotation' },
485
&transform_options_args
488
@outargs = ( &drawable_out_arg('rotated') );
490
transform_invoke ("Rotating...", <<CODE);
512
{ name => 'transform_direction', type => 'enum GimpTransformDirection',
513
desc => 'Direction of transformation' },
514
{ name => 'interpolation', type => 'enum GimpInterpolationType',
515
desc => 'Type of interpolation' },
516
{ name => 'supersample', type => 'boolean',
517
desc => 'Whether to perform supersample' },
518
{ name => 'recursion_level', type => '1 <= int32',
519
desc => 'Level of recursion (3 is a nice default)' },
520
{ name => 'clip_result', type => 'enum GimpTransformResize',
521
desc => 'How to clip results' }
525
{ name => 'drawable', type => 'drawable', no_declare => 1,
526
desc => 'The rotated drawable' }
529
transform_invoke ("Rotating", <<CODE);
530
gimp_matrix3_identity (&matrix);
492
gimp_transform_matrix_rotate (x, y, width, height, angle,
532
gimp_transform_matrix_rotate_rect (&matrix,
533
x, y, width, height, angle);
495
gimp_transform_matrix_rotate_center (center_x, center_y, angle,
535
gimp_transform_matrix_rotate_center (&matrix,
536
center_x, center_y, angle);
509
549
(depending on the 'interpolate' parameter).
552
&joao_pdb_misc('2004', '2.2');
555
{ name => 'drawable', type => 'drawable',
556
desc => 'The affected drawable' },
516
557
{ name => 'angle', type => 'float',
517
558
desc => 'The angle of rotation (radians)' },
518
559
{ name => 'auto_center', type => 'boolean',
521
562
desc => 'The hor. coordinate of the center of rotation' },
522
563
{ name => 'center_y', type => 'int32',
523
564
desc => 'The vert. coordinate of the center of rotation' },
524
&transform_options_default_args
527
@outargs = ( &drawable_out_arg('rotated') );
529
transform_default_invoke ("Rotating...", <<CODE);
565
{ name => 'interpolate', type => 'boolean',
566
desc => 'Whether to use interpolation and supersampling' },
567
{ name => 'clip_result', type => 'enum GimpTransformResize',
568
desc => 'How to clip results' }
572
{ name => 'drawable', type => 'drawable', no_declare => 1,
573
desc => 'The rotated drawable' }
576
transform_default_invoke ("Rotating", <<CODE);
577
gimp_matrix3_identity (&matrix);
531
gimp_transform_matrix_rotate (x, y, width, height, angle,
579
gimp_transform_matrix_rotate_rect (&matrix,
580
x, y, width, height, angle);
534
gimp_transform_matrix_rotate_center (center_x, center_y, angle,
582
gimp_transform_matrix_rotate_center (&matrix,
583
center_x, center_y, angle);
550
598
this will be the newly created and scaled drawable.
601
&joao_pdb_misc('2004', '2.2');
560
foreach $where (qw(upper-left lower-right)) {
563
{ name => "$_$pos", type => 'float',
564
desc => "The new $_ coordinate of $where corner of newly
566
alias => "trans_info[\U$_\E$pos]", no_declare => 1 }
572
&transform_options_args
575
@outargs = ( &drawable_out_arg('scaled') );
577
transform_invoke ("Scaling...", <<CODE, [ 'gdouble trans_info[4]' ], <<CODE2);
578
gimp_transform_matrix_scale (x, y, width, height,
581
trans_info[X1] - trans_info[X0],
582
trans_info[Y1] - trans_info[Y0],
604
{ name => 'drawable', type => 'drawable',
605
desc => 'The affected drawable' },
606
{ name => 'x0', type => 'float',
607
desc => 'The new x coordinate of the upper-left corner of the
609
{ name => 'y0', type => 'float',
610
desc => 'The new y coordinate of the upper-left corner of the
612
{ name => 'x1', type => 'float',
613
desc => 'The new x coordinate of the lower-right corner of the
615
{ name => 'y1', type => 'float',
616
desc => 'The new y coordinate of the lower-right corner of the
618
{ name => 'transform_direction', type => 'enum GimpTransformDirection',
619
desc => 'Direction of transformation' },
620
{ name => 'interpolation', type => 'enum GimpInterpolationType',
621
desc => 'Type of interpolation' },
622
{ name => 'supersample', type => 'boolean',
623
desc => 'Whether to perform supersample' },
624
{ name => 'recursion_level', type => '1 <= int32',
625
desc => 'Level of recursion (3 is a nice default)' },
626
{ name => 'clip_result', type => 'enum GimpTransformResize',
627
desc => 'How to clip results' }
631
{ name => 'drawable', type => 'drawable', no_declare => 1,
632
desc => 'The scaled drawable' }
635
transform_invoke ("Scaling", <<CODE, 'x0 < x1 && y0 < y1');
636
gimp_matrix3_identity (&matrix);
637
gimp_transform_matrix_scale (&matrix,
639
x0, y0, x1 - x0, y1 - y0);
585
trans_info[X0] < trans_info[X1] &&
586
trans_info[Y0] < trans_info[Y1]);
597
650
(depending on the 'interpolate' parameter).
653
&joao_pdb_misc('2004', '2.2');
607
foreach $where (qw(upper-left lower-right)) {
610
{ name => "$_$pos", type => 'float',
611
desc => "The new $_ coordinate of $where corner of newly
613
alias => "trans_info[\U$_\E$pos]", no_declare => 1 }
619
&transform_options_default_args
622
@outargs = ( &drawable_out_arg('scaled') );
624
transform_default_invoke ("Scaling...", <<CODE, [ 'gdouble trans_info[4]' ], <<CODE2);
625
gimp_transform_matrix_scale (x, y, width, height,
628
trans_info[X1] - trans_info[X0],
629
trans_info[Y1] - trans_info[Y0],
656
{ name => 'drawable', type => 'drawable',
657
desc => 'The affected drawable' },
658
{ name => 'x0', type => 'float',
659
desc => 'The new x coordinate of the upper-left corner of the
661
{ name => 'y0', type => 'float',
662
desc => 'The new y coordinate of the upper-left corner of the
664
{ name => 'x1', type => 'float',
665
desc => 'The new x coordinate of the lower-right corner of the
667
{ name => 'y1', type => 'float',
668
desc => 'The new y coordinate of the lower-right corner of the
670
{ name => 'interpolate', type => 'boolean',
671
desc => 'Whether to use interpolation and supersampling' },
672
{ name => 'clip_result', type => 'enum GimpTransformResize',
673
desc => 'How to clip results' }
677
{ name => 'drawable', type => 'drawable', no_declare => 1,
678
desc => 'The scaled drawable' }
681
transform_default_invoke ("Scaling", <<CODE, 'x0 < x1 && y0 < y1');
682
gimp_matrix3_identity (&matrix);
683
gimp_transform_matrix_scale (&matrix,
685
x0, y0, x1 - x0, y1 - y0);
632
trans_info[X0] < trans_info[X1] &&
633
trans_info[Y0] < trans_info[Y1]);
653
705
indicates the extent (in pixels) to shear by.
708
&joao_pdb_misc('2004', '2.2');
660
{ name => 'shear_type', type => &std_orientation_enum,
661
desc => 'Type of shear: %%desc%%' },
711
{ name => 'drawable', type => 'drawable',
712
desc => 'The affected drawable' },
713
{ name => 'shear_type',
714
type => 'enum GimpOrientationType (no GIMP_ORIENTATION_UNKNOWN)',
715
desc => 'Type of shear' },
662
716
{ name => 'magnitude', type => 'float',
663
717
desc => 'The magnitude of the shear' },
664
&transform_options_args
667
@outargs = ( &drawable_out_arg('sheared') );
669
transform_invoke ("Shearing...", <<CODE);
670
gimp_transform_matrix_shear (x, y, width, height,
671
shear_type, magnitude,
718
{ name => 'transform_direction', type => 'enum GimpTransformDirection',
719
desc => 'Direction of transformation' },
720
{ name => 'interpolation', type => 'enum GimpInterpolationType',
721
desc => 'Type of interpolation' },
722
{ name => 'supersample', type => 'boolean',
723
desc => 'Whether to perform supersample' },
724
{ name => 'recursion_level', type => '1 <= int32',
725
desc => 'Level of recursion (3 is a nice default)' },
726
{ name => 'clip_result', type => 'enum GimpTransformResize',
727
desc => 'How to clip results' }
731
{ name => 'drawable', type => 'drawable', no_declare => 1,
732
desc => 'The sheared drawable' }
735
transform_invoke ("Shearing", <<CODE);
736
gimp_matrix3_identity (&matrix);
737
gimp_transform_matrix_shear (&matrix,
739
shear_type, magnitude);
685
752
(depending on the 'interpolate' parameter).
755
&joao_pdb_misc('2004', '2.2');
692
{ name => 'shear_type', type => &std_orientation_enum,
693
desc => 'Type of shear: %%desc%%' },
758
{ name => 'drawable', type => 'drawable',
759
desc => 'The affected drawable' },
760
{ name => 'shear_type',
761
type => 'enum GimpOrientationType (no GIMP_ORIENTATION_UNKNOWN)',
762
desc => 'Type of shear' },
694
763
{ name => 'magnitude', type => 'float',
695
764
desc => 'The magnitude of the shear' },
696
&transform_options_default_args
699
@outargs = ( &drawable_out_arg('sheared') );
701
transform_default_invoke ("Shearing...", <<CODE);
702
gimp_transform_matrix_shear (x, y, width, height,
703
shear_type, magnitude,
765
{ name => 'interpolate', type => 'boolean',
766
desc => 'Whether to use interpolation and supersampling' },
767
{ name => 'clip_result', type => 'enum GimpTransformResize',
768
desc => 'How to clip results' }
772
{ name => 'drawable', type => 'drawable', no_declare => 1,
773
desc => 'The sheared drawable' }
776
transform_default_invoke ("Shearing", <<CODE);
777
gimp_matrix3_identity (&matrix);
778
gimp_transform_matrix_shear (&matrix,
780
shear_type, magnitude);
743
820
desc => 'X coordinate of where the center goes' },
744
821
{ name => 'dest_y', type => 'float',
745
822
desc => 'Y coordinate of where the center goes' },
746
&transform_options_args
749
@outargs = ( &drawable_out_arg('transformed') );
751
transform_invoke ("2D Transform...", <<CODE);
823
{ name => 'transform_direction', type => 'enum GimpTransformDirection',
824
desc => 'Direction of transformation' },
825
{ name => 'interpolation', type => 'enum GimpInterpolationType',
826
desc => 'Type of interpolation' },
827
{ name => 'supersample', type => 'boolean',
828
desc => 'Whether to perform supersample' },
829
{ name => 'recursion_level', type => '1 <= int32',
830
desc => 'Level of recursion (3 is a nice default)' },
831
{ name => 'clip_result', type => 'enum GimpTransformResize',
832
desc => 'How to clip results' }
836
{ name => 'drawable', type => 'drawable', no_declare => 1,
837
desc => 'The transformed drawable' }
840
transform_invoke ("2D Transform", <<CODE);
752
841
gimp_matrix3_identity (&matrix);
753
842
gimp_matrix3_translate (&matrix, -source_x, -source_y);
754
843
gimp_matrix3_scale (&matrix, scale_x, scale_y);
769
858
(depending on the 'interpolate' parameter).
861
&joao_pdb_misc('2004', '2.2');
864
{ name => 'drawable', type => 'drawable',
865
desc => 'The affected drawable' },
776
866
{ name => 'source_x', type => 'float',
777
867
desc => 'X coordinate of the transformation center' },
778
868
{ name => 'source_y', type => 'float',
787
877
desc => 'X coordinate of where the center goes' },
788
878
{ name => 'dest_y', type => 'float',
789
879
desc => 'Y coordinate of where the center goes' },
790
&transform_options_default_args
793
@outargs = ( &drawable_out_arg('transformed') );
795
transform_default_invoke ("2D Transform...", <<CODE);
880
{ name => 'interpolate', type => 'boolean',
881
desc => 'Whether to use interpolation and supersampling' },
882
{ name => 'clip_result', type => 'enum GimpTransformResize',
883
desc => 'How to clip results' }
887
{ name => 'drawable', type => 'drawable', no_declare => 1,
888
desc => 'The transformed drawable' }
891
transform_default_invoke ("2D Transforming", <<CODE);
796
892
gimp_matrix3_identity (&matrix);
797
893
gimp_matrix3_translate (&matrix, -source_x, -source_y);
798
894
gimp_matrix3_scale (&matrix, scale_x, scale_y);
818
914
this will be the newly created and transformed drawable.
917
&joao_pdb_misc('2004', '2.2');
920
{ name => 'drawable', type => 'drawable',
921
desc => 'The affected drawable' },
825
922
{ name => 'coeff_0_0', type => 'float',
826
923
desc => 'coefficient (0,0) of the transformation matrix' },
827
924
{ name => 'coeff_0_1', type => 'float',
840
937
desc => 'coefficient (2,1) of the transformation matrix' },
841
938
{ name => 'coeff_2_2', type => 'float',
842
939
desc => 'coefficient (2,2) of the transformation matrix' },
843
&transform_options_args
846
@outargs = ( &drawable_out_arg('transformed') );
848
transform_invoke ("2D Transform...", <<CODE);
940
{ name => 'transform_direction', type => 'enum GimpTransformDirection',
941
desc => 'Direction of transformation' },
942
{ name => 'interpolation', type => 'enum GimpInterpolationType',
943
desc => 'Type of interpolation' },
944
{ name => 'supersample', type => 'boolean',
945
desc => 'Whether to perform supersample' },
946
{ name => 'recursion_level', type => '1 <= int32',
947
desc => 'Level of recursion (3 is a nice default)' },
948
{ name => 'clip_result', type => 'enum GimpTransformResize',
949
desc => 'How to clip results' }
953
{ name => 'drawable', type => 'drawable', no_declare => 1,
954
desc => 'The transformed drawable' }
957
transform_invoke ("2D Transforming", <<CODE);
849
958
matrix.coeff[0][0] = coeff_0_0;
850
959
matrix.coeff[0][1] = coeff_0_1;
851
960
matrix.coeff[0][2] = coeff_0_2;
870
979
(depending on the 'interpolate' parameter).
982
&joao_pdb_misc('2004', '2.2');
985
{ name => 'drawable', type => 'drawable',
986
desc => 'The affected drawable' },
877
987
{ name => 'coeff_0_0', type => 'float',
878
988
desc => 'coefficient (0,0) of the transformation matrix' },
879
989
{ name => 'coeff_0_1', type => 'float',
892
1002
desc => 'coefficient (2,1) of the transformation matrix' },
893
1003
{ name => 'coeff_2_2', type => 'float',
894
1004
desc => 'coefficient (2,2) of the transformation matrix' },
895
&transform_options_default_args
898
@outargs = ( &drawable_out_arg('transformed') );
900
transform_default_invoke ("2D Transform...", <<CODE);
1005
{ name => 'interpolate', type => 'boolean',
1006
desc => 'Whether to use interpolation and supersampling' },
1007
{ name => 'clip_result', type => 'enum GimpTransformResize',
1008
desc => 'How to clip results' }
1012
{ name => 'drawable', type => 'drawable', no_declare => 1,
1013
desc => 'The transformed drawable' }
1016
transform_default_invoke ("2D Transforming", <<CODE);
901
1017
matrix.coeff[0][0] = coeff_0_0;
902
1018
matrix.coeff[0][1] = coeff_0_1;
903
1019
matrix.coeff[0][2] = coeff_0_2;