温馨提示×

温馨提示×

您好,登录后才能下订单哦!

密码登录×
登录注册×
其他方式登录
点击 登录注册 即表示同意《亿速云用户服务条款》

AGG第二十二课 conv_contour函数auto_detect_orientation的字体应用

发布时间:2020-04-28 04:30:00 来源:网络 阅读:407 作者:fengyuzaitu 栏目:系统运维

提供如下的代码结构渲染字体

agg::conv_transform<...> conv (path,matrix);

agg::conv_curve<...> curve (conv);

agg::conv_contour<...> contour(curve);

 

curve.approximaltion_scale (scale);

contour.auto_detect_orientation (true);

contour.width (bold);

当bold大于零,表示放大,当bold小于零,表示缩小

采用conv_contour的理由

为了放大或者缩小字体

采用auto_detect_orientation的理由

从上面的所有关于该函数的说明都知道conv_contour扩展轮廓线实际上是会根据图形绘制的方向而有所不同,逆时针绘制的图形和顺时针绘制的图形,扩展轮廓线刚好相反,所以需要调用auto_detect_orientation设置为true,屏蔽顺时针和逆时针之间的区别。有些英文字母绘制是顺时针的比如a,逆时针比如c,详细可参考上传的图片,windows自带的图片查看器可打开!!


向AI问一下细节

免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。

AI