Prusa Slicer 2.6.0
Loading...
Searching...
No Matches
agg::pixfmt_alpha_blend_rgb< Blender, RenBuf, Step, Offset > Class Template Reference

#include <src/agg/agg_pixfmt_rgb.h>

+ Inheritance diagram for agg::pixfmt_alpha_blend_rgb< Blender, RenBuf, Step, Offset >:

Classes

struct  pixel_type
 

Public Types

enum  { num_components = 3 , pix_step = Step , pix_offset = Offset , pix_width = sizeof(value_type) * pix_step }
 
typedef pixfmt_rgb_tag pixfmt_category
 
typedef RenBuf rbuf_type
 
typedef Blender blender_type
 
typedef rbuf_type::row_data row_data
 
typedef blender_type::color_type color_type
 
typedef blender_type::order_type order_type
 
typedef color_type::value_type value_type
 
typedef color_type::calc_type calc_type
 

Public Member Functions

 pixfmt_alpha_blend_rgb (rbuf_type &rb)
 
void attach (rbuf_type &rb)
 
template<class PixFmt >
bool attach (PixFmt &pixf, int x1, int y1, int x2, int y2)
 
Blender & blender ()
 
AGG_INLINE unsigned width () const
 
AGG_INLINE unsigned height () const
 
AGG_INLINE int stride () const
 
AGG_INLINE int8urow_ptr (int y)
 
AGG_INLINE const int8urow_ptr (int y) const
 
AGG_INLINE row_data row (int y) const
 
AGG_INLINE int8upix_ptr (int x, int y)
 
AGG_INLINE const int8upix_ptr (int x, int y) const
 
AGG_INLINE pixel_typepix_value_ptr (int x, int y, unsigned len)
 
AGG_INLINE const pixel_typepix_value_ptr (int x, int y) const
 
AGG_INLINE color_type pixel (int x, int y) const
 
AGG_INLINE void copy_pixel (int x, int y, const color_type &c)
 
AGG_INLINE void blend_pixel (int x, int y, const color_type &c, int8u cover)
 
AGG_INLINE void copy_hline (int x, int y, unsigned len, const color_type &c)
 
AGG_INLINE void copy_vline (int x, int y, unsigned len, const color_type &c)
 
void blend_hline (int x, int y, unsigned len, const color_type &c, int8u cover)
 
void blend_vline (int x, int y, unsigned len, const color_type &c, int8u cover)
 
void blend_solid_hspan (int x, int y, unsigned len, const color_type &c, const int8u *covers)
 
void blend_solid_vspan (int x, int y, unsigned len, const color_type &c, const int8u *covers)
 
void copy_color_hspan (int x, int y, unsigned len, const color_type *colors)
 
void copy_color_vspan (int x, int y, unsigned len, const color_type *colors)
 
void blend_color_hspan (int x, int y, unsigned len, const color_type *colors, const int8u *covers, int8u cover)
 
void blend_color_vspan (int x, int y, unsigned len, const color_type *colors, const int8u *covers, int8u cover)
 
template<class Function >
void for_each_pixel (Function f)
 
template<class GammaLut >
void apply_gamma_dir (const GammaLut &g)
 
template<class GammaLut >
void apply_gamma_inv (const GammaLut &g)
 
template<class RenBuf2 >
void copy_from (const RenBuf2 &from, int xdst, int ydst, int xsrc, int ysrc, unsigned len)
 
template<class SrcPixelFormatRenderer >
void blend_from (const SrcPixelFormatRenderer &from, int xdst, int ydst, int xsrc, int ysrc, unsigned len, int8u cover)
 
template<class SrcPixelFormatRenderer >
void blend_from_color (const SrcPixelFormatRenderer &from, const color_type &color, int xdst, int ydst, int xsrc, int ysrc, unsigned len, int8u cover)
 
template<class SrcPixelFormatRenderer >
void blend_from_lut (const SrcPixelFormatRenderer &from, const color_type *color_lut, int xdst, int ydst, int xsrc, int ysrc, unsigned len, int8u cover)
 

Static Public Member Functions

static AGG_INLINE pixel_typepix_value_ptr (void *p)
 
static AGG_INLINE const pixel_typepix_value_ptr (const void *p)
 
static AGG_INLINE void write_plain_color (void *p, color_type c)
 
static AGG_INLINE color_type read_plain_color (const void *p)
 
static AGG_INLINE void make_pix (int8u *p, const color_type &c)
 

Private Member Functions

AGG_INLINE void blend_pix (pixel_type *p, value_type r, value_type g, value_type b, value_type a, unsigned cover)
 
AGG_INLINE void blend_pix (pixel_type *p, value_type r, value_type g, value_type b, value_type a)
 
AGG_INLINE void blend_pix (pixel_type *p, const color_type &c, unsigned cover)
 
AGG_INLINE void blend_pix (pixel_type *p, const color_type &c)
 
AGG_INLINE void copy_or_blend_pix (pixel_type *p, const color_type &c, unsigned cover)
 
AGG_INLINE void copy_or_blend_pix (pixel_type *p, const color_type &c)
 

Private Attributes

rbuf_typem_rbuf
 
Blender m_blender
 

Detailed Description

template<class Blender, class RenBuf, unsigned Step, unsigned Offset = 0>
class agg::pixfmt_alpha_blend_rgb< Blender, RenBuf, Step, Offset >

Member Typedef Documentation

◆ blender_type

template<class Blender , class RenBuf , unsigned Step, unsigned Offset = 0>
typedef Blender agg::pixfmt_alpha_blend_rgb< Blender, RenBuf, Step, Offset >::blender_type

◆ calc_type

template<class Blender , class RenBuf , unsigned Step, unsigned Offset = 0>
typedef color_type::calc_type agg::pixfmt_alpha_blend_rgb< Blender, RenBuf, Step, Offset >::calc_type

