… | |
… | |
997 | my $x = |
997 | my $x = |
998 | $self->{align} < 0 ? $self->{padding} |
998 | $self->{align} < 0 ? $self->{padding} |
999 | : $self->{align} > 0 ? $self->{w} - $tex->{w} - $self->{padding} |
999 | : $self->{align} > 0 ? $self->{w} - $tex->{w} - $self->{padding} |
1000 | : ($self->{w} - $tex->{w}) * 0.5; |
1000 | : ($self->{w} - $tex->{w}) * 0.5; |
1001 | |
1001 | |
1002 | glTranslate $x, $self->{padding}, 0; |
1002 | glTranslate $x, ($self->{h} - $tex->{h}) * 0.5, 0; |
1003 | $tex->draw_quad (0, 0); |
1003 | $tex->draw_quad (0, 0); |
1004 | |
1004 | |
1005 | glDisable GL_TEXTURE_2D; |
1005 | glDisable GL_TEXTURE_2D; |
1006 | glDisable GL_BLEND; |
1006 | glDisable GL_BLEND; |
1007 | } |
1007 | } |