Made Windows not use Gamma Functions
[sdlgit/SDL_perl.git] / lib / SDL / PixelFormat.pm
CommitLineData
71c323f9 1package SDL::PixelFormat;
2use strict;
3use warnings;
4require Exporter;
5require DynaLoader;
6our @ISA = qw(Exporter DynaLoader);
7bootstrap SDL::PixelFormat;
8
91;
10
11__END__
12
13=pod
14
15=head1 NAME
16
17SDL::PixelFormat - Stores surface format information
18
19=head1 SYNOPSIS
20
af0bff37 21 my $surface = SDL::Surface->new( ...
22 $surface->format; #this returns the PixelFormat object attached to this surface
23
24PixelFormat is only created in a C<SDL::Surface>. This module only provides getters to the surface's pixelformat. Later on we will provide setting capability.
25
26
71c323f9 27=head1 DESCRIPTION
28
29An C<SDL::PixelFormat > stores surface format information
30
31=head1 METHODS
32
60891a9e 33=head2 palette
34
35 $surface->format->palette;
36
37Returns the C<SDL_Palette> and L<SDL::Palette> of the format of the surface.
af0bff37 38
39=head2 BitsPerPixel
40
41 $surface->format->BitsPerPixel;
42
43The number of bits used to represent each pixel in a surface. Usually 8, 16, 24 or 32. (1 to 7 are not allowed when creating a surface or open a video mode
44
45=head2 BytesPerPixel
46
47 $surface->format->BytesPerPixel;
48
49The number of bytes used to represent each pixel in a surface. Usually one to four.
50
51=head2 [RGBA]loss
52
53 $surface->format->Rloss; #red loss
54 $surface->format->Bloss; #blue loss
55 $surface->format->Gloss; #green loss
56 $surface->format->Aloss; #alpha loss
57
58Precision loss of each color component (2[RGBA]loss)
59
60=head2 [RGBA]shift
61
62 $surface->format->Rshift; #red shift
63 $surface->format->Bshift; #blue shift
64 $surface->format->Gshift; #green shift
65 $surface->format->Ashift; #alpha shift
66
67Binary left shift of each color component in the pixel value
68
69
70=head2 [RGBA]mask
71
72 $surface->format->Rmask; #red mask
73 $surface->format->Bmask; #blue mask
74 $surface->format->Gmask; #green mask
75 $surface->format->Amask; #alpha mask
76
77Binary left shift of each color component in the pixel value
78
79=head2 colorkey
80
81 $surface->format->colorkey;
82
83Pixel value of transparent pixels.
84
85=head2 alpha
86
87 $surface->format->alpha;
88
89Overall surface alpha value
90
91
92
71c323f9 93=head1 SEE ALSO
94
95L<SDL::Surface>
96
97=cut