◆ color_type

template<class Blender , class RenBuf , unsigned Step, unsigned Offset = 0>
typedef blender_type::color_type agg::pixfmt_alpha_blend_rgb< Blender, RenBuf, Step, Offset >::color_type

◆ order_type

template<class Blender , class RenBuf , unsigned Step, unsigned Offset = 0>
typedef blender_type::order_type agg::pixfmt_alpha_blend_rgb< Blender, RenBuf, Step, Offset >::order_type

◆ pixfmt_category

template<class Blender , class RenBuf , unsigned Step, unsigned Offset = 0>
typedef pixfmt_rgb_tag agg::pixfmt_alpha_blend_rgb< Blender, RenBuf, Step, Offset >::pixfmt_category

◆ rbuf_type

template<class Blender , class RenBuf , unsigned Step, unsigned Offset = 0>
typedef RenBuf agg::pixfmt_alpha_blend_rgb< Blender, RenBuf, Step, Offset >::rbuf_type

◆ row_data

template<class Blender , class RenBuf , unsigned Step, unsigned Offset = 0>
typedef rbuf_type::row_data agg::pixfmt_alpha_blend_rgb< Blender, RenBuf, Step, Offset >::row_data

◆ value_type

template<class Blender , class RenBuf , unsigned Step, unsigned Offset = 0>
typedef color_type::value_type agg::pixfmt_alpha_blend_rgb< Blender, RenBuf, Step, Offset >::value_type

Member Enumeration Documentation

◆ anonymous enum

template<class Blender , class RenBuf , unsigned Step, unsigned Offset = 0>
anonymous enum
Enumerator
num_components 
pix_step 
pix_offset 
pix_width 
194 {
195 num_components = 3,
196 pix_step = Step,
197 pix_offset = Offset,
198 pix_width = sizeof(value_type) * pix_step
199 };
@ num_components
Definition agg_pixfmt_rgb.h:195
@ pix_width
Definition agg_pixfmt_rgb.h:198
@ pix_step
Definition agg_pixfmt_rgb.h:196
@ pix_offset
Definition agg_pixfmt_rgb.h:197
color_type::value_type value_type
Definition agg_pixfmt_rgb.h:191

Constructor & Destructor Documentation

◆ pixfmt_alpha_blend_rgb()

template<class Blender , class RenBuf , unsigned Step, unsigned Offset = 0>
agg::pixfmt_alpha_blend_rgb< Blender, RenBuf, Step, Offset >::pixfmt_alpha_blend_rgb ( rbuf_type rb)
inlineexplicit
314 :
315 m_rbuf(&rb)
316 {}
rbuf_type * m_rbuf
Definition agg_pixfmt_rgb.h:844

Member Function Documentation

◆ apply_gamma_dir()

template<class Blender , class RenBuf , unsigned Step, unsigned Offset = 0>
template<class GammaLut >
void agg::pixfmt_alpha_blend_rgb< Blender, RenBuf, Step, Offset >::apply_gamma_dir ( const GammaLut &  g)
inline
694 {
695 for_each_pixel(apply_gamma_dir_rgb<color_type, order_type, GammaLut>(g));
696 }
void for_each_pixel(Function f)
Definition agg_pixfmt_rgb.h:673

References agg::pixfmt_alpha_blend_rgb< Blender, RenBuf, Step, Offset >::for_each_pixel().

+ Here is the call graph for this function:

◆ apply_gamma_inv()

template<class Blender , class RenBuf , unsigned Step, unsigned Offset = 0>
template<class GammaLut >
void agg::pixfmt_alpha_blend_rgb< Blender, RenBuf, Step, Offset >::apply_gamma_inv ( const GammaLut &  g)
inline
700 {
701 for_each_pixel(apply_gamma_inv_rgb<color_type, order_type, GammaLut>(g));
702 }

References agg::pixfmt_alpha_blend_rgb< Blender, RenBuf, Step, Offset >::for_each_pixel().

+ Here is the call graph for this function:

◆ attach() [1/2]

template<class Blender , class RenBuf , unsigned Step, unsigned Offset = 0>
template<class PixFmt >
bool agg::pixfmt_alpha_blend_rgb< Blender, RenBuf, Step, Offset >::attach ( PixFmt &  pixf,
int  x1,
int  y1,
int  x2,
int  y2 
)
inline
322 {
323 rect_i r(x1, y1, x2, y2);
324 if (r.clip(rect_i(0, 0, pixf.width()-1, pixf.height()-1)))
325 {
326 int stride = pixf.stride();
327 m_rbuf->attach(pixf.pix_ptr(r.x1, stride < 0 ? r.y2 : r.y1),
328 (r.x2 - r.x1) + 1,
329 (r.y2 - r.y1) + 1,
330 stride);
331 return true;
332 }
333 return false;
334 }
AGG_INLINE int stride() const
Definition agg_pixfmt_rgb.h:342
rect_base< int > rect_i
Definition agg_basics.h:363

References agg::rect_base< T >::clip(), agg::pixfmt_alpha_blend_rgb< Blender, RenBuf, Step, Offset >::m_rbuf, agg::pixfmt_alpha_blend_rgb< Blender, RenBuf, Step, Offset >::stride(), agg::rect_base< T >::x1, agg::rect_base< T >::x2, agg::rect_base< T >::y1, and agg::rect_base< T >::y2.

+ Here is the call graph for this function:

◆ attach() [2/2]

template<class Blender , class RenBuf , unsigned Step, unsigned Offset = 0>
void agg::pixfmt_alpha_blend_rgb< Blender, RenBuf, Step, Offset >::attach ( rbuf_type rb)
inline

◆ blend_color_hspan()

