NAME
FLTK::Rectangle - Base class for Widgets, Windows, Monitors, and just about everything else you can see
Description
TODO
Functions
b
baseline_y
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
move_b
move_r
move_x
move_y
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( )
andy( )
to zero, and setsw( )
andh( )
. 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 ifw( )
andh( )
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
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
.
Author
Sanko Robinson <sanko@cpan.org> - http://sankorobinson.com/
License and Legal
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.