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 15 agg::rounded_rect rendering rounded rectangle

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

Share

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

1 file reference and parameter description

Header file: # include

Class constructor: rounded_rect (double x1, double y1, doublex2, double y2, double r)

The coordinates of the opposite corner of the rectangle (the coordinates of the upper left corner and the lower right corner) and the fillet radius

If the fillet radius is specified to be 0, the drawing is a regular rectangle!

2 examples (questions)

Agg/examples/rounded_rect.cpp is an example of a rounded rectangle. What I don't understand is subpixel offset, sub-pixel offset.

4 A problem with mail

I'm tring to get bounding rectangle of object and trind below code

/ / Round Rect

Agg::rounded_rect r (0re0WidthreWidthreHeightPerson0)

R.normalize_radius ()

Ras.add_path (r)

Agg::render_scanlines_aa (ras, sl, renb,grad_alloc, grad_gen)

But I cann't call r.bound_rect ()

For what kinds of objects bound_rectfunction can be called??

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