Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

AGG lesson 17 Bezier curve control points

2025-03-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/02 Report--

Extracted from: http://blog.chinaunix.net/uid-20622737-id-3161025.html

/ / Bezier curve, the input parameters are the starting point coordinates, the first control point coordinates, the end point coordinates

/ / curve4 also adds the coordinates of the second control point as a parameter

Agg::curve3 curve (20,20,130,130,600,240)

Agg::conv_stroke stroke2 (curve)

Ras.add_path (stroke2)

Agg::render_scanlines_aa_solid (ras,sl,renb,agg::rgba8 (255j0pl 0))

At present, there is no use of any Bezier curve, nor any processing of related information, just a brief introduction to the use of this function. The control points described above do not make any adjustments, so they do not look like any curves and need to be calculated mathematically.

Describe again:

/ / Bezier curve, the input parameters are the starting point coordinates, the first control point coordinates, the end point coordinates

/ / curve4 also adds the coordinates of the second control point as a parameter

The constructor of the curve3 class is as follows:

Curve3 (double x1, double y1)

Double x2, double y2

Double x3, double y3)

The constructor of the curve4 class is as follows:

Curve4 (double x1, double y1)

Double x2, double y2

Double x3, double y3

Double x4, double y4)

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report