Agg::trans_single_path Calculating path Lengths

Source: Internet
Author: User

header file:agg/include/agg_trans_single_path.h

source file:agg/src/agg_trans_single_path.cpp

1 total_lengthStatistical path length

agg::p ath_storageps;

Ps.move_to (100,20);

Ps.line_to (10,200);

Ps.line_to (200,200);

Agg::trans_single_path Tspath;

Tspath.add_path (PS);

Double npathlen= tspath.total_length ();

2 transform

I don't know for a moment

Agg::trans_single_path Tcurve;

Tcurve.add_path (M_path_storage);

Double len = Tcurve.total_length ();

int n = 3;

Double x = len/n;

Couble y = 0;

Tcurve.transform (&x, &y);

Here x, y been transformed to the rightvalue.

Summary: Use this class to render text based on the direction of the path segment, which is not currently known:

http://sourceforge.net/p/vector-agg/mailman/message/9964153/

Agg::trans_single_path Calculating path Lengths

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.