Tk::Image::Cut - Perl extension for a graphic user interface to cut pictures. |
Tk::Image::Cut - Perl extension for a graphic user interface to cut pictures.
use Tk::Image::Cut; my $mw = MainWindow->new(); $mw->title("Picture-Cutter"); $mw->geometry("+5+5"); my $cut = $mw->Cut()->grid(); $mw->Button( -text => "Exit", -command => sub { exit(); }, )->grid(); for(qw/ ButtonSelectImage LabelShape bEntryShape ButtonColor LabelWidthOut EntryWidthOut LabelHeightOut EntryHeightOut ButtonIncrease ButtonReduce LabelNameOut EntryNameOut ButtonCut /) { $cut->Subwidget($_)->configure( -font => "{Times New Roman} 10 {bold}", ); } for(qw/ bEntryShape EntryWidthOut EntryHeightOut EntryNameOut Canvas /) { $cut->Subwidget($_)->configure( -background => "#FFFFFF", ); } for(qw/ bEntryShape EntryWidthOut EntryHeightOut /) { $cut->Subwidget($_)->configure( -width => 6, ); } $cut->Subwidget("EntryNameOut")->configure( -width => 40, ); $cut->Subwidget("Canvas")->configure( -width => 1000, -height => 800, ); MainLoop();
Perl extension for a graphic user interface to cut pictures. The module is a mixed widget from Buttons, Labels, BrowseEntry, Entrys and Canvas widgets. I hope the graphic user interface is simple enough to be understood without great declarations. It can be used as an independent application or just like how any other widget. Try out the test.pl program.You can select between four cutting forms. "rectangle", "oval", "circle" or "polygon" In order to cut out pictures in circular form or ovally click with the left mouse button onto the upper left corner and hold the button pressed while the mouse is moved. In order to cut pictures in polygon form you click with the left mouse button on the first point and draw the mouse to the next point. If you have drawn the last point you click with the right mouse button.
You can use all standard widget options.
use Tk; use Tk::Image::Cut; my $mw = MainWidow->new(); my $cut = $mw->Cut( -aperturewidth => 2, -aperturecolor => "#0000FF", -shape => "oval", -zoom => 2, -shrink => 1 )->pack(); $cut->Subwidget("Canvas")->configure( -width => 1000, -height => 800, ); MainLoop();
=head2 EXPORT
None by default.
Tk::Image Tk::Photo Tk::Image::Calculation http://www.planet-interkom.de/t.knorr/index.html
image, photo, cut, picture, widget
Maybe you'll find some. Please let me know.
Torsten Knorr, <torstenknorr@tiscali.de>
Copyright (C) 2006 by Torsten Knorr
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.9.2 or, at your option, any later version of Perl 5 you may have available.
Tk::Image::Cut - Perl extension for a graphic user interface to cut pictures. |