AGG::RASTERIZER_SCANLINE_AA Paint Fill Color triangle

Source: Internet
Author: User

In the last two sections, it was mentioned that AGG::RASTERIZER_SCANLINE_AA also support drawing lines, but unfortunately, we call the class move_to,line_to function completely without any effect, draw line, is not the picture, But in fact it is we do not set the width of the line segment, the end of the line shape, there is no way to call Agg::conv_stroke Ah!! And there is a problem, using move_to to replace the move_to_d, and then, can not be rendered at all, and try to render a rectangle, fiasco Ah!!

The code is as follows:

Scanline Rasterizer Rasterization, said she was the album, describing all we were about to portray patterns, colors, lines,

But it is not true, because she is just a container, a specification that records line segments, signs, detailed parameters,

Not even a sketch, she was more like a cookbook, which recorded the ingredients and recorded the cooking process, that's all.

Agg::rasterizer_scanline_aa<> RAS;

AGG::SCANLINE_U8 SL;

Ras.reset ();

Build triangles with fill color blue, support floating-point numbers

Ras.move_to_d (500,500);

Ras.line_to_d (500,600);

Ras.line_to_d (700,700);

Rensl.color (Agg::rgba8 (0,0,255));

Agg::render_scanlines (RAS,SL,RENSL);

Ras.reset ();


AGG::RASTERIZER_SCANLINE_AA Paint Fill Color triangle

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.