
FLTK::Rectangle - Base class for Widgets, Windows, Monitors, and just about everything else you can see

TODO

b baseline_y my $baseline = $rectangle->baseline_y( );Where to put baseline to center current font nicely.
center_x my $x = $rectangle->center_x( );Integer center position.
Rounded to the left if w( ) is odd.
center_y my $y = $rectangle->center_y( );Integer center position.
Rounded to lower y if h( ) is odd.
contains my $can_has = $rectangle->contains( $x,
$y );True if rectangle contains the pixel who's upper-left corner is at $x,
$y.
empty h my $h = $rectangle->h( );Distance between top and bottom edges.
$rectangle->h( $value );Change h( ) by moving the bottom edge.
y( ) does not change.
inset $rectangle->inset( $d );Move all edges in by $d.
See also Symbol::inset( ).
intersect merge move $rectangle->move( $x,
$y );Move entire rectangle by given distance in $x and $y.
move_b move_r move_x $rectangle->move_x( $d );Add $d to x( ) without changing r( ) (it reduces w( ) by $d).
move_y $rectangle->move_y( $d );Add $d to y( ) without changing b( ) (it reduces h( ) by $d).
new my $self = $rectangle->new( );This constructor does not put anything into the fields!
You can either call set( ) or just modify the x,
y,
w,
and h variables directly.
my $self = $rectangle->new( $x,
$y,
$w,
$h );my $self = $rectangle->new( $w,
$h );Constructor that sets x( ) and y( ) to zero,
and sets w( ) and h( ).
my $clone = $rectangle->new( $original );Copy constructor.
my $clone = $rectangle->new( $original,
$w,
$h,
$flags );Constructor that calls set( ).
not_empty my $not_empty = $rectangle->not_empty( );Not exactly the same as !empty().
Returns true if w( ) and h( ) are both greater than zero.
r set $rectangle->set( $x,
$y,
$w,
$h );$rectangle->set( $rect,
$w,
$h,
$flags );Sets x,
y,
w,
h so that's it's centered or aligned (if $flags != 0) inside the source $rect.
set_b set_r set_x set_y w my $w = $rectangle->w( );Distance between left and right edges.
$rectangle->w( $value );x my $x = $rectangle->x( );Left edge.
$rectangle->x( $value );Move the rectangle so that the left edge is at $value.
y my $y = $rectangle->y( );Top edge.
$rectangle->y( $value );Move the rectangle so that the top edge is at $value.

Sanko Robinson <sanko@cpan.org> - http://sankorobinson.com/

Copyright (C) 2008-2010 by Sanko Robinson <sanko@cpan.org>
This program is free software; you can redistribute it and/or modify it under the terms of The Artistic License 2.0. See the LICENSE file included with this distribution or notes on the Artistic License 2.0 for clarification.
When separated from the distribution, all original POD documentation is covered by the Creative Commons Attribution-Share Alike 3.0 License. See the clarification of the CCA-SA3.0.