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();
The margin color of the aperture. default: "#00FF00" (green)
The border of the aperture. default: 4
The shape of the aperture "rectangle", "oval", "circle" or "polygon". default: "rectangle"
default: 1
Selecting the picture to be worked on.
You can select between three cutting forms. "rectangle", "oval", "circle" or "polygon" default: "rectangle"
Define the background color for the picture. Is no color indicated then transparent is used.
Shows the width of the new picture.
Shows the height of the new picture.
Extend the new picture.
Reduce the new picture.
Shows the name of the new picture. Of course this can be changed any.
Creates the new picture.
Shows the picture.
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.
4 POD Errors
The following errors were encountered while parsing the POD:
'=item' outside of any '=over'
You forgot a '=back' before '=head1'
You forgot a '=back' before '=head2'
To install Tk::Image::Cut, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Tk::Image::Cut
CPAN shell
perl -MCPAN -e shell install Tk::Image::Cut
For more information on module installation, please visit the detailed CPAN module installation guide.