Download Shareware and Freeware Software for Windows, Linux, Macintosh, PDA

line Home  |  About Us  |  Link To Us  |  FAQ  |  Contact

Serving Software Downloads in 976 Categories, Downloaded 29.638.085 Times

Tk::Image::Calculation 0.04

  Date Added: September 24, 2010  |  Visits: 741

Tk::Image::Calculation

Report Broken Link
Printer Friendly Version


Product Homepage
Download (77 downloads)



Tk::Image::Calculation is a Perl extension for graphic calculations. SYNOPSIS #------------------------------------------------- use Tk::Image::Calculation; my @points_oval = (10, 10, 30, 50); my @points_circle = (20, 20, 60, 60); my @points_polygon = (136, 23, 231, 55, 463, 390, 338, 448, 182, 401, 148, 503, 15, 496, 9, 87); # polygon = (x1, y1, x2, y2, x3, y3, x4, y4, ... and so on) #------------------------------------------------- my $cal = Tk::Image::Calculation->new(); my $ref_array = $cal->GetPointsInOval(@points_oval); # my $ref_array = $cal->GetPointsOutOval(@points_oval); # my $ref_array = $cal->GetPointsInCircle(@points_circle); # my $ref_array = $cal->GetPointsOutCircle(@points_circle); # my $ref_array = $cal->GetPointsInPolygon(@points_polygon); # my $ref_array = $cal->GetPointsOutPolygon(@points_polygon); for(@{$ref_array}) { print("x:$_->[0] y:$_->[1]n"); } my $ref_array1 = $cal->GetLinesInOval(@points_oval); # my $ref_array1 = $cal->GetLinesOutOval(@points_oval); # my $ref_array1 = $cal->GetLinesInCircle(@points_circle); # my $ref_array1 = $cal->GetLinesOutCircle(@points_circle); # my $ref_array1 = $cal->GetLinesInPolygon(@points_polygon); # my $ref_array1 = $cal->GetLinesOutPolygon(@points_polygon); for(@{$ref_array1}) { print("x1:$_->[0] y1:$_->[1] x2:$_->[2] y2:$_->[3]n"); } #------------------------------------------------- my $cal1 = Tk::Image::Calculation->new( -points => @points_circle, -form => "circle", # or "oval" or "polygon" ); for my $subset ("points_inside", "points_outside") { print("n$subset circle : n"); for(@{$cal1->{$subset}}) { print("x:$_->[0] y:$_->[1]n"); } } for my $subset ("lines_inside", "lines_outside") { print("n$subset circle : n"); for(@{$cal1->{$subset}}) { print("x1:$_->[0] y1:$_->[1] x2:$_->[2] y2:$_->[3]n"); } } #------------------------------------------------- my $cal2 = Tk::Image::Calculation->new( -points => @points_polygon, # need three points at least -form => "polygon", -subset => "lines_outside", # defaults to "all" ); use Tk; my $mw = MainWindow->new(); my $canvas = $mw->Canvas( -width => 800, -height => 600, )->pack(); for(@{$cal2->{lines_outside}}) { $canvas->createLine(@{$_}); } MainLoop(); #------------------------------------------------- use Tk; use Tk::JPEG; my $mw = MainWindow->new(); my $image = $mw->Photo(-file => "test.jpg"); my $cal3 = Tk::Image::Calculation->new(); my $ref_points = $cal3->GetPointsOutCircle(50, 50, 150, 150); $image->put("#FFFFFF", -to => $_->[0], $_->[1]) for(@{$ref_points}); $image->write("new.jpg", -from => 50, 50, 150, 150); #------------------------------------------------- This module calculates points and lines inside or outside from simple graphic objects. At this time possible objects: "oval", "circle", "polygon".

Requirements: No special requirements
Platforms: Linux
Keyword: Circle Libraries Oval Points Polygon Programming Ref Tkimagecalculation
Users rating: 0/10

License: Freeware Size: 7.17 KB
USER REVIEWS
More Reviews or Write Review