template<class Blender , class RenBuf , unsigned Step, unsigned Offset = 0>
void agg::pixfmt_alpha_blend_rgb< Blender, RenBuf, Step, Offset >::blend_color_hspan ( int  x,
int  y,
unsigned  len,
const color_type colors,
const int8u covers,
int8u  cover 
)
inline
601 {
602 pixel_type* p = pix_value_ptr(x, y, len);
603
604 if (covers)
605 {
606 do
607 {
608 copy_or_blend_pix(p, *colors++, *covers++);
609 p = p->next();
610 }
611 while (--len);
612 }
613 else
614 {
615 if (cover == cover_mask)
616 {
617 do
618 {
619 copy_or_blend_pix(p, *colors++);
620 p = p->next();
621 }
622 while (--len);
623 }
624 else
625 {
626 do
627 {
628 copy_or_blend_pix(p, *colors++, cover);
629 p = p->next();
630 }
631 while (--len);
632 }
633 }
634 }
AGG_INLINE void copy_or_blend_pix(pixel_type *p, const color_type &c, unsigned cover)
Definition agg_pixfmt_rgb.h:281
AGG_INLINE pixel_type * pix_value_ptr(int x, int y, unsigned len)
Definition agg_pixfmt_rgb.h:361
@ cover_mask
Definition agg_basics.h:242

References agg::pixfmt_alpha_blend_rgb< Blender, RenBuf, Step, Offset >::copy_or_blend_pix(), agg::cover_mask, agg::pixfmt_alpha_blend_rgb< Blender, RenBuf, Step, Offset >::pixel_type::next(), and agg::pixfmt_alpha_blend_rgb< Blender, RenBuf, Step, Offset >::pix_value_ptr().

+ Here is the call graph for this function:

◆ blend_color_vspan()

template<class Blender , class RenBuf , unsigned Step, unsigned Offset = 0>
void agg::pixfmt_alpha_blend_rgb< Blender, RenBuf, Step, Offset >::blend_color_vspan ( int  x,
int  y,
unsigned  len,
const color_type colors,
const int8u covers,
int8u  cover 
)
inline
642 {
643 if (covers)
644 {
645 do
646 {
647 copy_or_blend_pix(pix_value_ptr(x, y++, 1), *colors++, *covers++);
648 }
649 while (--len);
650 }
651 else
652 {
653 if (cover == cover_mask)
654 {
655 do
656 {
657 copy_or_blend_pix(pix_value_ptr(x, y++, 1), *colors++);
658 }
659 while (--len);
660 }
661 else
662 {
663 do
664 {
665 copy_or_blend_pix(pix_value_ptr(x, y++, 1), *colors++, cover);
666 }
667 while (--len);
668 }
669 }
670 }

References agg::pixfmt_alpha_blend_rgb< Blender, RenBuf, Step, Offset >::copy_or_blend_pix(), agg::cover_mask, and agg::pixfmt_alpha_blend_rgb< Blender, RenBuf, Step, Offset >::pix_value_ptr().

+ Here is the call graph for this function:

◆ blend_from()

template<class Blender , class RenBuf , unsigned Step, unsigned Offset = 0>
template<class SrcPixelFormatRenderer >
void agg::pixfmt_alpha_blend_rgb< Blender, RenBuf, Step, Offset >::blend_from ( const SrcPixelFormatRenderer &  from,
int  xdst,
int  ydst,
int  xsrc,
int  ysrc,
unsigned  len,
int8u  cover 
)
inline
727 {
728 typedef typename SrcPixelFormatRenderer::pixel_type src_pixel_type;
729 typedef typename SrcPixelFormatRenderer::order_type src_order;
730
731 if (const src_pixel_type* psrc = from.pix_value_ptr(xsrc, ysrc))
732 {
733 pixel_type* pdst = pix_value_ptr(xdst, ydst, len);
734
735 if (cover == cover_mask)
736 {
737 do
738 {
739 value_type alpha = psrc->c[src_order::A];
740 if (alpha <= color_type::empty_value())
741 {
742 if (alpha >= color_type::full_value())
743 {
744 pdst->c[order_type::R] = psrc->c[src_order::R];
745 pdst->c[order_type::G] = psrc->c[src_order::G];
746 pdst->c[order_type::B] = psrc->c[src_order::B];
747 }
748 else
749 {
750 blend_pix(pdst,
751 psrc->c[src_order::R],
752 psrc->c[src_order::G],
753 psrc->c[src_order::B],
754 alpha);
755 }
756 }
757 psrc = psrc->next();
758 pdst = pdst->next();
759 }
760 while(--len);
761 }
762 else
763 {
764 do
765 {
766 copy_or_blend_pix(pdst, psrc->get(), cover);
767 psrc = psrc->next();
768 pdst = pdst->next();
769 }
770 while (--len);
771 }
772 }
773 }
AGG_INLINE void blend_pix(pixel_type *p, value_type r, value_type g, value_type b, value_type a, unsigned cover)
Definition agg_pixfmt_rgb.h:254

References agg::pixfmt_alpha_blend_rgb< Blender, RenBuf, Step, Offset >::blend_pix(), agg::pixfmt_alpha_blend_rgb< Blender, RenBuf, Step, Offset >::pixel_type::c, agg::pixfmt_alpha_blend_rgb< Blender, RenBuf, Step, Offset >::copy_or_blend_pix(), agg::cover_mask, agg::pixfmt_alpha_blend_rgb< Blender, RenBuf, Step, Offset >::pixel_type::get(), agg::pixfmt_alpha_blend_rgb< Blender, RenBuf, Step, Offset >::pixel_type::next(), and agg::pixfmt_alpha_blend_rgb< Blender, RenBuf, Step, Offset >::pix_value_ptr().

+ Here is the call graph for this function:

◆ blend_from_color()

