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 24 rendering Taiji Diagram

2025-02-21 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

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

/ / draw a large white semicircle on the left

Ras.reset ()

Agg::arc arc (400,100,100,100,1.57,-1.57 false)

Ras.add_path (arc)

Ras.move_to_d (400 and 0)

Ras.line_to_d (400200)

Agg::render_scanlines_aa_solid (ras,sl,renb,agg::rgba8 (255255255))

Ras.reset ()

Agg::arc arc1 (400,100,100,1.57,-1.57)

Ras.add_path (arc1)

Ras.edge_d (4004.0400200)

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

/ / draw the small white semicircle above

Ras.reset ()

Agg::arc arc2 (400,50,50,50,1.57,-1.57)

Ras.add_path (arc2)

Ras.auto_close (true)

Agg::render_scanlines_aa_solid (ras,sl,renb,agg::rgba8 (255255255))

/ / draw the small black semicircle below

Ras.reset ()

Agg::arc arc3 (400,150,50,50,1.57,-1.57 false)

Ras.add_path (arc3)

Ras.close_polygon ()

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

/ / draw the black Taiji eye above

Ras.reset ()

Agg::ellipse ell (400, 50, 10, 10)

Ras.add_path (ell)

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

/ / draw the white Taiji eye below

Ras.reset ()

Agg::ellipse ell1 (400, 150, 150, 10, 10)

Ras.add_path (ell1)

Agg::render_scanlines_aa_solid (ras,sl,renb,agg::rgba8 (255255255))

One more sentence: ras.close_polygon (); ras.auto_close (true); ras.edge_d (4000.400200); all are used to close the semi-arc before you can fill the color!

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