NAME

Normalize.pm - fitting strokes into a rectangle


SYNOPSIS

  use Normalize;
  Normalize::setup(width=>1,height=>1,maxrect=>3);
  @stroke=qw(x0 y0 x1 y1 x2 y2 ...);
  Normalize::normalize(\@stroke);


DESCRIPTION

This module allows to rescale a stroke to fit into a rectangle. Usually you'll want a 1x1 square, but nothing stops you to ask for a 3.14x2.72 ...


FUNCTIONS

sub setup

Call this function to set the size of the normalization rectangle, or the maximum "skewedness" allowed.

Parameters are passed as a hash (see /SYNOPSIS).

For details on maxrect see normalize.

sub normalize

This function normalizes (in place) the coordinate list (i.e. stroke) passed in as reference.

It works this way:


LICENSE

This code is copyright (C) 2002 Gianni Ceccarelli Released under the GNU LGPL, version 2.1


Last updated: Thu Apr 11 13:46:33 2002