template<class Blender , class RenBuf , unsigned Step, unsigned Offset = 0>
template<class SrcPixelFormatRenderer >
void agg::pixfmt_alpha_blend_rgb< Blender, RenBuf, Step, Offset >::blend_from_color ( const SrcPixelFormatRenderer &  from,
const color_type color,
int  xdst,
int  ydst,
int  xsrc,
int  ysrc,
unsigned  len,
int8u  cover 
)
inline
784 {
785 typedef typename SrcPixelFormatRenderer::pixel_type src_pixel_type;
786 typedef typename SrcPixelFormatRenderer::color_type src_color_type;
787
788 if (const src_pixel_type* psrc = from.pix_value_ptr(xsrc, ysrc))
789 {
790 pixel_type* pdst = pix_value_ptr(xdst, ydst, len);
791
792 do
793 {
794 copy_or_blend_pix(pdst, color, src_color_type::scale_cover(cover, psrc->c[0]));
795 psrc = psrc->next();
796 pdst = pdst->next();
797 }
798 while (--len);
799 }
800 }

References agg::pixfmt_alpha_blend_rgb< Blender, RenBuf, Step, Offset >::copy_or_blend_pix(), agg::pixfmt_alpha_blend_rgb< Blender, RenBuf, Step, Offset >::pixel_type::next(), and agg::pixfmt_alpha_blend_rgb< Blender, RenBuf, Step, Offset >::pix_value_ptr().

+ Here is the call graph for this function:

◆ blend_from_lut()

template<class Blender , class RenBuf , unsigned Step, unsigned Offset = 0>
template<class SrcPixelFormatRenderer >
void agg::pixfmt_alpha_blend_rgb< Blender, RenBuf, Step, Offset >::blend_from_lut ( const SrcPixelFormatRenderer &  from,
const color_type color_lut,
int  xdst,
int  ydst,
int  xsrc,
int  ysrc,
unsigned  len,
int8u  cover 
)
inline
812 {
813 typedef typename SrcPixelFormatRenderer::pixel_type src_pixel_type;
814
815 if (const src_pixel_type* psrc = from.pix_value_ptr(xsrc, ysrc))
816 {
817 pixel_type* pdst = pix_value_ptr(xdst, ydst, len);
818
819 if (cover == cover_mask)
820 {
821 do
822 {
823 const color_type& color = color_lut[psrc->c[0]];
824 blend_pix(pdst, color);
825 psrc = psrc->next();
826 pdst = pdst->next();
827 }
828 while(--len);
829 }
830 else
831 {
832 do
833 {
834 copy_or_blend_pix(pdst, color_lut[psrc->c[0]], cover);
835 psrc = psrc->next();
836 pdst = pdst->next();
837 }
838 while(--len);
839 }
840 }
841 }
blender_type::color_type color_type
Definition agg_pixfmt_rgb.h:189

References agg::pixfmt_alpha_blend_rgb< Blender, RenBuf, Step, Offset >::blend_pix(), agg::pixfmt_alpha_blend_rgb< Blender, RenBuf, Step, Offset >::copy_or_blend_pix(), agg::cover_mask, agg::pixfmt_alpha_blend_rgb< Blender, RenBuf, Step, Offset >::pixel_type::next(), and agg::pixfmt_alpha_blend_rgb< Blender, RenBuf, Step, Offset >::pix_value_ptr().

+ Here is the call graph for this function:

◆ blend_hline()

template<class Blender , class RenBuf , unsigned Step, unsigned Offset = 0>
void agg::pixfmt_alpha_blend_rgb< Blender, RenBuf, Step, Offset >::blend_hline ( int  x,
int  y,
unsigned  len,
const color_type c,
int8u  cover 
)
inline
459 {
460 if (!c.is_transparent())
461 {
462 pixel_type* p = pix_value_ptr(x, y, len);
463
464 if (c.is_opaque() && cover == cover_mask)
465 {
466 do
467 {
468 p->set(c);
469 p = p->next();
470 }
471 while (--len);
472 }
473 else
474 {
475 do
476 {
477 blend_pix(p, c, cover);
478 p = p->next();
479 }
480 while (--len);
481 }
482 }
483 }

References agg::pixfmt_alpha_blend_rgb< Blender, RenBuf, Step, Offset >::blend_pix(), agg::cover_mask, agg::pixfmt_alpha_blend_rgb< Blender, RenBuf, Step, Offset >::pixel_type::next(), agg::pixfmt_alpha_blend_rgb< Blender, RenBuf, Step, Offset >::pix_value_ptr(), and agg::pixfmt_alpha_blend_rgb< Blender, RenBuf, Step, Offset >::pixel_type::set().

+ Here is the call graph for this function:

◆ blend_pix() [1/4]

template<class Blender , class RenBuf , unsigned Step, unsigned Offset = 0>
AGG_INLINE void agg::pixfmt_alpha_blend_rgb< Blender, RenBuf, Step, Offset >::blend_pix ( pixel_type p,
const color_type c 
)
inlineprivate

◆ blend_pix() [2/4]

template<class Blender , class RenBuf , unsigned Step, unsigned Offset = 0>
AGG_INLINE void agg::pixfmt_alpha_blend_rgb< Blender, RenBuf, Step, Offset >::blend_pix ( pixel_type p,
const color_type c,
unsigned  cover 
)
inlineprivate

◆ blend_pix() [3/4]

template<class Blender , class RenBuf , unsigned Step, unsigned Offset = 0>
AGG_INLINE void agg::pixfmt_alpha_blend_rgb< Blender, RenBuf, Step, Offset >::blend_pix ( pixel_type p,
value_type  r,
value_type  g,
value_type  b,
value_type  a 
)
inlineprivate

◆ blend_pix() [4/4]

◆ blend_pixel()

