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

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

Serving Software Downloads in 956 Categories, Downloaded 50.138.307 Times

Tk::Image::Calculation 0.04

  Date Added: September 24, 2010  |  Visits: 1.109

Tk::Image::Calculation

Report Broken Link
Printer Friendly Version


Product Homepage
Download (97 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  -  Chilkat Class Libraries for Java 9.2.1
The full suite of Chilkat components & libraries are now available for the Java programming language. Commercially licensed components include: Email (POP3 / SMTP) IMAP Zip, GZip, and Unix Compress Encryption MIME and S/MIME FTP HTTP MHT...
 
NEW DOWNLOADS IN PROGRAMMING, LIBRARIES
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  -  Math::GMPf 0.29
Math::GMPf - perl interface to the GMP library's floating point (mpf) functions.
30.72 KB  
Programming  -  Net::Wire10 1.08
Net::Wire10 is a Pure Perl connector that talks to Sphinx, MySQL and Drizzle servers. Net::Wire10 implements the low-level network protocol, alias the MySQL wire protocol version 10, necessary for talking to one of the aforementioned...
30.72 KB  
Programming  -  logilab-common 0.56.2
a bunch of modules providing low level functionnalities shared among some python projects devel Please note that some of the modules have some extra dependencies. For instance, logilab.common.db will require a db-api 2.0 compliant...
174.08 KB  
Programming  -  OpenSSL for linux 1.0.0a
The OpenSSL Project is a collaborative effort to develop a robust, commercial-grade, full-featured, and Open Source toolkit implementing the Secure Sockets Layer (SSL v2/v3) and Transport Layer Security (TLS v1) protocols as well as a...
3.83 MB  
Libraries  -  wolfSSL 4.0.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...
3.88 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