TK::IMAGE::CALCULATION RELATED
Development Tools  -  Minimum Enclosing Circle 1.0
This code takes an input of a set of given (x,y) points in the Cartesian coordinates and returns the center and radius of the minimum circle enclosing the points.This code is based on that of Yazan Ahed, and contains no changes in the algorithm...
10 KB  
Libraries  -  Lazarus x32 0.9.30.2
The Lazarus IDE application was designed to be a stable and feature rich visual programming environment for the FreePascal Compiler. It supports the creation of self-standing graphical and console applications. Lazarus is the class libraries for...
64.5 MB  
Libraries  -  Lazarus x64 0.9.30.2
The Lazarus IDE application was designed to be a stable and feature rich visual programming environment for the FreePascal Compiler. It supports the creation of self-standing graphical and console applications. Lazarus is the class libraries for...
75.5 MB  
Libraries  -  Lazarus for Mac OS X 0.9.30.2
The Lazarus IDE application was designed to be a stable and feature rich visual programming environment for the FreePascal Compiler. It supports the creation of self-standing graphical and console applications. Lazarus is the class libraries for...
121.3 MB  
Libraries  -  Lazarus for Linux 0.9.30.2
The Lazarus IDE application was designed to be a stable and feature rich visual programming environment for the FreePascal Compiler. It supports the creation of self-standing graphical and console applications. Lazarus is the class libraries for...
53.6 MB  
Development Tools  -  BEM Code for 2D Pulsating Cylinder 1.0
This is the code for calculating solid angle C, surface pressure ps, and field pressure pf coming out from a pulsating cylinder with radius of r and normal velocity vn in an unbounded two dimensional acoustic domain using the solution of Helmholtz...
10 KB  
Utilities  -  Fuse4X 0.9.0
Fuse4X allows you to extend Mac OS X's native file handling capabilities via 3rd-party file systems. It can be used as a software building block other products. As a user, installing the Fuse4X software package will let you use any...
481.28 KB  
Teaching Tools  -  Grass GIS for Mac OS X 6.4.1-3
Commonly referred to as GRASS, this is a free Geographic Information System (GIS) used for geospatial data management and analysis, image processing, graphics/maps production, spatial modeling, and visualization. GRASS is currently used in...
59 MB  
Libraries  -  Wx::Polygon 0.06
Wx::Polygon can draw and manipulate polygons for wxPerl. ABSTRACT This module provides functions for manipulating polygons in wxPerl. new( POLYGON = (Wx::Point,...) | ELLIPSE => (x_offset,y_offset,width,heigth) ) --> Wx::Polygon>...
6.14 KB  
Libraries  -  GNU Classpath 0.95
GNU Classpath (essential libraries for Java) is a project to create free core class libraries for use with virtual machines and compilers for the Java programming language. GNU Classpath project includes all native methods and core classes...
6.5 MB  
NEW DOWNLOADS IN PROGRAMMING, LIBRARIES
Programming  -  FLEX-db Digital Asset Manager 3.0.9
FLEX-db - an enterprise Digital Asset Manager (DAM). It ingests and links metadata with files, creates thumbnails, and processes files using business rules. FLEX-db has a JSP client, Java app server for file input and output and an EJB metadata...
21.57 MB  
Programming  -  Libicom 0.9.0
The libicom library is a character based dynamicly linked library for Linux. It is used to remotely control the Icom IC-R8500 wide band receiver via an RS232 link. All call and return parameters to the control functions are character string based....
20.48 KB  
Programming  -  dotdesktop 0.3
Dotdesktop library provides ability to parse desktop entry file and access the information in a convenient way. Desktop entry file format is defined by freedesktop.org, it is used to describe information about an application such as the name and...
327.68 KB  
Programming  -  Cedalion for Linux 0.2.6
Cedalion is a programming language that allows its users to add new abstractions and define (and use) internal DSLs. Its innovation is in the fact that it uses projectional editing to allow the new abstractions to have no syntactic limitations.
471.04 KB  
Programming  -  libyasl 0.2
Libyasl is a C++ class library to easily realize TCP/UDP/Multicast clientsand servers in IPv4 and IPv6 environments under GNU/Linux systems.
143.36 KB  
Libraries  -  wolfSSL 3.11.0
The wolfSSL embedded SSL/TLS library is a lightweight SSL library written in ANSI standard C and targeted for embedded and RTOS environments - primarily because of its small size, speed, and feature set. It is commonly used in standard operating...
2.73 MB  
Libraries  -  EuGTK 4.8.9
Makes it easy to develop good- looking, fast, cross-platform programs that run on Linux, OS X, and Windows. Euphoria is a very fast interpreted/compiled language with straight-forward syntax. EuGTK allows programming in a clean, object-oriented...
10.68 MB  
Libraries  -  Linux User Group Library Manager 1.0
The LUG Library Manager is a project to help Linux User Groups start their own library. A LUG library is helpful to the community at large because it increases access to information, and gives everyone the opportunity to become more knowledgeable.
5.35 KB  
Libraries  -  Module::MakefilePL::Parse 0.12
Module::MakefilePL::Parse is a Perl module to parse required modules from Makefile.PL. SYNOPSIS use Module::MakefilePL::Parse; open $fh, Makefile.PL; $parser = Module::MakefilePL::Parse->new( join("", ) ); $info = $parser->required;...
8.19 KB  
Libraries  -  sqlpp 0.06
sqlpp Perl package is a SQL preprocessor. sqlpp is a conventional cpp-alike preprocessor taught to understand SQL ( PgSQL, in particular) syntax specificities. In addition to the standard #define/#ifdef/#else/#endif cohort, provides also...
10.24 KB