template<class Blender , class RenBuf , unsigned Step, unsigned Offset = 0>
AGG_INLINE void agg::pixfmt_alpha_blend_rgb< Blender, RenBuf, Step, Offset >::blend_pixel ( int  x,
int  y,
const color_type c,
int8u  cover 
)
inline
423 {
424 copy_or_blend_pix(pix_value_ptr(x, y, 1), c, cover);
425 }

References agg::pixfmt_alpha_blend_rgb< Blender, RenBuf, Step, Offset >::copy_or_blend_pix(), and agg::pixfmt_alpha_blend_rgb< Blender, RenBuf, Step, Offset >::pix_value_ptr().

+ Here is the call graph for this function:

◆ blend_solid_hspan()

template<class Blender , class RenBuf , unsigned Step, unsigned Offset = 0>
void agg::pixfmt_alpha_blend_rgb< Blender, RenBuf, Step, Offset >::blend_solid_hspan ( int  x,
int  y,
unsigned  len,
const color_type c,
const int8u covers 
)
inline
518 {
519 if (!c.is_transparent())
520 {
521 pixel_type* p = pix_value_ptr(x, y, len);
522
523 do
524 {
525 if (c.is_opaque() && *covers == cover_mask)
526 {
527 p->set(c);
528 }
529 else
530 {
531 blend_pix(p, c, *covers);
532 }
533 p = p->next();
534 ++covers;
535 }
536 while (--len);
537 }
538 }

References agg::pixfmt_alpha_blend_rgb< Blender, RenBuf, Step, Offset >::blend_pix(), agg::cover_mask, agg::pixfmt_alpha_blend_rgb< Blender, RenBuf, Step, Offset >::pixel_type::next(), agg::pixfmt_alpha_blend_rgb< Blender, RenBuf, Step, Offset >::pix_value_ptr(), and agg::pixfmt_alpha_blend_rgb< Blender, RenBuf, Step, Offset >::pixel_type::set().

+ Here is the call graph for this function:

◆ blend_solid_vspan()

template<class Blender , class RenBuf , unsigned Step, unsigned Offset = 0>
void agg::pixfmt_alpha_blend_rgb< Blender, RenBuf, Step, Offset >::blend_solid_vspan ( int  x,
int  y,
unsigned  len,
const color_type c,
const int8u covers 
)
inline
546 {
547 if (!c.is_transparent())
548 {
549 do
550 {
551 pixel_type* p = pix_value_ptr(x, y++, 1);
552
553 if (c.is_opaque() && *covers == cover_mask)
554 {
555 p->set(c);
556 }
557 else
558 {
559 blend_pix(p, c, *covers);
560 }
561 ++covers;
562 }
563 while (--len);
564 }
565 }

References agg::pixfmt_alpha_blend_rgb< Blender, RenBuf, Step, Offset >::blend_pix(), agg::cover_mask, agg::pixfmt_alpha_blend_rgb< Blender, RenBuf, Step, Offset >::pix_value_ptr(), and agg::pixfmt_alpha_blend_rgb< Blender, RenBuf, Step, Offset >::pixel_type::set().

+ Here is the call graph for this function:

◆ blend_vline()

template<class Blender , class RenBuf , unsigned Step, unsigned Offset = 0>
void agg::pixfmt_alpha_blend_rgb< Blender, RenBuf, Step, Offset >::blend_vline ( int  x,
int  y,
unsigned  len,
const color_type c,
int8u  cover 
)
inline
491 {
492 if (!c.is_transparent())
493 {
494 if (c.is_opaque() && cover == cover_mask)
495 {
496 do
497 {
498 pix_value_ptr(x, y++, 1)->set(c);
499 }
500 while (--len);
501 }
502 else
503 {
504 do
505 {
506 blend_pix(pix_value_ptr(x, y++, 1), c, cover);
507 }
508 while (--len);
509 }
510 }
511 }
void set(value_type r, value_type g, value_type b)
Definition agg_pixfmt_rgb.h:204

References agg::pixfmt_alpha_blend_rgb< Blender, RenBuf, Step, Offset >::blend_pix(), agg::cover_mask, agg::pixfmt_alpha_blend_rgb< Blender, RenBuf, Step, Offset >::pix_value_ptr(), and agg::pixfmt_alpha_blend_rgb< Blender, RenBuf, Step, Offset >::pixel_type::set().

+ Here is the call graph for this function:

◆ blender()

template<class Blender , class RenBuf , unsigned Step, unsigned Offset = 0>
Blender & agg::pixfmt_alpha_blend_rgb< Blender, RenBuf, Step, Offset >::blender ( )
inline

◆ copy_color_hspan()

template<class Blender , class RenBuf , unsigned Step, unsigned Offset = 0>
void agg::pixfmt_alpha_blend_rgb< Blender, RenBuf, Step, Offset >::copy_color_hspan ( int  x,
int  y,
unsigned  len,
const color_type colors 
)
inline
571 {
572 pixel_type* p = pix_value_ptr(x, y, len);
573
574 do
575 {
576 p->set(*colors++);
577 p = p->next();
578 }
579 while (--len);
580 }

References agg::pixfmt_alpha_blend_rgb< Blender, RenBuf, Step, Offset >::pixel_type::next(), agg::pixfmt_alpha_blend_rgb< Blender, RenBuf, Step, Offset >::pix_value_ptr(), and agg::pixfmt_alpha_blend_rgb< Blender, RenBuf, Step, Offset >::pixel_type::set().

+ Here is the call graph for this function:

◆ copy_color_vspan()

template<class Blender , class RenBuf , unsigned Step, unsigned Offset = 0>
void agg::pixfmt_alpha_blend_rgb< Blender, RenBuf, Step, Offset >::copy_color_vspan ( int  x,
int  y,
unsigned  len,
const color_type colors 
)
inline
587 {
588 do
589 {
590 pix_value_ptr(x, y++, 1)->set(*colors++);
591 }
592 while (--len);
593 }

