1/* 2 * Copyright 2006, Stephan A��mus <superstippi@gmx.de>. 3 * Copyright 2008, Andrej Spielmann <andrej.spielmann@seh.ox.ac.uk>. 4 * All rights reserved. Distributed under the terms of the MIT License. 5 * 6 * DrawingMode implementing B_OP_COPY for text on B_RGBA32. 7 * 8 */ 9 10#ifndef DRAWING_MODE_COPY_TEXT_SUBPIX_H 11#define DRAWING_MODE_COPY_TEXT_SUBPIX_H 12 13#include "DrawingModeCopySUBPIX.h" 14#include "GlobalSubpixelSettings.h" 15 16// blend_solid_hspan_copy_text_subpix 17void 18blend_solid_hspan_copy_text_subpix(int x, int y, unsigned len, 19 const color_type& c, const uint8* covers, agg_buffer* buffer, 20 const PatternHandler* pattern) 21{ 22//printf("blend_solid_hspan_copy_text(%d, %d)\n", x, len); 23 uint8* p = buffer->row_ptr(y) + (x << 2); 24 rgb_color l = pattern->LowColor(); 25 const int subpixelL = gSubpixelOrderingRGB ? 2 : 0; 26 const int subpixelM = 1; 27 const int subpixelR = gSubpixelOrderingRGB ? 0 : 2; 28 do { 29 BLEND_COPY_SUBPIX(p, c.r, c.g, c.b, covers[subpixelL], 30 covers[subpixelM], covers[subpixelR], l.red, l.green, l.blue); 31 covers += 3; 32 p += 4; 33 x++; 34 len -= 3; 35 } while (len); 36} 37 38#endif // DRAWING_MODE_COPY_TEXT_SUBPIX_H 39 40