… | |
… | |
5 | |
5 | |
6 | use base KGS::Listener::Game; |
6 | use base KGS::Listener::Game; |
7 | use base KGS::Game; |
7 | use base KGS::Game; |
8 | |
8 | |
9 | use base gtk::widget; |
9 | use base gtk::widget; |
|
|
10 | |
|
|
11 | use POSIX qw(ceil); |
10 | |
12 | |
11 | sub new { |
13 | sub new { |
12 | my $self = shift; |
14 | my $self = shift; |
13 | $self = $self->SUPER::new(@_); |
15 | $self = $self->SUPER::new(@_); |
14 | |
16 | |
… | |
… | |
204 | for ([MARK_SMALL_B, $::black_img[$rand % @::black_img]], |
206 | for ([MARK_SMALL_B, $::black_img[$rand % @::black_img]], |
205 | [MARK_SMALL_W, $::white_img[$rand % @::white_img]]) { |
207 | [MARK_SMALL_W, $::white_img[$rand % @::white_img]]) { |
206 | my ($mask, $img) = @$_; |
208 | my ($mask, $img) = @$_; |
207 | if ($mark & $mask) { |
209 | if ($mark & $mask) { |
208 | $img->composite ( |
210 | $img->composite ( |
209 | $base, ($size / 4) x2, (int ($size / 2 + 0.5)) x2, ($size / 4) x2, |
211 | $base, (ceil ($size / 4)) x2, (ceil ($size / 2)) x2, (ceil ($size / 4)) x2, |
210 | $size / $img->get_width / 2, $size / $img->get_height / 2, |
212 | $size / $img->get_width / 2, $size / $img->get_height / 2, |
211 | $::config->{speed} ? INTERP_NEAREST : INTERP_BILINEAR, 192 |
213 | $::config->{speed} ? INTERP_NEAREST : INTERP_BILINEAR, 224 |
212 | ); |
214 | ); |
213 | } |
215 | } |
214 | } |
216 | } |
215 | |
217 | |
216 | # and lastly any markers |
218 | # and lastly any markers |