References agg::pixfmt_alpha_blend_rgb< Blender, RenBuf, Step, Offset >::pix_value_ptr(), and agg::pixfmt_alpha_blend_rgb< Blender, RenBuf, Step, Offset >::pixel_type::set().

+ Here is the call graph for this function:

◆ copy_from()

template<class Blender , class RenBuf , unsigned Step, unsigned Offset = 0>
template<class RenBuf2 >
void agg::pixfmt_alpha_blend_rgb< Blender, RenBuf, Step, Offset >::copy_from ( const RenBuf2 &  from,
int  xdst,
int  ydst,
int  xsrc,
int  ysrc,
unsigned  len 
)
inline
710 {
711 if (const int8u* p = from.row_ptr(ysrc))
712 {
713 memmove(m_rbuf->row_ptr(xdst, ydst, len) + xdst * pix_width,
714 p + xsrc * pix_width,
715 len * pix_width);
716 }
717 }
AGG_INT8U int8u
Definition agg_basics.h:120

References agg::pixfmt_alpha_blend_rgb< Blender, RenBuf, Step, Offset >::m_rbuf, and agg::pixfmt_alpha_blend_rgb< Blender, RenBuf, Step, Offset >::pix_width.

◆ copy_hline()

template<class Blender , class RenBuf , unsigned Step, unsigned Offset = 0>
AGG_INLINE void agg::pixfmt_alpha_blend_rgb< Blender, RenBuf, Step, Offset >::copy_hline ( int  x,
int  y,
unsigned  len,
const color_type c 
)
inline
431 {
432 pixel_type* p = pix_value_ptr(x, y, len);
433 do
434 {
435 p->set(c);
436 p = p->next();
437 }
438 while(--len);
439 }

References agg::pixfmt_alpha_blend_rgb< Blender, RenBuf, Step, Offset >::pixel_type::next(), agg::pixfmt_alpha_blend_rgb< Blender, RenBuf, Step, Offset >::pix_value_ptr(), and agg::pixfmt_alpha_blend_rgb< Blender, RenBuf, Step, Offset >::pixel_type::set().

+ Here is the call graph for this function:

◆ copy_or_blend_pix() [1/2]

template<class Blender , class RenBuf , unsigned Step, unsigned Offset = 0>
AGG_INLINE void agg::pixfmt_alpha_blend_rgb< Blender, RenBuf, Step, Offset >::copy_or_blend_pix ( pixel_type p,
const color_type c 
)
inlineprivate
298 {
299 if (!c.is_transparent())
300 {
301 if (c.is_opaque())
302 {
303 p->set(c);
304 }
305 else
306 {
307 blend_pix(p, c);
308 }
309 }
310 }

References agg::pixfmt_alpha_blend_rgb< Blender, RenBuf, Step, Offset >::blend_pix(), and agg::pixfmt_alpha_blend_rgb< Blender, RenBuf, Step, Offset >::pixel_type::set().

+ Here is the call graph for this function:

◆ copy_or_blend_pix() [2/2]

template<class Blender , class RenBuf , unsigned Step, unsigned Offset = 0>
AGG_INLINE void agg::pixfmt_alpha_blend_rgb< Blender, RenBuf, Step, Offset >::copy_or_blend_pix ( pixel_type p,
const color_type c,
unsigned  cover 
)
inlineprivate
282 {
283 if (!c.is_transparent())
284 {
285 if (c.is_opaque() && cover == cover_mask)
286 {
287 p->set(c);
288 }
289 else
290 {
291 blend_pix(p, c, cover);
292 }
293 }
294 }

References agg::pixfmt_alpha_blend_rgb< Blender, RenBuf, Step, Offset >::blend_pix(), agg::cover_mask, and agg::pixfmt_alpha_blend_rgb< Blender, RenBuf, Step, Offset >::pixel_type::set().

Referenced by agg::pixfmt_alpha_blend_rgb< Blender, RenBuf, Step, Offset >::blend_color_hspan(), agg::pixfmt_alpha_blend_rgb< Blender, RenBuf, Step, Offset >::blend_color_vspan(), agg::pixfmt_alpha_blend_rgb< Blender, RenBuf, Step, Offset >::blend_from(), agg::pixfmt_alpha_blend_rgb< Blender, RenBuf, Step, Offset >::blend_from_color(), agg::pixfmt_alpha_blend_rgb< Blender, RenBuf, Step, Offset >::blend_from_lut(), and agg::pixfmt_alpha_blend_rgb< Blender, RenBuf, Step, Offset >::blend_pixel().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ copy_pixel()

template<class Blender , class RenBuf , unsigned Step, unsigned Offset = 0>
AGG_INLINE void agg::pixfmt_alpha_blend_rgb< Blender, RenBuf, Step, Offset >::copy_pixel ( int  x,
int  y,
const color_type c 
)
inline
417 {
418 pix_value_ptr(x, y, 1)->set(c);
419 }

References agg::pixfmt_alpha_blend_rgb< Blender, RenBuf, Step, Offset >::pix_value_ptr(), and agg::pixfmt_alpha_blend_rgb< Blender, RenBuf, Step, Offset >::pixel_type::set().

+ Here is the call graph for this function:

◆ copy_vline()

template<class Blender , class RenBuf , unsigned Step, unsigned Offset = 0>
AGG_INLINE void agg::pixfmt_alpha_blend_rgb< Blender, RenBuf, Step, Offset >::copy_vline ( int  x,
int  y,
unsigned  len,
const color_type c 
)
inline
446 {
447 do
448 {
449 pix_value_ptr(x, y++, 1)->set(c);
450 }
451 while (--len);
452 }

