~kalon33/corsix-th/master

« back to all changes in this revision

Viewing changes to agg/include/util/agg_color_conv_rgb16.h

  • Committer: corsixth.bot at gmail
  • Date: 2014-03-31 23:30:23 UTC
  • Revision ID: svn-v4:c39591fa-788f-11de-a72b-d90af8dea425:trunk:2687
Remove trailing whitespaces in .h, .cpp, .c and .lua files.

Show diffs side-by-side

added added

removed removed

Lines of Context:
2
2
// Anti-Grain Geometry - Version 2.4
3
3
// Copyright (C) 2002-2005 Maxim Shemanarev (http://www.antigrain.com)
4
4
//
5
 
// Permission to copy, use, modify, sell and distribute this software 
6
 
// is granted provided this copyright notice appears in all copies. 
 
5
// Permission to copy, use, modify, sell and distribute this software
 
6
// is granted provided this copyright notice appears in all copies.
7
7
// This software is provided "as is" without express or implied
8
8
// warranty, and with no claim as to its suitability for any purpose.
9
9
//
13
13
//          http://www.antigrain.com
14
14
//----------------------------------------------------------------------------
15
15
//
16
 
// This part of the library has been sponsored by 
 
16
// This part of the library has been sponsored by
17
17
// Liberty Technology Systems, Inc., visit http://lib-sys.com
18
18
//
19
19
// Liberty Technology Systems, Inc. is the provider of
20
20
// PostScript and PDF technology for software developers.
21
 
// 
 
21
//
22
22
//----------------------------------------------------------------------------
23
23
//
24
24
// A set of functors used with color_conv(). See file agg_color_conv.h
41
41
    class color_conv_gray16_to_gray8
42
42
    {
43
43
    public:
44
 
        void operator () (int8u* dst, 
 
44
        void operator () (int8u* dst,
45
45
                          const int8u* src,
46
46
                          unsigned width) const
47
47
        {
59
59
    template<int I1, int I3> class color_conv_rgb24_rgb48
60
60
    {
61
61
    public:
62
 
        void operator () (int8u* dst, 
 
62
        void operator () (int8u* dst,
63
63
                          const int8u* src,
64
64
                          unsigned width) const
65
65
        {
85
85
    template<int I1, int I3> class color_conv_rgb48_rgb24
86
86
    {
87
87
    public:
88
 
        void operator () (int8u* dst, 
 
88
        void operator () (int8u* dst,
89
89
                          const int8u* src,
90
90
                          unsigned width) const
91
91
        {
111
111
    template<int R, int B> class color_conv_rgbAAA_rgb24
112
112
    {
113
113
    public:
114
 
        void operator () (int8u* dst, 
 
114
        void operator () (int8u* dst,
115
115
                          const int8u* src,
116
116
                          unsigned width) const
117
117
        {
138
138
    template<int R, int B> class color_conv_rgbBBA_rgb24
139
139
    {
140
140
    public:
141
 
        void operator () (int8u* dst, 
 
141
        void operator () (int8u* dst,
142
142
                          const int8u* src,
143
143
                          unsigned width) const
144
144
        {
163
163
    template<int B, int R> class color_conv_bgrABB_rgb24
164
164
    {
165
165
    public:
166
 
        void operator () (int8u* dst, 
 
166
        void operator () (int8u* dst,
167
167
                          const int8u* src,
168
168
                          unsigned width) const
169
169
        {
188
188
    template<int I1, int I2, int I3, int I4> class color_conv_rgba64_rgba32
189
189
    {
190
190
    public:
191
 
        void operator () (int8u* dst, 
 
191
        void operator () (int8u* dst,
192
192
                          const int8u* src,
193
193
                          unsigned width) const
194
194
        {
197
197
                *dst++ = int8u(((int16u*)src)[I1] >> 8);
198
198
                *dst++ = int8u(((int16u*)src)[I2] >> 8);
199
199
                *dst++ = int8u(((int16u*)src)[I3] >> 8);
200
 
                *dst++ = int8u(((int16u*)src)[I4] >> 8); 
 
200
                *dst++ = int8u(((int16u*)src)[I4] >> 8);
201
201
                src += 8;
202
202
            }
203
203
            while(--width);
228
228
    template<int I1, int I2, int I3, int A> class color_conv_rgb24_rgba64
229
229
    {
230
230
    public:
231
 
        void operator () (int8u* dst, 
 
231
        void operator () (int8u* dst,
232
232
                          const int8u* src,
233
233
                          unsigned width) const
234
234
        {
238
238
                d[I1] = (src[0] << 8) | src[0];
239
239
                d[I2] = (src[1] << 8) | src[1];
240
240
                d[I3] = (src[2] << 8) | src[2];
241
 
                d[A]  = 65535; 
 
241
                d[A]  = 65535;
242
242
                d   += 4;
243
243
                src += 3;
244
244
            }
261
261
    template<int R, int B> class color_conv_rgb24_gray16
262
262
    {
263
263
    public:
264
 
        void operator () (int8u* dst, 
 
264
        void operator () (int8u* dst,
265
265
                          const int8u* src,
266
266
                          unsigned width) const
267
267
        {