App/Chart/Gtk2/Ex/GtkGCBits.pm untested

filter: Statementstmt 0.0% 0 / 17 Branchbran n/a Conditioncond 0.0% 0 / 2 MC/DCmcdc 0.0% 0 / 1 Subroutinesub 0.0% 0 / 5 Podpod 0.0% 0 / 1 totaltotal 0.0% 0 / 26 CC 1 SCAR 6.9
CC
1
Cov
0%
get_for_widget
2.0
BEGIN
2.0
BEGIN
2.0
CRAP 2.0
1 # Copyright 2007, 2008, 2010 Kevin Ryde
2  
3 # This file is part of Chart.
4 #
5 # Chart is free software; you can redistribute it and/or modify
6 # it under the terms of the GNU General Public License as published by the
7 # Free Software Foundation; either version 3, or (at your option) any later
8 # version.
9 #
10 # Chart is distributed in the hope that it will be useful, but
11 # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
12 # or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
13 # for more details.
14 #
15 # You should have received a copy of the GNU General Public License along
16 # with Chart. If not, see <http://www.gnu.org/licenses/>.
17  
18 package App::Chart::Gtk2::Ex::GtkGCBits;
19 use strict;
20 use warnings;
21 use Carp;
22 use Gtk2;
23  
24 sub get_for_widget {
25 my $class = shift;
26 my $widget = shift;
27 my $window = $widget->window || croak 'Widget not realized';
28 return Gtk2::GC->get ($window->get_depth, $widget->get_colormap, @_);
29 }
30  
31 1;
32 __END__