References agg::pixfmt_alpha_blend_rgb< Blender, RenBuf, Step, Offset >::pix_value_ptr(), and agg::pixfmt_alpha_blend_rgb< Blender, RenBuf, Step, Offset >::pixel_type::set().

+ Here is the call graph for this function:

◆ for_each_pixel()

template<class Blender , class RenBuf , unsigned Step, unsigned Offset = 0>
template<class Function >
void agg::pixfmt_alpha_blend_rgb< Blender, RenBuf, Step, Offset >::for_each_pixel ( Function  f)
inline
674 {
675 for (unsigned y = 0; y < height(); ++y)
676 {
677 row_data r = m_rbuf->row(y);
678 if (r.ptr)
679 {
680 unsigned len = r.x2 - r.x1 + 1;
681 pixel_type* p = pix_value_ptr(r.x1, y, len);
682 do
683 {
684 f(p->c);
685 p = p->next();
686 }
687 while (--len);
688 }
689 }
690 }
rbuf_type::row_data row_data
Definition agg_pixfmt_rgb.h:188
AGG_INLINE unsigned height() const
Definition agg_pixfmt_rgb.h:341
const Scalar & y
Definition MathFunctions.h:552

References agg::pixfmt_alpha_blend_rgb< Blender, RenBuf, Step, Offset >::pixel_type::c, agg::pixfmt_alpha_blend_rgb< Blender, RenBuf, Step, Offset >::height(), agg::pixfmt_alpha_blend_rgb< Blender, RenBuf, Step, Offset >::m_rbuf, agg::pixfmt_alpha_blend_rgb< Blender, RenBuf, Step, Offset >::pixel_type::next(), and agg::pixfmt_alpha_blend_rgb< Blender, RenBuf, Step, Offset >::pix_value_ptr().

Referenced by agg::pixfmt_alpha_blend_rgb< Blender, RenBuf, Step, Offset >::apply_gamma_dir(), and agg::pixfmt_alpha_blend_rgb< Blender, RenBuf, Step, Offset >::apply_gamma_inv().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ height()

template<class Blender , class RenBuf , unsigned Step, unsigned Offset = 0>
AGG_INLINE unsigned agg::pixfmt_alpha_blend_rgb< Blender, RenBuf, Step, Offset >::height ( ) const
inline
341{ return m_rbuf->height(); }

References agg::pixfmt_alpha_blend_rgb< Blender, RenBuf, Step, Offset >::m_rbuf.

Referenced by agg::pixfmt_alpha_blend_rgb< Blender, RenBuf, Step, Offset >::for_each_pixel().

+ Here is the caller graph for this function:

◆ make_pix()

template<class Blender , class RenBuf , unsigned Step, unsigned Offset = 0>
static AGG_INLINE void agg::pixfmt_alpha_blend_rgb< Blender, RenBuf, Step, Offset >::make_pix ( int8u p,
const color_type c 
)
inlinestatic
401 {
402 ((pixel_type*)p)->set(c);
403 }

◆ pix_ptr() [1/2]

template<class Blender , class RenBuf , unsigned Step, unsigned Offset = 0>
AGG_INLINE int8u * agg::pixfmt_alpha_blend_rgb< Blender, RenBuf, Step, Offset >::pix_ptr ( int  x,
int  y 
)
inline

◆ pix_ptr() [2/2]

template<class Blender , class RenBuf , unsigned Step, unsigned Offset = 0>
AGG_INLINE const int8u * agg::pixfmt_alpha_blend_rgb< Blender, RenBuf, Step, Offset >::pix_ptr ( int  x,
int  y 
) const
inline

◆ pix_value_ptr() [1/4]

template<class Blender , class RenBuf , unsigned Step, unsigned Offset = 0>
static AGG_INLINE const pixel_type * agg::pixfmt_alpha_blend_rgb< Blender, RenBuf, Step, Offset >::pix_value_ptr ( const void p)
inlinestatic
381 {
382 return (const pixel_type*)((const value_type*)p + pix_offset);
383 }

References agg::pixfmt_alpha_blend_rgb< Blender, RenBuf, Step, Offset >::pix_offset.

◆ pix_value_ptr() [2/4]

template<class Blender , class RenBuf , unsigned Step, unsigned Offset = 0>
AGG_INLINE const pixel_type * agg::pixfmt_alpha_blend_rgb< Blender, RenBuf, Step, Offset >::pix_value_ptr ( int  x,
int  y 
) const
inline

◆ pix_value_ptr() [3/4]

template<class Blender , class RenBuf , unsigned Step, unsigned Offset = 0>
AGG_INLINE pixel_type * agg::pixfmt_alpha_blend_rgb< Blender, RenBuf, Step, Offset >::pix_value_ptr ( int  x,
int  y,
unsigned  len 
)
inline
362 {
363 return (pixel_type*)(m_rbuf->row_ptr(x, y, len) + sizeof(value_type) * (x * pix_step + pix_offset));
364 }

References agg::pixfmt_alpha_blend_rgb< Blender, RenBuf, Step, Offset >::m_rbuf, agg::pixfmt_alpha_blend_rgb< Blender, RenBuf, Step, Offset >::pix_offset, and agg::pixfmt_alpha_blend_rgb< Blender, RenBuf, Step, Offset >::pix_step.

