日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

AGG第二十课 agg::ellipse 方法approximation_scale()

發布時間:2025/6/15 编程问答 17 豆豆
生活随笔 收集整理的這篇文章主要介紹了 AGG第二十课 agg::ellipse 方法approximation_scale() 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

?獻給:任何一種方案都是一種折中的選擇,任何一種替代方案都可能會實現同樣的效果。而這完全取決于你是如何思考定位的。請教是學,自學是學,只不過可以站在巨人的肩膀上,你可以看的更加清楚或許走的更遠。

摘自:http://franko.github.io/agg-intro/vertex-source.html

????In the previous section we have seen?agg::path_storage?object. While this object is very flexible and can be used to describe all kind of geometric shapes there are a few other vertex source primitive types. Actually there are not so many of them and we will just discuss the?agg::ellipse?object because it will be also useful to illustrate some important idea.

????The?agg::ellipse?does not share anything with a?agg::path_storage?in term of C++ class hierarchy, all the they have in common is that they implement the basic?methods of a vertex source. You may wonder why the ellipse object can be useful if you can describe it with a?agg::path_storage. The answer is that this latter needs to store a fixed number of vertices that approximate the ellipse for all the possible resolution of the p_w_picpath. The problem is that if you draw a small circle a few vertices can be enough but if the circle is big you are going to need a lot of vertices to have a decent approximation. We will see that with an?agg::ellipse?object the number of points will be adapted on the fly, you just need to use the?approximation_scale()method. Actually the?agg::ellipse?does not store all the coordinates of the vertices but generetes them on the fly when needed using the mathematical equations. As a side effect you will have also a benefit in term of memory usage because an ellipse object will use a very small amount of memory indipendently of the approximation level that you may request.

????At this point we need to explain the?approximation_scale()?method.?approximation_scale()?we need to go back to the coordinates specifications. The coordinates are actually given as double precision floating point number and they may or may not map directly to pixel coordinates. For example we can map some logical coordinates ranging from 0 to 1 to an huge viewport of size 1280x1280. The problem at this point is that an?agg::ellipse?object does not know the mapping between logical coordinates and viewport coordinates. So the idea is that to let?agg::ellipse?adjust correctly the level of approximation you should call the method?approximation_scale()?and pass as an argument the ratio between the viewport coordinates and the logical coordinates. So in the example of the viewport of size 1280x1280 we would need to use?approximation_scale()?with an scale argument of 1280.

We will see later that the?approximation_scale()?is also important with some kind of transformation like Bezier curves that are supposed to generate smooth curves based on a few vertices and some mathematical equations.


轉載于:https://blog.51cto.com/fengyuzaitu/1961908

總結

以上是生活随笔為你收集整理的AGG第二十课 agg::ellipse 方法approximation_scale()的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。

主站蜘蛛池模板: 四虎免费av | 久久久久久久久免费 | 日韩无码精品一区二区三区 | 狠色综合7777夜色撩人 | 97成人精品视频在线观看 | 亚洲精品免费在线观看视频 | 风间由美一区二区三区 | 国产人妻一区二区三区四区五区六 | 色婷婷久久久亚洲一区二区三区 | 亚洲视频综合 | 色播欧美 | 麻豆chinese极品少妇 | 中文字幕免费高清在线观看 | 高潮白浆女日韩av免费看 | 伊人网综合视频 | av影视天堂 | 男生草女生视频 | 久久精品片 | 123超碰| 国产视频一区三区 | av在线天天 | 韩国三级在线播放 | av大片免费观看 | 欧美日韩免费观看视频 | 国产免费啪啪 | 51免费看成人啪啪片 | 性色av免费 | 在线看日韩 | 日本一区二区视频在线观看 | 精品黑人一区二区三区观看时间 | 国内一区二区视频 | 孕妇毛片 | 999热精品视频 | 男生女生插插插 | 久久精品国产av一区二区三区 | 精品视频在线一区 | 亚洲最大成人在线视频 | 国产乱码久久久久久 | 在线观看一二三区 | 亚洲第一天堂网 | 中文字幕免费中文 | 日韩毛片在线 | 国产91一区二区三区在线精品 | 国产黄色观看 | www.国产在线视频 | 国产成人av一区二区 | 国产丝袜视频在线观看 | 人人妻人人澡人人爽人人dvd | av五月| 性欧美视频在线观看 | 性感美女高潮 | 欧美伊人| 国产成人精品无码免费看在线 | 99re6在线观看 | 午夜精品无码一区二区三区 | 亚洲av人人澡人人爽人人夜夜 | 欧洲av在线 | 日本黄页网站免费大全 | 日韩国产电影 | 国产精品午夜在线 | tube国产麻豆| chinese hd av| 亚洲影院一区二区三区 | 91素人约啪 | 欧美日韩一区二区中文字幕 | 夜夜爱av| 人人爽久久涩噜噜噜网站 | 国产无套粉嫩白浆内谢 | 蜜臀av性久久久久蜜臀aⅴ流畅 | 日韩免费一二三区 | 九九热在线视频观看 | 麻豆网站免费观看 | 国产巨乳在线观看 | 欧美成人免费一级 | 亚洲熟女一区 | 亚洲熟女一区二区 | 午夜影院在线播放 | 国产成人欧美一区二区三区的 | 午夜理伦三级做爰电影 | 无码成人精品区一级毛片 | 精品人妻伦一二三区久久 | 亚洲自拍电影 | 理论片在线观看视频 | 18视频在线观看娇喘 | 欧美精品在线视频 | 欧美日韩极品 | 欧美韩一区 | 欧美人妖老妇 | 亚洲在线资源 | 午夜影院网站 | 一区二区蜜桃 | av在线h| 亚洲成人激情在线 | 久久精品无码一区二区三区免费 | 看国产毛片 | 久久久亚洲综合 | 另类一区 | 亚洲乱亚洲乱妇 | 蜜臀久久99精品久久久久宅男 |