Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 83a1025

Browse files
committed
Use blend_color_solid as suggested by @jkseppan
1 parent 340c256 commit 83a1025

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

src/_backend_agg.h

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -789,11 +789,8 @@ inline void RendererAgg::draw_text_image(GCAgg &gc, ImageArray &image, int x, in
789789
}
790790

791791
for (int yi = text.y1; yi < text.y2; ++yi) {
792-
for (int xi = text.x1; xi < text.x2; ++xi) {
793-
typename ImageArray::value_type pixel = image(
794-
yi - (y - image.dim(0)), xi - x);
795-
pixFmt.blend_pixel(xi, yi, gc.color, pixel);
796-
}
792+
pixFmt.blend_solid_hspan(text.x1, yi, (text.x2 - text.x1), gc.color,
793+
&image(yi - (y - image.dim(0)), text.x1 - x));
797794
}
798795
}
799796
}

0 commit comments

Comments
 (0)