Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(69)

Side by Side Diff: core/include/fxge/fx_dib.h

Issue 1171733003: Remove typdefs for pointer types in fx_system.h (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Manual fixes. Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « core/include/fxge/fpf.h ('k') | core/include/fxge/fx_font.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 PDFium Authors. All rights reserved. 1 // Copyright 2014 PDFium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
6 6
7 #ifndef CORE_INCLUDE_FXGE_FX_DIB_H_ 7 #ifndef CORE_INCLUDE_FXGE_FX_DIB_H_
8 #define CORE_INCLUDE_FXGE_FX_DIB_H_ 8 #define CORE_INCLUDE_FXGE_FX_DIB_H_
9 9
10 #include "../fxcrt/fx_ext.h" 10 #include "../fxcrt/fx_ext.h"
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 #define FXARGB_A(argb) ((uint8_t)((argb) >> 24)) 93 #define FXARGB_A(argb) ((uint8_t)((argb) >> 24))
94 #define FXARGB_R(argb) ((uint8_t)((argb) >> 16)) 94 #define FXARGB_R(argb) ((uint8_t)((argb) >> 16))
95 #define FXARGB_G(argb) ((uint8_t)((argb) >> 8)) 95 #define FXARGB_G(argb) ((uint8_t)((argb) >> 8))
96 #define FXARGB_B(argb) ((uint8_t)(argb)) 96 #define FXARGB_B(argb) ((uint8_t)(argb))
97 #define FXARGB_MAKE(a,r,g,b) (((FX_DWORD)(a) << 24) | ((r) << 16) | ((g) << 8) | (b)) 97 #define FXARGB_MAKE(a,r,g,b) (((FX_DWORD)(a) << 24) | ((r) << 16) | ((g) << 8) | (b))
98 #define FXARGB_MUL_ALPHA(argb, alpha) (((((argb) >> 24) * (alpha) / 255) << 24) | ((argb) & 0xffffff)) 98 #define FXARGB_MUL_ALPHA(argb, alpha) (((((argb) >> 24) * (alpha) / 255) << 24) | ((argb) & 0xffffff))
99 #define FXRGB2GRAY(r,g,b) (((b) * 11 + (g) * 59 + (r) * 30) / 100) 99 #define FXRGB2GRAY(r,g,b) (((b) * 11 + (g) * 59 + (r) * 30) / 100)
100 #define FXCMYK2GRAY(c,m,y,k) (((255-(c)) * (255-(k)) * 30 + (255-(m)) * (255-(k) ) * 59 + (255-(y)) * (255-(k)) * 11) / 25500) 100 #define FXCMYK2GRAY(c,m,y,k) (((255-(c)) * (255-(k)) * 30 + (255-(m)) * (255-(k) ) * 59 + (255-(y)) * (255-(k)) * 11) / 25500)
101 #define FXDIB_ALPHA_MERGE(backdrop, source, source_alpha) (((backdrop) * (255-(s ource_alpha)) + (source)*(source_alpha))/255) 101 #define FXDIB_ALPHA_MERGE(backdrop, source, source_alpha) (((backdrop) * (255-(s ource_alpha)) + (source)*(source_alpha))/255)
102 #define FXDIB_ALPHA_UNION(dest, src) ((dest) + (src) - (dest)*(src)/255) 102 #define FXDIB_ALPHA_UNION(dest, src) ((dest) + (src) - (dest)*(src)/255)
103 #define FXCMYK_GETDIB(p) ((((FX_LPBYTE)(p))[0] << 24 | (((FX_LPBYTE)(p))[1] << 1 6) | (((FX_LPBYTE)(p))[2] << 8) | ((FX_LPBYTE)(p))[3])) 103 #define FXCMYK_GETDIB(p) ((((uint8_t*)(p))[0] << 24 | (((uint8_t*)(p))[1] << 16) | (((uint8_t*)(p))[2] << 8) | ((uint8_t*)(p))[3]))
104 #define FXCMYK_SETDIB(p, cmyk) ((FX_LPBYTE)(p))[0] = (uint8_t)((cmyk) >> 24), \ 104 #define FXCMYK_SETDIB(p, cmyk) ((uint8_t*)(p))[0] = (uint8_t)((cmyk) >> 24), \
105 ((FX_LPBYTE)(p))[1] = (uint8_t)((cmyk) >> 16), \ 105 ((uint8_t*)(p))[1] = (uint8_t)((cmyk) >> 16), \
106 ((FX_LPBYTE)(p))[2] = (uint8_t)((cmyk) >> 8), \ 106 ((uint8_t*)(p))[2] = (uint8_t)((cmyk) >> 8), \
107 ((FX_LPBYTE)(p))[3] = (uint8_t)(cmyk)) 107 ((uint8_t*)(p))[3] = (uint8_t)(cmyk))
108 #define FXARGB_GETDIB(p) ((((FX_LPBYTE)(p))[0]) | (((FX_LPBYTE)(p))[1] << 8) | ( ((FX_LPBYTE)(p))[2] << 16) | (((FX_LPBYTE)(p))[3] << 24)) 108 #define FXARGB_GETDIB(p) ((((uint8_t*)(p))[0]) | (((uint8_t*)(p))[1] << 8) | ((( uint8_t*)(p))[2] << 16) | (((uint8_t*)(p))[3] << 24))
109 #define FXARGB_SETDIB(p, argb) ((FX_LPBYTE)(p))[0] = (uint8_t)(argb), \ 109 #define FXARGB_SETDIB(p, argb) ((uint8_t*)(p))[0] = (uint8_t)(argb), \
110 ((FX_LPBYTE)(p))[1] = (uint8_t)((argb) >> 8), \ 110 ((uint8_t*)(p))[1] = (uint8_t)((argb) >> 8), \
111 ((FX_LPBYTE)(p))[2] = (uint8_t)((argb) >> 16), \ 111 ((uint8_t*)(p))[2] = (uint8_t)((argb) >> 16), \
112 ((FX_LPBYTE)(p))[3] = (uint8_t)((argb) >> 24) 112 ((uint8_t*)(p))[3] = (uint8_t)((argb) >> 2 4)
113 #define FXARGB_COPY(dest, src) *(FX_LPBYTE)(dest) = *(FX_LPBYTE)(src), \ 113 #define FXARGB_COPY(dest, src) *(uint8_t*)(dest) = *(uint8_t*)(src), \
114 *((FX_LPBYTE)(dest)+1) = *((FX_LPBYTE)(src)+1), \ 114 *((uint8_t*)(dest)+1) = *((uint8_t*)(src)+1), \
115 *((FX_LPBYTE)(dest)+2) = *((FX_LPBYTE)(src)+2), \ 115 *((uint8_t*)(dest)+2) = *((uint8_t*)(src)+2), \
116 *((FX_LPBYTE)(dest)+3) = *((FX_LPBYTE)( src)+3) 116 *((uint8_t*)(dest)+3) = *((uint8_t*)(sr c)+3)
117 #define FXCMYK_COPY(dest, src) *(FX_LPBYTE)(dest) = *(FX_LPBYTE)(src), \ 117 #define FXCMYK_COPY(dest, src) *(uint8_t*)(dest) = *(uint8_t*)(src), \
118 *((FX_LPBYTE)(dest)+1) = *((FX_LPBYTE)(src)+1), \ 118 *((uint8_t*)(dest)+1) = *((uint8_t*)(src)+1), \
119 *((FX_LPBYTE)(dest)+2) = *((FX_LPBYTE)(src)+2), \ 119 *((uint8_t*)(dest)+2) = *((uint8_t*)(src)+2), \
120 *((FX_LPBYTE)(dest)+3) = *((FX_LPBYTE)( src)+3) 120 *((uint8_t*)(dest)+3) = *((uint8_t*)(sr c)+3)
121 #define FXARGB_SETRGBORDERDIB(p, argb) ((FX_LPBYTE)(p))[3] = (uint8_t)(argb>>24) , \ 121 #define FXARGB_SETRGBORDERDIB(p, argb) ((uint8_t*)(p))[3] = (uint8_t)(argb>>24), \
122 ((FX_LPBYTE)(p))[0] = (uint8_t)((argb) >> 16), \ 122 ((uint8_t*)(p))[0] = (uint8_t)((argb) >> 16), \
123 ((FX_LPBYTE)(p))[1] = (uint8_t)((argb) >> 8), \ 123 ((uint8_t*)(p))[1] = (uint8_t)((argb) >> 8), \
124 ((FX_LPBYTE)(p))[2] = (uint8_t)(argb) 124 ((uint8_t*)(p))[2] = (uint8_t)(argb)
125 #define FXARGB_GETRGBORDERDIB(p) (((FX_LPBYTE)(p))[2]) | (((FX_LPBYTE)(p))[1] << 8) | (((FX_LPBYTE)(p))[0] << 16) | (((FX_LPBYTE)(p))[3] << 24) 125 #define FXARGB_GETRGBORDERDIB(p) (((uint8_t*)(p))[2]) | (((uint8_t*)(p))[1] << 8 ) | (((uint8_t*)(p))[0] << 16) | (((uint8_t*)(p))[3] << 24)
126 #define FXARGB_RGBORDERCOPY(dest, src) *((FX_LPBYTE)(dest)+3) = *((FX_LPBYTE)(sr c)+3), \ 126 #define FXARGB_RGBORDERCOPY(dest, src) *((uint8_t*)(dest)+3) = *((uint8_t*)(src) +3), \
127 *(FX_LPBYTE)(dest) = *((FX_LPBYTE)(src)+2), \ 127 *(uint8_t*)(dest) = *((uint8_t*)(src)+2), \
128 *((FX_LPBYTE)(dest)+1) = *((FX_LPBYTE)(src)+1), \ 128 *((uint8_t*)(dest)+1) = *((uint8_t*)(src)+1), \
129 *((FX_LPBYTE)(dest)+2) = *((FX_LPBYTE)(src) ) 129 *((uint8_t*)(dest)+2) = *((uint8_t*)(src))
130 #define FXARGB_TODIB(argb) (argb) 130 #define FXARGB_TODIB(argb) (argb)
131 #define FXCMYK_TODIB(cmyk) ((uint8_t)((cmyk) >> 24) | ((uint8_t)((cmyk) >> 16)) << 8 | ((uint8_t)((cmyk) >> 8)) << 16 | ((uint8_t)(cmyk) << 24)) 131 #define FXCMYK_TODIB(cmyk) ((uint8_t)((cmyk) >> 24) | ((uint8_t)((cmyk) >> 16)) << 8 | ((uint8_t)((cmyk) >> 8)) << 16 | ((uint8_t)(cmyk) << 24))
132 #define FXARGB_TOBGRORDERDIB(argb) ((uint8_t)(argb>>16) | ((uint8_t)(argb>>8)) < < 8 | ((uint8_t)(argb)) << 16 | ((uint8_t)(argb>>24) << 24)) 132 #define FXARGB_TOBGRORDERDIB(argb) ((uint8_t)(argb>>16) | ((uint8_t)(argb>>8)) < < 8 | ((uint8_t)(argb)) << 16 | ((uint8_t)(argb>>24) << 24))
133 #define FXGETFLAG_COLORTYPE(flag) (uint8_t)((flag)>>8) 133 #define FXGETFLAG_COLORTYPE(flag) (uint8_t)((flag)>>8)
134 #define FXGETFLAG_ALPHA_FILL(flag) (uint8_t)(flag) 134 #define FXGETFLAG_ALPHA_FILL(flag) (uint8_t)(flag)
135 #define FXGETFLAG_ALPHA_STROKE(flag) (uint8_t)((flag)>>16) 135 #define FXGETFLAG_ALPHA_STROKE(flag) (uint8_t)((flag)>>16)
136 #define FXSETFLAG_COLORTYPE(flag, val) flag = (((val)<<8)|(flag&0xffff0 0ff)) 136 #define FXSETFLAG_COLORTYPE(flag, val) flag = (((val)<<8)|(flag&0xffff0 0ff))
137 #define FXSETFLAG_ALPHA_FILL(flag, val) flag = ((val)|(flag&0xffffff00)) 137 #define FXSETFLAG_ALPHA_FILL(flag, val) flag = ((val)|(flag&0xffffff00))
138 #define FXSETFLAG_ALPHA_STROKE(flag, val) flag = (((val)<<16)|(flag&0xff00 ffff)) 138 #define FXSETFLAG_ALPHA_STROKE(flag, val) flag = (((val)<<16)|(flag&0xff00 ffff))
139 class CFX_DIBSource 139 class CFX_DIBSource
(...skipping 24 matching lines...) Expand all
164 return m_Pitch; 164 return m_Pitch;
165 } 165 }
166 166
167 FX_DWORD* GetPalette() const 167 FX_DWORD* GetPalette() const
168 { 168 {
169 return m_pPalette; 169 return m_pPalette;
170 } 170 }
171 171
172 172
173 173
174 virtual» FX_LPBYTE» GetBuffer() const 174 virtual» uint8_t*» GetBuffer() const
175 { 175 {
176 return NULL; 176 return NULL;
177 } 177 }
178 178
179 virtual FX_LPCBYTE» GetScanline(int line) const = 0; 179 virtual const uint8_t*» GetScanline(int line) const = 0;
180 180
181 virtual FX_BOOL SkipToScanline(int line, IFX_Pause* pPause) cons t 181 virtual FX_BOOL SkipToScanline(int line, IFX_Pause* pPause) cons t
182 { 182 {
183 return FALSE; 183 return FALSE;
184 } 184 }
185 185
186 virtual void» » DownSampleScanline(int line, FX_LPBYTE dest_scan , int dest_bpp, 186 virtual void» » DownSampleScanline(int line, uint8_t* dest_scan, int dest_bpp,
187 int dest_width, FX_BOOL bFlipX, int c lip_left, int clip_width) const = 0; 187 int dest_width, FX_BOOL bFlipX, int c lip_left, int clip_width) const = 0;
188 188
189 virtual void SetDownSampleSize(int width, int height) const { } 189 virtual void SetDownSampleSize(int width, int height) const { }
190 190
191 int GetBPP() const 191 int GetBPP() const
192 { 192 {
193 return m_bpp; 193 return m_bpp;
194 } 194 }
195 195
196 FX_BOOL IsAlphaMask() const 196 FX_BOOL IsAlphaMask() const
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
284 class CFX_DIBitmap : public CFX_DIBSource 284 class CFX_DIBitmap : public CFX_DIBSource
285 { 285 {
286 public: 286 public:
287 287
288 virtual ~CFX_DIBitmap(); 288 virtual ~CFX_DIBitmap();
289 289
290 CFX_DIBitmap(); 290 CFX_DIBitmap();
291 291
292 CFX_DIBitmap(const CFX_DIBitmap& src); 292 CFX_DIBitmap(const CFX_DIBitmap& src);
293 293
294 FX_BOOL» » » Create(int width, int height, FXDIB_Format forma t, FX_LPBYTE pBuffer = NULL, int pitch = 0); 294 FX_BOOL» » » Create(int width, int height, FXDIB_Format forma t, uint8_t* pBuffer = NULL, int pitch = 0);
295 295
296 FX_BOOL Copy(const CFX_DIBSource* pSrc); 296 FX_BOOL Copy(const CFX_DIBSource* pSrc);
297 297
298 virtual» FX_LPBYTE» GetBuffer() const 298 virtual» uint8_t*» GetBuffer() const
299 { 299 {
300 return m_pBuffer; 300 return m_pBuffer;
301 } 301 }
302 302
303 virtual FX_LPCBYTE» GetScanline(int line) const 303 virtual const uint8_t*» GetScanline(int line) const
304 { 304 {
305 return m_pBuffer ? m_pBuffer + line * m_Pitch : NULL; 305 return m_pBuffer ? m_pBuffer + line * m_Pitch : NULL;
306 } 306 }
307 307
308 virtual void» DownSampleScanline(int line, FX_LPBYTE dest_scan, int de st_bpp, 308 virtual void» DownSampleScanline(int line, uint8_t* dest_scan, int des t_bpp,
309 int dest_width, FX_BOOL bFlipX, int clip_ left, int clip_width) const; 309 int dest_width, FX_BOOL bFlipX, int clip_ left, int clip_width) const;
310 310
311 void TakeOver(CFX_DIBitmap* pSrcBitmap); 311 void TakeOver(CFX_DIBitmap* pSrcBitmap);
312 312
313 FX_BOOL ConvertFormat(FXDIB_Format format, void* pIccTra nsform = NULL); 313 FX_BOOL ConvertFormat(FXDIB_Format format, void* pIccTra nsform = NULL);
314 314
315 void Clear(FX_DWORD color); 315 void Clear(FX_DWORD color);
316 316
317 FX_DWORD GetPixel(int x, int y) const; 317 FX_DWORD GetPixel(int x, int y) const;
318 318
(...skipping 21 matching lines...) Expand all
340 const CFX_DIBSource* pMask, FX_DWORD color, in t src_left, int src_top, 340 const CFX_DIBSource* pMask, FX_DWORD color, in t src_left, int src_top,
341 int blend_type = FXDIB_BLEND_NORMAL, const CFX _ClipRgn* pClipRgn = NULL, FX_BOOL bRgbByteOrder = FALSE, int alpha_flag = 0, vo id* pIccTransform = NULL); 341 int blend_type = FXDIB_BLEND_NORMAL, const CFX _ClipRgn* pClipRgn = NULL, FX_BOOL bRgbByteOrder = FALSE, int alpha_flag = 0, vo id* pIccTransform = NULL);
342 342
343 FX_BOOL CompositeRect(int dest_left, int dest_top, int w idth, int height, FX_DWORD color, int alpha_flag = 0, void* pIccTransform = NULL ); 343 FX_BOOL CompositeRect(int dest_left, int dest_top, int w idth, int height, FX_DWORD color, int alpha_flag = 0, void* pIccTransform = NULL );
344 344
345 FX_BOOL ConvertColorScale(FX_DWORD forecolor, FX_DWORD b ackcolor); 345 FX_BOOL ConvertColorScale(FX_DWORD forecolor, FX_DWORD b ackcolor);
346 346
347 FX_BOOL DitherFS(const FX_DWORD* pPalette, int pal_size, const FX_RECT* pRect = NULL); 347 FX_BOOL DitherFS(const FX_DWORD* pPalette, int pal_size, const FX_RECT* pRect = NULL);
348 protected: 348 protected:
349 349
350 FX_LPBYTE» » m_pBuffer; 350 uint8_t*» » m_pBuffer;
351 351
352 FX_BOOL m_bExtBuf; 352 FX_BOOL m_bExtBuf;
353 353
354 FX_BOOL GetGrayData(void* pIccTransform = NULL); 354 FX_BOOL GetGrayData(void* pIccTransform = NULL);
355 }; 355 };
356 class CFX_DIBExtractor 356 class CFX_DIBExtractor
357 { 357 {
358 public: 358 public:
359 359
360 CFX_DIBExtractor(const CFX_DIBSource* pSrc); 360 CFX_DIBExtractor(const CFX_DIBSource* pSrc);
(...skipping 17 matching lines...) Expand all
378 378
379 ~CFX_FilteredDIB(); 379 ~CFX_FilteredDIB();
380 380
381 void LoadSrc(const CFX_DIBSource* pSr c, FX_BOOL bAutoDropSrc = FALSE); 381 void LoadSrc(const CFX_DIBSource* pSr c, FX_BOOL bAutoDropSrc = FALSE);
382 382
383 virtual FXDIB_Format GetDestFormat() = 0; 383 virtual FXDIB_Format GetDestFormat() = 0;
384 384
385 virtual FX_DWORD* GetDestPalette() = 0; 385 virtual FX_DWORD* GetDestPalette() = 0;
386 386
387 387
388 virtual void» » » TranslateScanline(FX_LPBYTE dest_buf, FX _LPCBYTE src_buf) const = 0; 388 virtual void» » » TranslateScanline(uint8_t* dest_buf, con st uint8_t* src_buf) const = 0;
389 389
390 virtual void» » » TranslateDownSamples(FX_LPBYTE dest_buf, FX_LPCBYTE src_buf, int pixels, int Bpp) const = 0; 390 virtual void» » » TranslateDownSamples(uint8_t* dest_buf, const uint8_t* src_buf, int pixels, int Bpp) const = 0;
391 protected: 391 protected:
392 virtual FX_LPCBYTE» » GetScanline(int line) const; 392 virtual const uint8_t*» » GetScanline(int line) const;
393 virtual void» » » DownSampleScanline(int line, FX_LPBYTE d est_scan, int dest_bpp, 393 virtual void» » » DownSampleScanline(int line, uint8_t* de st_scan, int dest_bpp,
394 int dest_width, FX_BOOL bFlipX, int clip_left, int clip_width) const ; 394 int dest_width, FX_BOOL bFlipX, int clip_left, int clip_width) const ;
395 395
396 const CFX_DIBSource* m_pSrc; 396 const CFX_DIBSource* m_pSrc;
397 397
398 FX_BOOL m_bAutoDropSrc; 398 FX_BOOL m_bAutoDropSrc;
399 399
400 FX_LPBYTE» » » » m_pScanline; 400 uint8_t*» » » » m_pScanline;
401 }; 401 };
402 class IFX_ScanlineComposer 402 class IFX_ScanlineComposer
403 { 403 {
404 public: 404 public:
405 virtual ~IFX_ScanlineComposer() { } 405 virtual ~IFX_ScanlineComposer() { }
406 406
407 virtual» void» » ComposeScanline(int line, FX_LPCBYTE scanline, F X_LPCBYTE scan_extra_alpha = NULL) = 0; 407 virtual» void» » ComposeScanline(int line, const uint8_t* scanlin e, const uint8_t* scan_extra_alpha = NULL) = 0;
408 408
409 virtual FX_BOOL SetInfo(int width, int height, FXDIB_Format src_ format, FX_DWORD* pSrcPalette) = 0; 409 virtual FX_BOOL SetInfo(int width, int height, FXDIB_Format src_ format, FX_DWORD* pSrcPalette) = 0;
410 }; 410 };
411 class CFX_ScanlineCompositor 411 class CFX_ScanlineCompositor
412 { 412 {
413 public: 413 public:
414 CFX_ScanlineCompositor(); 414 CFX_ScanlineCompositor();
415 415
416 ~CFX_ScanlineCompositor(); 416 ~CFX_ScanlineCompositor();
417 417
418 FX_BOOL Init(FXDIB_Format dest_format, FXDIB_For mat src_format, int32_t width, FX_DWORD* pSrcPalette, 418 FX_BOOL Init(FXDIB_Format dest_format, FXDIB_For mat src_format, int32_t width, FX_DWORD* pSrcPalette,
419 FX_DWORD mask_color, int blend_type, FX_BOOL bClip, FX_BOOL bRgbByteOrder = FALSE, int alpha_flag = 0, void* pIccTransform = NULL); 419 FX_DWORD mask_color, int blend_type, FX_BOOL bClip, FX_BOOL bRgbByteOrder = FALSE, int alpha_flag = 0, void* pIccTransform = NULL);
420 420
421 421
422 void» » » » CompositeRgbBitmapLine(FX_LPBYTE dest_sc an, FX_LPCBYTE src_scan, int width, FX_LPCBYTE clip_scan, 422 void» » » » CompositeRgbBitmapLine(uint8_t* dest_sca n, const uint8_t* src_scan, int width, const uint8_t* clip_scan,
423 FX_LPCBYTE src_extra_alpha = NULL, FX_LPBYTE dst_extra_alpha = NULL) ; 423 const uint8_t* src_extra_alpha = NULL, uint8_t* dst_extra_alpha = NU LL);
424 424
425 425
426 void» » » » CompositePalBitmapLine(FX_LPBYTE dest_sc an, FX_LPCBYTE src_scan, int src_left, int width, FX_LPCBYTE clip_scan, 426 void» » » » CompositePalBitmapLine(uint8_t* dest_sca n, const uint8_t* src_scan, int src_left, int width, const uint8_t* clip_scan,
427 FX_LPCBYTE src_extra_alpha = NULL, FX_LPBYTE dst_extra_alpha = NULL) ; 427 const uint8_t* src_extra_alpha = NULL, uint8_t* dst_extra_alpha = NU LL);
428 428
429 429
430 void» » » » CompositeByteMaskLine(FX_LPBYTE dest_sca n, FX_LPCBYTE src_scan, int width, FX_LPCBYTE clip_scan, 430 void» » » » CompositeByteMaskLine(uint8_t* dest_scan , const uint8_t* src_scan, int width, const uint8_t* clip_scan,
431 FX_LPBYTE dst_extra_alpha = NULL); 431 uint8_t* dst_extra_alpha = NULL);
432 432
433 433
434 void» » » » CompositeBitMaskLine(FX_LPBYTE dest_scan , FX_LPCBYTE src_scan, int src_left, int width, FX_LPCBYTE clip_scan, 434 void» » » » CompositeBitMaskLine(uint8_t* dest_scan, const uint8_t* src_scan, int src_left, int width, const uint8_t* clip_scan,
435 FX_LPBYTE dst_extra_alpha = NULL); 435 uint8_t* dst_extra_alpha = NULL);
436 protected: 436 protected:
437 int m_Transparency; 437 int m_Transparency;
438 FXDIB_Format m_SrcFormat, 438 FXDIB_Format m_SrcFormat,
439 m_DestFormat; 439 m_DestFormat;
440 FX_DWORD* m_pSrcPalette; 440 FX_DWORD* m_pSrcPalette;
441 441
442 int m_MaskAlpha, 442 int m_MaskAlpha,
443 m_MaskRed, 443 m_MaskRed,
444 m_MaskGreen, 444 m_MaskGreen,
445 m_MaskBlue, 445 m_MaskBlue,
446 m_MaskBlack; 446 m_MaskBlack;
447 int m_BlendType; 447 int m_BlendType;
448 void* m_pIccTransform; 448 void* m_pIccTransform;
449 FX_LPBYTE» » » m_pCacheScanline; 449 uint8_t*» » » m_pCacheScanline;
450 int m_CacheSize; 450 int m_CacheSize;
451 FX_BOOL m_bRgbByteOrder; 451 FX_BOOL m_bRgbByteOrder;
452 }; 452 };
453 class CFX_BitmapComposer : public IFX_ScanlineComposer 453 class CFX_BitmapComposer : public IFX_ScanlineComposer
454 { 454 {
455 public: 455 public:
456 456
457 CFX_BitmapComposer(); 457 CFX_BitmapComposer();
458 458
459 ~CFX_BitmapComposer(); 459 ~CFX_BitmapComposer();
460 460
461 461
462 void Compose(CFX_DIBitmap* pDest, const CFX_C lipRgn* pClipRgn, int bitmap_alpha, 462 void Compose(CFX_DIBitmap* pDest, const CFX_C lipRgn* pClipRgn, int bitmap_alpha,
463 FX_DWORD mask_color, FX_RECT& dest_rect, FX_BOOL bVertical, 463 FX_DWORD mask_color, FX_RECT& dest_rect, FX_BOOL bVertical,
464 FX_BOOL bFlipX, FX_BOOL bFlipY, FX_BOOL bRgbByte Order = FALSE, 464 FX_BOOL bFlipX, FX_BOOL bFlipY, FX_BOOL bRgbByte Order = FALSE,
465 int alpha_flag = 0, void* pIccTransform = NULL, int blend_type = FXDIB_BLEND_NORMAL); 465 int alpha_flag = 0, void* pIccTransform = NULL, int blend_type = FXDIB_BLEND_NORMAL);
466 466
467 virtual FX_BOOL SetInfo(int width, int height, FXDIB_Format src_ format, FX_DWORD* pSrcPalette); 467 virtual FX_BOOL SetInfo(int width, int height, FXDIB_Format src_ format, FX_DWORD* pSrcPalette);
468 468
469 469
470 virtual» void» » ComposeScanline(int line, FX_LPCBYTE scanline, F X_LPCBYTE scan_extra_alpha); 470 virtual» void» » ComposeScanline(int line, const uint8_t* scanlin e, const uint8_t* scan_extra_alpha);
471 protected: 471 protected:
472 472
473 void» » » » DoCompose(FX_LPBYTE dest_scan, FX_LPCBYT E src_scan, int dest_width, FX_LPCBYTE clip_scan, 473 void» » » » DoCompose(uint8_t* dest_scan, const uint 8_t* src_scan, int dest_width, const uint8_t* clip_scan,
474 FX_LPCBYTE src_extra_alpha = NULL, FX_LPBYTE d st_extra_alpha = NULL); 474 const uint8_t* src_extra_alpha = NULL, uint8_t * dst_extra_alpha = NULL);
475 CFX_DIBitmap* m_pBitmap; 475 CFX_DIBitmap* m_pBitmap;
476 const CFX_ClipRgn* m_pClipRgn; 476 const CFX_ClipRgn* m_pClipRgn;
477 FXDIB_Format m_SrcFormat; 477 FXDIB_Format m_SrcFormat;
478 int m_DestLeft, m_DestTop, m_DestWidth, m_De stHeight, m_BitmapAlpha; 478 int m_DestLeft, m_DestTop, m_DestWidth, m_De stHeight, m_BitmapAlpha;
479 FX_DWORD m_MaskColor; 479 FX_DWORD m_MaskColor;
480 const CFX_DIBitmap* m_pClipMask; 480 const CFX_DIBitmap* m_pClipMask;
481 CFX_ScanlineCompositor m_Compositor; 481 CFX_ScanlineCompositor m_Compositor;
482 FX_BOOL m_bVertical, m_bFlipX, m_bFlipY; 482 FX_BOOL m_bVertical, m_bFlipX, m_bFlipY;
483 int m_AlphaFlag; 483 int m_AlphaFlag;
484 void* m_pIccTransform; 484 void* m_pIccTransform;
485 FX_BOOL m_bRgbByteOrder; 485 FX_BOOL m_bRgbByteOrder;
486 int m_BlendType; 486 int m_BlendType;
487 void» » » » ComposeScanlineV(int line, FX_LPCBYTE sc anline, FX_LPCBYTE scan_extra_alpha = NULL); 487 void» » » » ComposeScanlineV(int line, const uint8_t * scanline, const uint8_t* scan_extra_alpha = NULL);
488 FX_LPBYTE» » » m_pScanlineV, m_pClipScanV, m_pAddClipScan, m_pS canlineAlphaV; 488 uint8_t* m_pScanlineV;
489 uint8_t* m_pClipScanV;
490 uint8_t* m_pAddClipScan;
491 uint8_t* m_pScanlineAlphaV;
489 }; 492 };
490 class CFX_BitmapStorer : public IFX_ScanlineComposer 493 class CFX_BitmapStorer : public IFX_ScanlineComposer
491 { 494 {
492 public: 495 public:
493 496
494 CFX_BitmapStorer(); 497 CFX_BitmapStorer();
495 498
496 ~CFX_BitmapStorer(); 499 ~CFX_BitmapStorer();
497 500
498 virtual» void» » ComposeScanline(int line, FX_LPCBYTE scanline, F X_LPCBYTE scan_extra_alpha); 501 virtual» void» » ComposeScanline(int line, const uint8_t* scanlin e, const uint8_t* scan_extra_alpha);
499 502
500 virtual FX_BOOL SetInfo(int width, int height, FXDIB_Format src_ format, FX_DWORD* pSrcPalette); 503 virtual FX_BOOL SetInfo(int width, int height, FXDIB_Format src_ format, FX_DWORD* pSrcPalette);
501 504
502 CFX_DIBitmap* GetBitmap() 505 CFX_DIBitmap* GetBitmap()
503 { 506 {
504 return m_pBitmap; 507 return m_pBitmap;
505 } 508 }
506 509
507 CFX_DIBitmap* Detach(); 510 CFX_DIBitmap* Detach();
508 511
(...skipping 19 matching lines...) Expand all
528 const CFX_DIBSource* m_pSource; 531 const CFX_DIBSource* m_pSource;
529 CStretchEngine* m_pStretchEngine; 532 CStretchEngine* m_pStretchEngine;
530 FX_DWORD m_Flags; 533 FX_DWORD m_Flags;
531 FX_BOOL m_bFlipX, 534 FX_BOOL m_bFlipX,
532 m_bFlipY; 535 m_bFlipY;
533 int m_DestWidth, 536 int m_DestWidth,
534 m_DestHeight; 537 m_DestHeight;
535 FX_RECT m_ClipRect; 538 FX_RECT m_ClipRect;
536 int m_LineIndex; 539 int m_LineIndex;
537 int m_DestBPP; 540 int m_DestBPP;
538 FX_LPBYTE» » m_pScanline; 541 uint8_t*» » m_pScanline;
539 FX_LPBYTE m_pMaskScanline; 542 uint8_t* m_pMaskScanline;
540 FXDIB_Format m_DestFormat; 543 FXDIB_Format m_DestFormat;
541 int32_t m_Status; 544 int32_t m_Status;
542 545
543 int32_t StartQuickStretch(); 546 int32_t StartQuickStretch();
544 547
545 int32_t StartStretch(); 548 int32_t StartStretch();
546 549
547 int32_t ContinueQuickStretch(IFX_Pause* pPause); 550 int32_t ContinueQuickStretch(IFX_Pause* pPause);
548 551
549 int32_t ContinueStretch(IFX_Pause* pPause); 552 int32_t ContinueStretch(IFX_Pause* pPause);
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
597 int m_DestLeft, m_DestTop; 600 int m_DestLeft, m_DestTop;
598 FX_RECT m_ClipBox; 601 FX_RECT m_ClipBox;
599 FX_DWORD m_Flags; 602 FX_DWORD m_Flags;
600 int m_AlphaFlag; 603 int m_AlphaFlag;
601 void* m_pIccTransform; 604 void* m_pIccTransform;
602 FX_BOOL m_bRgbByteOrder; 605 FX_BOOL m_bRgbByteOrder;
603 int m_BlendType; 606 int m_BlendType;
604 }; 607 };
605 608
606 #endif // CORE_INCLUDE_FXGE_FX_DIB_H_ 609 #endif // CORE_INCLUDE_FXGE_FX_DIB_H_
OLDNEW
« no previous file with comments | « core/include/fxge/fpf.h ('k') | core/include/fxge/fx_font.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698