openshot-audio  0.1.7
juce_PixelFormats.h
Go to the documentation of this file.
1 /*
2  ==============================================================================
3 
4  This file is part of the JUCE library.
5  Copyright (c) 2015 - ROLI Ltd.
6 
7  Permission is granted to use this software under the terms of either:
8  a) the GPL v2 (or any later version)
9  b) the Affero GPL v3
10 
11  Details of these licenses can be found at: www.gnu.org/licenses
12 
13  JUCE is distributed in the hope that it will be useful, but WITHOUT ANY
14  WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
15  A PARTICULAR PURPOSE. See the GNU General Public License for more details.
16 
17  ------------------------------------------------------------------------------
18 
19  To release a closed-source product which uses JUCE, commercial licenses are
20  available: visit www.juce.com for more information.
21 
22  ==============================================================================
23 */
24 
25 #ifndef JUCE_PIXELFORMATS_H_INCLUDED
26 #define JUCE_PIXELFORMATS_H_INCLUDED
27 
28 
29 //==============================================================================
30 #if JUCE_MSVC
31  #pragma pack (push, 1)
32 #endif
33 
34 class PixelRGB;
35 class PixelAlpha;
36 
38 {
39  return (x >> 8) & 0x00ff00ff;
40 }
41 
43 {
44  return (x | (0x01000100 - maskPixelComponents (x))) & 0x00ff00ff;
45 }
46 
47 //==============================================================================
57 {
58 public:
62 
63  PixelARGB (const uint8 a, const uint8 r, const uint8 g, const uint8 b) noexcept
64  {
65  components.b = b;
66  components.g = g;
67  components.r = r;
68  components.a = a;
69  }
70 
71  //==============================================================================
73  forcedinline uint32 getNativeARGB() const noexcept { return internal; }
74 
78  {
79  #if JUCE_ANDROID
80  return (uint32) ((components.a << 24) | (components.r << 16) | (components.g << 8) | (components.b << 0));
81  #else
82  return getNativeARGB();
83  #endif
84  }
85 
89  {
90  #if JUCE_BIG_ENDIAN
91  return getInARGBMaskOrder();
92  #else
93  return (uint32) ((components.b << 24) | (components.g << 16) | (components.r << 8) | components.a);
94  #endif
95  }
96 
99  forcedinline uint32 getEvenBytes() const noexcept { return 0x00ff00ff & internal; }
100 
103  forcedinline uint32 getOddBytes() const noexcept { return 0x00ff00ff & (internal >> 8); }
104 
105  //==============================================================================
106  forcedinline uint8 getAlpha() const noexcept { return components.a; }
107  forcedinline uint8 getRed() const noexcept { return components.r; }
108  forcedinline uint8 getGreen() const noexcept { return components.g; }
109  forcedinline uint8 getBlue() const noexcept { return components.b; }
110 
111  #if JUCE_GCC && ! JUCE_CLANG
112  // NB these are here as a workaround because GCC refuses to bind to packed values.
113  forcedinline uint8& getAlpha() noexcept { return comps [indexA]; }
114  forcedinline uint8& getRed() noexcept { return comps [indexR]; }
115  forcedinline uint8& getGreen() noexcept { return comps [indexG]; }
116  forcedinline uint8& getBlue() noexcept { return comps [indexB]; }
117  #else
118  forcedinline uint8& getAlpha() noexcept { return components.a; }
119  forcedinline uint8& getRed() noexcept { return components.r; }
120  forcedinline uint8& getGreen() noexcept { return components.g; }
121  forcedinline uint8& getBlue() noexcept { return components.b; }
122  #endif
123 
124  //==============================================================================
129  template <class Pixel>
130  forcedinline void set (const Pixel& src) noexcept
131  {
132  internal = src.getNativeARGB();
133  }
134 
135  //==============================================================================
137  void setARGB (const uint8 a, const uint8 r, const uint8 g, const uint8 b) noexcept
138  {
139  components.b = b;
140  components.g = g;
141  components.r = r;
142  components.a = a;
143  }
144 
145  //==============================================================================
151  template <class Pixel>
152  forcedinline void blend (const Pixel& src) noexcept
153  {
154  uint32 rb = src.getEvenBytes();
155  uint32 ag = src.getOddBytes();
156 
157  const uint32 alpha = 0x100 - (ag >> 16);
158 
159  rb += maskPixelComponents (getEvenBytes() * alpha);
160  ag += maskPixelComponents (getOddBytes() * alpha);
161 
162  internal = clampPixelComponents (rb) | (clampPixelComponents (ag) << 8);
163  }
164 
170  forcedinline void blend (const PixelRGB src) noexcept;
171 
172 
178  template <class Pixel>
179  forcedinline void blend (const Pixel& src, uint32 extraAlpha) noexcept
180  {
181  uint32 rb = maskPixelComponents (extraAlpha * src.getEvenBytes());
182  uint32 ag = maskPixelComponents (extraAlpha * src.getOddBytes());
183 
184  const uint32 alpha = 0x100 - (ag >> 16);
185 
186  rb += maskPixelComponents (getEvenBytes() * alpha);
187  ag += maskPixelComponents (getOddBytes() * alpha);
188 
189  internal = clampPixelComponents (rb) | (clampPixelComponents (ag) << 8);
190  }
191 
195  template <class Pixel>
196  forcedinline void tween (const Pixel& src, const uint32 amount) noexcept
197  {
198  uint32 dEvenBytes = getEvenBytes();
199  dEvenBytes += (((src.getEvenBytes() - dEvenBytes) * amount) >> 8);
200  dEvenBytes &= 0x00ff00ff;
201 
202  uint32 dOddBytes = getOddBytes();
203  dOddBytes += (((src.getOddBytes() - dOddBytes) * amount) >> 8);
204  dOddBytes &= 0x00ff00ff;
205  dOddBytes <<= 8;
206 
207  dOddBytes |= dEvenBytes;
208  internal = dOddBytes;
209  }
210 
211  //==============================================================================
213  forcedinline void setAlpha (const uint8 newAlpha) noexcept
214  {
215  components.a = newAlpha;
216  }
217 
219  forcedinline void multiplyAlpha (int multiplier) noexcept
220  {
221  // increment alpha by 1, so that if multiplier == 255 (full alpha),
222  // this function will not change the values.
223  ++multiplier;
224 
225  internal = ((((uint32) multiplier) * getOddBytes()) & 0xff00ff00)
226  | (((((uint32) multiplier) * getEvenBytes()) >> 8) & 0x00ff00ff);
227  }
228 
229  forcedinline void multiplyAlpha (const float multiplier) noexcept
230  {
231  multiplyAlpha ((int) (multiplier * 255.0f));
232  }
233 
234 
235  inline PixelARGB getUnpremultiplied() const noexcept { PixelARGB p (internal); p.unpremultiply(); return p; }
236 
238  forcedinline void premultiply() noexcept
239  {
240  const uint32 alpha = components.a;
241 
242  if (alpha < 0xff)
243  {
244  if (alpha == 0)
245  {
246  components.b = 0;
247  components.g = 0;
248  components.r = 0;
249  }
250  else
251  {
252  components.b = (uint8) ((components.b * alpha + 0x7f) >> 8);
253  components.g = (uint8) ((components.g * alpha + 0x7f) >> 8);
254  components.r = (uint8) ((components.r * alpha + 0x7f) >> 8);
255  }
256  }
257  }
258 
260  forcedinline void unpremultiply() noexcept
261  {
262  const uint32 alpha = components.a;
263 
264  if (alpha < 0xff)
265  {
266  if (alpha == 0)
267  {
268  components.b = 0;
269  components.g = 0;
270  components.r = 0;
271  }
272  else
273  {
274  components.b = (uint8) jmin ((uint32) 0xffu, (components.b * 0xffu) / alpha);
275  components.g = (uint8) jmin ((uint32) 0xffu, (components.g * 0xffu) / alpha);
276  components.r = (uint8) jmin ((uint32) 0xffu, (components.r * 0xffu) / alpha);
277  }
278  }
279  }
280 
281  forcedinline void desaturate() noexcept
282  {
283  if (components.a < 0xff && components.a > 0)
284  {
285  const int newUnpremultipliedLevel = (0xff * ((int) components.r + (int) components.g + (int) components.b) / (3 * components.a));
286 
287  components.r = components.g = components.b
288  = (uint8) ((newUnpremultipliedLevel * components.a + 0x7f) >> 8);
289  }
290  else
291  {
292  components.r = components.g = components.b
293  = (uint8) (((int) components.r + (int) components.g + (int) components.b) / 3);
294  }
295  }
296 
297  //==============================================================================
299  #if JUCE_ANDROID
300  #if JUCE_BIG_ENDIAN
301  enum { indexA = 0, indexR = 3, indexG = 2, indexB = 1 };
302  #else
303  enum { indexA = 3, indexR = 0, indexG = 1, indexB = 2 };
304  #endif
305  #else
306  #if JUCE_BIG_ENDIAN
307  enum { indexA = 0, indexR = 1, indexG = 2, indexB = 3 };
308  #else
309  enum { indexA = 3, indexR = 2, indexG = 1, indexB = 0 };
310  #endif
311  #endif
312 
313 private:
314  //==============================================================================
315  PixelARGB (const uint32 internalValue) noexcept
316  : internal (internalValue)
317  {
318  }
319 
320  //==============================================================================
321  struct Components
322  {
323  #if JUCE_ANDROID
324  #if JUCE_BIG_ENDIAN
325  uint8 a, b, g, r;
326  #else
327  uint8 r, g, b, a;
328  #endif
329  #else
330  #if JUCE_BIG_ENDIAN
331  uint8 a, r, g, b;
332  #else
333  uint8 b, g, r, a;
334  #endif
335  #endif
336  } JUCE_PACKED;
337 
338  union
339  {
340  uint32 internal;
341  Components components;
342  #if JUCE_GCC
343  uint8 comps[4]; // helper struct needed because gcc does not allow references to packed union members
344  #endif
345  };
346 }
347 #ifndef DOXYGEN
349 #endif
350 ;
351 
352 
353 //==============================================================================
362 {
363 public:
367 
368  //==============================================================================
374  {
375  #if JUCE_ANDROID
376  return (uint32) ((0xff << 24) | r | (g << 8) | (b << 16));
377  #else
378  return (uint32) ((0xff << 24) | b | (g << 8) | (r << 16));
379  #endif
380  }
381 
385  {
386  #if JUCE_ANDROID
387  return (uint32) ((0xff << 24) | (r << 16) | (g << 8) | (b << 0));
388  #else
389  return getNativeARGB();
390  #endif
391  }
392 
396  {
397  #if JUCE_BIG_ENDIAN
398  return getInARGBMaskOrder();
399  #else
400  return (uint32) ((b << 24) | (g << 16) | (r << 8) | 0xff);
401  #endif
402  }
403 
410  {
411  #if JUCE_ANDROID
412  return (uint32) (r | (b << 16));
413  #else
414  return (uint32) (b | (r << 16));
415  #endif
416  }
417 
423  forcedinline uint32 getOddBytes() const noexcept { return (uint32)0xff0000 | g; }
424 
425  //==============================================================================
426  forcedinline uint8 getAlpha() const noexcept { return 0xff; }
427  forcedinline uint8 getRed() const noexcept { return r; }
428  forcedinline uint8 getGreen() const noexcept { return g; }
429  forcedinline uint8 getBlue() const noexcept { return b; }
430 
434 
435  //==============================================================================
442  template <class Pixel>
443  forcedinline void set (const Pixel& src) noexcept
444  {
445  b = src.getBlue();
446  g = src.getGreen();
447  r = src.getRed();
448  }
449 
451  void setARGB (const uint8, const uint8 red, const uint8 green, const uint8 blue) noexcept
452  {
453  r = red;
454  g = green;
455  b = blue;
456  }
457 
458  //==============================================================================
464  template <class Pixel>
465  forcedinline void blend (const Pixel& src) noexcept
466  {
467  const uint32 alpha = (uint32) (0x100 - src.getAlpha());
468 
469  // getEvenBytes returns 0x00rr00bb on non-android
470  uint32 rb = clampPixelComponents (src.getEvenBytes() + maskPixelComponents (getEvenBytes() * alpha));
471  // getOddBytes returns 0x00aa00gg on non-android
472  uint32 ag = clampPixelComponents (src.getOddBytes() + ((g * alpha) >> 8));
473 
474  g = (uint8) (ag & 0xff);
475 
476  #if JUCE_ANDROID
477  b = (uint8) (rb >> 16);
478  r = (uint8) (rb & 0xff);
479  #else
480  r = (uint8) (rb >> 16);
481  b = (uint8) (rb & 0xff);
482  #endif
483  }
484 
486  {
487  set (src);
488  }
489 
495  template <class Pixel>
496  forcedinline void blend (const Pixel& src, uint32 extraAlpha) noexcept
497  {
498  uint32 ag = maskPixelComponents (extraAlpha * src.getOddBytes());
499  uint32 rb = maskPixelComponents (extraAlpha * src.getEvenBytes());
500 
501  const uint32 alpha = 0x100 - (ag >> 16);
502 
503  ag = clampPixelComponents (ag + (g * alpha >> 8));
504  rb = clampPixelComponents (rb + maskPixelComponents (getEvenBytes() * alpha));
505 
506  g = (uint8) (ag & 0xff);
507 
508  #if JUCE_ANDROID
509  b = (uint8) (rb >> 16);
510  r = (uint8) (rb & 0xff);
511  #else
512  r = (uint8) (rb >> 16);
513  b = (uint8) (rb & 0xff);
514  #endif
515  }
516 
520  template <class Pixel>
521  forcedinline void tween (const Pixel& src, const uint32 amount) noexcept
522  {
523  uint32 dEvenBytes = getEvenBytes();
524  dEvenBytes += (((src.getEvenBytes() - dEvenBytes) * amount) >> 8);
525 
526  uint32 dOddBytes = getOddBytes();
527  dOddBytes += (((src.getOddBytes() - dOddBytes) * amount) >> 8);
528 
529  g = (uint8) (dOddBytes & 0xff); // dOddBytes = 0x00aa00gg
530 
531  #if JUCE_ANDROID
532  r = (uint8) (dEvenBytes & 0xff); // dEvenBytes = 0x00bb00rr
533  b = (uint8) (dEvenBytes >> 16);
534  #else
535  b = (uint8) (dEvenBytes & 0xff); // dEvenBytes = 0x00rr00bb
536  r = (uint8) (dEvenBytes >> 16);
537  #endif
538  }
539 
540  //==============================================================================
543 
546 
549 
552 
555 
557  {
558  r = g = b = (uint8) (((int) r + (int) g + (int) b) / 3);
559  }
560 
561  //==============================================================================
563  #if JUCE_MAC
564  enum { indexR = 0, indexG = 1, indexB = 2 };
565  #else
566  enum { indexR = 2, indexG = 1, indexB = 0 };
567  #endif
568 
569 private:
570  //==============================================================================
571  PixelRGB (const uint32 internal) noexcept
572  {
573  #if JUCE_ANDROID
574  b = (uint8) (internal >> 16);
575  g = (uint8) (internal >> 8);
576  r = (uint8) (internal);
577  #else
578  r = (uint8) (internal >> 16);
579  g = (uint8) (internal >> 8);
580  b = (uint8) (internal);
581  #endif
582  }
583 
584  //==============================================================================
585  #if JUCE_MAC
586  uint8 r, g, b;
587  #else
588  uint8 b, g, r;
589  #endif
590 
591 }
592 #ifndef DOXYGEN
594 #endif
595 ;
596 
598 {
599  set (src);
600 }
601 
602 //==============================================================================
611 {
612 public:
616 
617  //==============================================================================
622  forcedinline uint32 getNativeARGB() const noexcept { return (uint32) ((a << 24) | (a << 16) | (a << 8) | a); }
623 
626  forcedinline uint32 getInARGBMaskOrder() const noexcept { return getNativeARGB(); }
627 
630  inline uint32 getInARGBMemoryOrder() const noexcept { return getNativeARGB(); }
631 
637  forcedinline uint32 getEvenBytes() const noexcept { return (uint32) ((a << 16) | a); }
638 
644  forcedinline uint32 getOddBytes() const noexcept { return (uint32) ((a << 16) | a); }
645 
646  //==============================================================================
647  forcedinline uint8 getAlpha() const noexcept { return a; }
649 
650  forcedinline uint8 getRed() const noexcept { return 0; }
651  forcedinline uint8 getGreen() const noexcept { return 0; }
652  forcedinline uint8 getBlue() const noexcept { return 0; }
653 
654  //==============================================================================
659  template <class Pixel>
660  forcedinline void set (const Pixel& src) noexcept
661  {
662  a = src.getAlpha();
663  }
664 
666  forcedinline void setARGB (const uint8 a_, const uint8 /*r*/, const uint8 /*g*/, const uint8 /*b*/) noexcept
667  {
668  a = a_;
669  }
670 
671  //==============================================================================
677  template <class Pixel>
678  forcedinline void blend (const Pixel& src) noexcept
679  {
680  const int srcA = src.getAlpha();
681  a = (uint8) ((a * (0x100 - srcA) >> 8) + srcA);
682  }
683 
689  template <class Pixel>
690  forcedinline void blend (const Pixel& src, uint32 extraAlpha) noexcept
691  {
692  ++extraAlpha;
693  const int srcAlpha = (int) ((extraAlpha * src.getAlpha()) >> 8);
694  a = (uint8) ((a * (0x100 - srcAlpha) >> 8) + srcAlpha);
695  }
696 
700  template <class Pixel>
701  forcedinline void tween (const Pixel& src, const uint32 amount) noexcept
702  {
703  a += ((src.getAlpha() - a) * amount) >> 8;
704  }
705 
706  //==============================================================================
708  forcedinline void setAlpha (const uint8 newAlpha) noexcept
709  {
710  a = newAlpha;
711  }
712 
714  forcedinline void multiplyAlpha (int multiplier) noexcept
715  {
716  ++multiplier;
717  a = (uint8) ((a * multiplier) >> 8);
718  }
719 
720  forcedinline void multiplyAlpha (const float multiplier) noexcept
721  {
722  a = (uint8) (a * multiplier);
723  }
724 
727 
730 
732 
733  //==============================================================================
735  enum { indexA = 0 };
736 
737 private:
738  //==============================================================================
739  PixelAlpha (const uint32 internal) noexcept
740  {
741  a = (uint8) (internal >> 24);
742  }
743 
744  //==============================================================================
745  uint8 a;
746 }
747 #ifndef DOXYGEN
749 #endif
750 ;
751 
752 #if JUCE_MSVC
753  #pragma pack (pop)
754 #endif
755 
756 #endif // JUCE_PIXELFORMATS_H_INCLUDED
forcedinline uint32 getNativeARGB() const noexcept
Definition: juce_PixelFormats.h:622
forcedinline uint32 getEvenBytes() const noexcept
Definition: juce_PixelFormats.h:99
forcedinline uint8 & getAlpha() noexcept
Definition: juce_PixelFormats.h:648
forcedinline uint8 & getGreen() noexcept
Definition: juce_PixelFormats.h:120
forcedinline uint8 & getBlue() noexcept
Definition: juce_PixelFormats.h:433
~PixelARGB() noexcept
Definition: juce_PixelFormats.h:61
forcedinline uint8 & getBlue() noexcept
Definition: juce_PixelFormats.h:121
forcedinline uint8 getRed() const noexcept
Definition: juce_PixelFormats.h:650
#define noexcept
Definition: juce_CompilerSupport.h:141
forcedinline void blend(const Pixel &src) noexcept
Definition: juce_PixelFormats.h:152
forcedinline uint8 getBlue() const noexcept
Definition: juce_PixelFormats.h:652
Type jmin(const Type a, const Type b)
Definition: juce_core.h:113
forcedinline void multiplyAlpha(int multiplier) noexcept
Definition: juce_PixelFormats.h:219
forcedinline void blend(const Pixel &src, uint32 extraAlpha) noexcept
Definition: juce_PixelFormats.h:496
forcedinline uint8 getGreen() const noexcept
Definition: juce_PixelFormats.h:651
forcedinline void multiplyAlpha(int) noexcept
Definition: juce_PixelFormats.h:545
forcedinline void blend(const Pixel &src, uint32 extraAlpha) noexcept
Definition: juce_PixelFormats.h:179
forcedinline void blend(const Pixel &src, uint32 extraAlpha) noexcept
Definition: juce_PixelFormats.h:690
forcedinline uint8 getBlue() const noexcept
Definition: juce_PixelFormats.h:429
forcedinline uint8 getAlpha() const noexcept
Definition: juce_PixelFormats.h:647
forcedinline void premultiply() noexcept
Definition: juce_PixelFormats.h:551
forcedinline uint32 getInARGBMaskOrder() const noexcept
Definition: juce_PixelFormats.h:626
forcedinline void tween(const Pixel &src, const uint32 amount) noexcept
Definition: juce_PixelFormats.h:196
forcedinline void unpremultiply() noexcept
Definition: juce_PixelFormats.h:729
forcedinline uint8 & getRed() noexcept
Definition: juce_PixelFormats.h:119
uint32 getInARGBMemoryOrder() const noexcept
Definition: juce_PixelFormats.h:630
#define JUCE_API
Definition: juce_StandardHeader.h:139
PixelARGB(const uint8 a, const uint8 r, const uint8 g, const uint8 b) noexcept
Definition: juce_PixelFormats.h:63
forcedinline void tween(const Pixel &src, const uint32 amount) noexcept
Definition: juce_PixelFormats.h:521
forcedinline void multiplyAlpha(int multiplier) noexcept
Definition: juce_PixelFormats.h:714
forcedinline void blend(const PixelRGB src) noexcept
Definition: juce_PixelFormats.h:485
forcedinline uint8 & getRed() noexcept
Definition: juce_PixelFormats.h:431
forcedinline uint8 & getGreen() noexcept
Definition: juce_PixelFormats.h:432
forcedinline uint32 getNativeARGB() const noexcept
Definition: juce_PixelFormats.h:73
void setARGB(const uint8 a, const uint8 r, const uint8 g, const uint8 b) noexcept
Definition: juce_PixelFormats.h:137
PixelRGB() noexcept
Definition: juce_PixelFormats.h:365
forcedinline uint32 getOddBytes() const noexcept
Definition: juce_PixelFormats.h:644
forcedinline uint32 getOddBytes() const noexcept
Definition: juce_PixelFormats.h:103
unsigned int uint32
Definition: juce_MathsFunctions.h:51
forcedinline void setAlpha(const uint8 newAlpha) noexcept
Definition: juce_PixelFormats.h:708
forcedinline void multiplyAlpha(float) noexcept
Definition: juce_PixelFormats.h:548
forcedinline uint8 & getAlpha() noexcept
Definition: juce_PixelFormats.h:118
Components components
Definition: juce_PixelFormats.h:341
Definition: juce_PixelFormats.h:610
forcedinline uint32 getInARGBMaskOrder() const noexcept
Definition: juce_PixelFormats.h:77
forcedinline uint32 getOddBytes() const noexcept
Definition: juce_PixelFormats.h:423
forcedinline uint32 getEvenBytes() const noexcept
Definition: juce_PixelFormats.h:409
forcedinline uint8 getBlue() const noexcept
Definition: juce_PixelFormats.h:109
forcedinline uint32 getEvenBytes() const noexcept
Definition: juce_PixelFormats.h:637
forcedinline void setAlpha(const uint8) noexcept
Definition: juce_PixelFormats.h:542
PixelAlpha() noexcept
Definition: juce_PixelFormats.h:614
forcedinline uint8 getRed() const noexcept
Definition: juce_PixelFormats.h:107
~PixelAlpha() noexcept
Definition: juce_PixelFormats.h:615
forcedinline void setARGB(const uint8 a_, const uint8, const uint8, const uint8) noexcept
Definition: juce_PixelFormats.h:666
forcedinline uint32 getInARGBMaskOrder() const noexcept
Definition: juce_PixelFormats.h:384
forcedinline uint8 getRed() const noexcept
Definition: juce_PixelFormats.h:427
forcedinline void premultiply() noexcept
Definition: juce_PixelFormats.h:726
forcedinline void setAlpha(const uint8 newAlpha) noexcept
Definition: juce_PixelFormats.h:213
forcedinline uint8 getGreen() const noexcept
Definition: juce_PixelFormats.h:108
~PixelRGB() noexcept
Definition: juce_PixelFormats.h:366
Definition: juce_PixelFormats.h:56
forcedinline uint8 getGreen() const noexcept
Definition: juce_PixelFormats.h:428
forcedinline void desaturate() noexcept
Definition: juce_PixelFormats.h:731
forcedinline void blend(const Pixel &src) noexcept
Definition: juce_PixelFormats.h:678
forcedinline void multiplyAlpha(const float multiplier) noexcept
Definition: juce_PixelFormats.h:229
uint32 maskPixelComponents(uint32 x) noexcept
Definition: juce_PixelFormats.h:37
void setARGB(const uint8, const uint8 red, const uint8 green, const uint8 blue) noexcept
Definition: juce_PixelFormats.h:451
PixelARGB() noexcept
Definition: juce_PixelFormats.h:60
uint32 getInARGBMemoryOrder() const noexcept
Definition: juce_PixelFormats.h:395
forcedinline void multiplyAlpha(const float multiplier) noexcept
Definition: juce_PixelFormats.h:720
uint32 getInARGBMemoryOrder() const noexcept
Definition: juce_PixelFormats.h:88
forcedinline void desaturate() noexcept
Definition: juce_PixelFormats.h:281
forcedinline void blend(const Pixel &src) noexcept
Definition: juce_PixelFormats.h:465
forcedinline uint32 getNativeARGB() const noexcept
Definition: juce_PixelFormats.h:373
PixelARGB getUnpremultiplied() const noexcept
Definition: juce_PixelFormats.h:235
unsigned char uint8
Definition: juce_MathsFunctions.h:43
forcedinline void unpremultiply() noexcept
Definition: juce_PixelFormats.h:260
forcedinline void unpremultiply() noexcept
Definition: juce_PixelFormats.h:554
forcedinline void tween(const Pixel &src, const uint32 amount) noexcept
Definition: juce_PixelFormats.h:701
#define forcedinline
Definition: juce_PlatformDefs.h:294
uint32 clampPixelComponents(uint32 x) noexcept
Definition: juce_PixelFormats.h:42
forcedinline void desaturate() noexcept
Definition: juce_PixelFormats.h:556
forcedinline uint8 getAlpha() const noexcept
Definition: juce_PixelFormats.h:106
Definition: juce_PixelFormats.h:361
forcedinline void premultiply() noexcept
Definition: juce_PixelFormats.h:238
forcedinline uint8 getAlpha() const noexcept
Definition: juce_PixelFormats.h:426
class JUCE_API PixelARGB JUCE_PACKED