"Render engine" agg Drawing line Introduction

Source: Internet
Author: User
Tags generator

For the agg font for a very simple introduction, the following is a simple description of the agg line.
first for drawing lines, there are several lines such as ordinary lines, actual lines, lattice-like lines. Agg is supported for each line. In addition to the beginning of the line of the end of the style there are several, this property is usually identified by LineCap. It works only if you are drawing a wider segment. The legal value of this property is shown in the following table. The default value is: "Butt". The default value of "butt" specifies that the line segment should not have a cap. The end point of the line is straight and perpendicular to the direction of the line, this segment does not extend beyond its endpoint; "Round" specifies that the line segment should have a semicircle cap, the semicircle diameter equals the width of the segment, and the segment extends beyond the endpoint by half the width of the line; "Square" This value indicates that the line segment should have a rectangular cap. This value is the same as "butt", but the segment extends half of its width. There are also three attributes corresponding to the
in agg.
Below we introduce the method of drawing the agg line. For Agg, the main implementation of the virtual line is in the AGG_CONV_DASH.H header file, you can see that it mainly provides a number of methods

template<class Vertexsource, class markers=null_markers> struct conv_dash:public con
        V_adaptor_vcgen<vertexsource, Vcgen_dash, markers> {typedef markers MARKER_TYPE;

        typedef conv_adaptor_vcgen<vertexsource, Vcgen_dash, markers> Base_type;
        Conv_dash (vertexsource& vs): Conv_adaptor_vcgen<vertexsource, Vcgen_dash, markers> (VS) { 
        } void Remove_all_dashes () {base_type::generator (). Remove_all_dashes (); } void Add_dash (double dash_len, double gap_len) {Base_type::generator (). Add_dash (Dash_len 
        , Gap_len); 
        } void Dash_start (double ds) {Base_type::generator (). Dash_start (DS);
        } void Shorten (double s) {Base_type::generator (). Shorten (s);} Double Shorten () const {return Base_type::generator (). Shorten ();} 

The main purpose of the

in our development is to use the Add_dash method, which accepts two parameters, which can be easily discerned by the name of the parameter.

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.