|
| | 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 int8u * | row_ptr (int y) |
| |
| AGG_INLINE const int8u * | row_ptr (int y) const |
| |
| AGG_INLINE row_data | row (int y) const |
| |
| AGG_INLINE int8u * | pix_ptr (int x, int y) |
| |
| AGG_INLINE const int8u * | pix_ptr (int x, int y) const |
| |
| AGG_INLINE pixel_type * | pix_value_ptr (int x, int y, unsigned len) |
| |
| AGG_INLINE const pixel_type * | pix_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) |
| |
template<class Blender, class RenBuf, unsigned Step, unsigned Offset = 0>
class agg::pixfmt_alpha_blend_rgb< Blender, RenBuf, Step, Offset >
template<class Blender , class RenBuf , unsigned Step, unsigned Offset = 0>
template<class PixFmt >
322 {
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,
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.
template<class Blender , class RenBuf , unsigned Step, unsigned Offset = 0>
601 {
603
604 if (covers)
605 {
606 do
607 {
609 p = p->next();
610 }
611 while (--len);
612 }
613 else
614 {
616 {
617 do
618 {
620 p = p->next();
621 }
622 while (--len);
623 }
624 else
625 {
626 do
627 {
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().
template<class Blender , class RenBuf , unsigned Step, unsigned Offset = 0>
template<class SrcPixelFormatRenderer >
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 {
734
736 {
737 do
738 {
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 {
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 {
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().
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 {
791
792 do
793 {
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().
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 {
818
820 {
821 do
822 {
823 const color_type& color = color_lut[psrc->c[0]];
825 psrc = psrc->next();
826 pdst = pdst->next();
827 }
828 while(--len);
829 }
830 else
831 {
832 do
833 {
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().
template<class Blender , class RenBuf , unsigned Step, unsigned Offset = 0>
459 {
460 if (!
c.is_transparent())
461 {
463
465 {
466 do
467 {
468 p->set(c);
469 p = p->next();
470 }
471 while (--len);
472 }
473 else
474 {
475 do
476 {
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().
template<class Blender , class RenBuf , unsigned Step, unsigned Offset = 0>
518 {
519 if (!
c.is_transparent())
520 {
522
523 do
524 {
526 {
527 p->set(c);
528 }
529 else
530 {
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().
template<class Blender , class RenBuf , unsigned Step, unsigned Offset = 0>
546 {
547 if (!
c.is_transparent())
548 {
549 do
550 {
552
554 {
555 p->set(c);
556 }
557 else
558 {
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().
template<class Blender , class RenBuf , unsigned Step, unsigned Offset = 0>
282 {
283 if (!
c.is_transparent())
284 {
286 {
287 p->set(c);
288 }
289 else
290 {
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().
template<class Blender , class RenBuf , unsigned Step, unsigned Offset = 0>
template<class Function >
674 {
675 for (
unsigned y = 0;
y <
height(); ++
y)
676 {
678 if (r.ptr)
679 {
680 unsigned len = r.x2 - r.x1 + 1;
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().
template<class Blender , class RenBuf , unsigned Step, unsigned Offset = 0>
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().