Referenced by agg::pixfmt_alpha_blend_rgb< Blender, RenBuf, Step, Offset >::blend_color_hspan(), agg::pixfmt_alpha_blend_rgb< Blender, RenBuf, Step, Offset >::blend_color_vspan(), agg::pixfmt_alpha_blend_rgb< Blender, RenBuf, Step, Offset >::blend_from(), agg::pixfmt_alpha_blend_rgb< Blender, RenBuf, Step, Offset >::blend_from_color(), agg::pixfmt_alpha_blend_rgb< Blender, RenBuf, Step, Offset >::blend_from_lut(), agg::pixfmt_alpha_blend_rgb< Blender, RenBuf, Step, Offset >::blend_hline(), agg::pixfmt_alpha_blend_rgb< Blender, RenBuf, Step, Offset >::blend_pixel(), agg::pixfmt_alpha_blend_rgb< Blender, RenBuf, Step, Offset >::blend_solid_hspan(), agg::pixfmt_alpha_blend_rgb< Blender, RenBuf, Step, Offset >::blend_solid_vspan(), agg::pixfmt_alpha_blend_rgb< Blender, RenBuf, Step, Offset >::blend_vline(), agg::pixfmt_alpha_blend_rgb< Blender, RenBuf, Step, Offset >::copy_color_hspan(), agg::pixfmt_alpha_blend_rgb< Blender, RenBuf, Step, Offset >::copy_color_vspan(), agg::pixfmt_alpha_blend_rgb< Blender, RenBuf, Step, Offset >::copy_hline(), agg::pixfmt_alpha_blend_rgb< Blender, RenBuf, Step, Offset >::copy_pixel(), agg::pixfmt_alpha_blend_rgb< Blender, RenBuf, Step, Offset >::copy_vline(), agg::pixfmt_alpha_blend_rgb< Blender, RenBuf, Step, Offset >::for_each_pixel(), agg::pixfmt_alpha_blend_rgb< Blender, RenBuf, Step, Offset >::pixel(), agg::pixfmt_alpha_blend_rgb< Blender, RenBuf, Step, Offset >::read_plain_color(), and agg::pixfmt_alpha_blend_rgb< Blender, RenBuf, Step, Offset >::write_plain_color().

+ Here is the caller graph for this function:

◆ pix_value_ptr() [4/4]

template<class Blender , class RenBuf , unsigned Step, unsigned Offset = 0>
static AGG_INLINE pixel_type * agg::pixfmt_alpha_blend_rgb< Blender, RenBuf, Step, Offset >::pix_value_ptr ( void p)
inlinestatic

◆ pixel()

template<class Blender , class RenBuf , unsigned Step, unsigned Offset = 0>
AGG_INLINE color_type agg::pixfmt_alpha_blend_rgb< Blender, RenBuf, Step, Offset >::pixel ( int  x,
int  y 
) const
inline
407 {
408 if (const pixel_type* p = pix_value_ptr(x, y))
409 {
410 return p->get();
411 }
412 return color_type::no_color();
413 }

References agg::pixfmt_alpha_blend_rgb< Blender, RenBuf, Step, Offset >::pix_value_ptr().

+ Here is the call graph for this function:

◆ read_plain_color()

template<class Blender , class RenBuf , unsigned Step, unsigned Offset = 0>
static AGG_INLINE color_type agg::pixfmt_alpha_blend_rgb< Blender, RenBuf, Step, Offset >::read_plain_color ( const void p)
inlinestatic
395 {
396 return pix_value_ptr(p)->get();
397 }
void get(value_type &r, value_type &g, value_type &b) const
Definition agg_pixfmt_rgb.h:216

References agg::pixfmt_alpha_blend_rgb< Blender, RenBuf, Step, Offset >::pixel_type::get(), and agg::pixfmt_alpha_blend_rgb< Blender, RenBuf, Step, Offset >::pix_value_ptr().

+ Here is the call graph for this function:

◆ row()

template<class Blender , class RenBuf , unsigned Step, unsigned Offset = 0>
AGG_INLINE row_data agg::pixfmt_alpha_blend_rgb< Blender, RenBuf, Step, Offset >::row ( int  y) const
inline

◆ row_ptr() [1/2]

template<class Blender , class RenBuf , unsigned Step, unsigned Offset = 0>
AGG_INLINE int8u * agg::pixfmt_alpha_blend_rgb< Blender, RenBuf, Step, Offset >::row_ptr ( int  y)
inline

◆ row_ptr() [2/2]

template<class Blender , class RenBuf , unsigned Step, unsigned Offset = 0>
AGG_INLINE const int8u * agg::pixfmt_alpha_blend_rgb< Blender, RenBuf, Step, Offset >::row_ptr ( int  y) const
inline

◆ stride()

template<class Blender , class RenBuf , unsigned Step, unsigned Offset = 0>
AGG_INLINE int agg::pixfmt_alpha_blend_rgb< Blender, RenBuf, Step, Offset >::stride ( ) const
inline
342{ return m_rbuf->stride(); }

References agg::pixfmt_alpha_blend_rgb< Blender, RenBuf, Step, Offset >::m_rbuf.

Referenced by agg::pixfmt_alpha_blend_rgb< Blender, RenBuf, Step, Offset >::attach().

+ Here is the caller graph for this function:

◆ width()

template<class Blender , class RenBuf , unsigned Step, unsigned Offset = 0>
AGG_INLINE unsigned agg::pixfmt_alpha_blend_rgb< Blender, RenBuf, Step, Offset >::width ( ) const
inline

◆ write_plain_color()

template<class Blender , class RenBuf , unsigned Step, unsigned Offset = 0>
static AGG_INLINE void agg::pixfmt_alpha_blend_rgb< Blender, RenBuf, Step, Offset >::write_plain_color ( void p,
color_type  c 
)
inlinestatic
387 {
388 // RGB formats are implicitly premultiplied.
389 c.premultiply();
390 pix_value_ptr(p)->set(c);
391 }

References agg::pixfmt_alpha_blend_rgb< Blender, RenBuf, Step, Offset >::pix_value_ptr(), and agg::pixfmt_alpha_blend_rgb< Blender, RenBuf, Step, Offset >::pixel_type::set().

+ Here is the call graph for this function:

Member Data Documentation

◆ m_blender

◆ m_rbuf


The documentation for this class was generated from the following file: