为什么要“斜接"?关节比别人慢? [英] Why should "miter" joints be slower than others?

查看:29
本文介绍了为什么要“斜接"?关节比别人慢?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在 Flash Player 中绘制线条时遇到图形问题,如果我使用除 JointStyle,以不同粗细相互叠加绘制的两条线无法正确对齐>MITRE.有关效果的图片以及问题中面向图形的部分,请参阅 我在 doctype 上的帖子.

I'm having a graphics problem on drawing lines in Flash Player, where two lines drawn on top of each other with different thickness don't align properly if I use any other JointStyle than MITER. For pictures of the effect, and for the graphics oriented part of the question, see my post over on doctype.

然而,关于这个问题还有第二个角度,那就是:为什么绘制斜接"接头比其他的要慢这么多?这似乎是一个问题,至少从 FP 8 开始,但我找不到有关问题可能是什么的任何详细信息.这只是一个尚未修复的普通错误,还是绘制这些关节本身就较慢?例如,它们似乎与平方根有关,但从技术上讲,我严重缺乏对这种联合样式的全部内容的了解.它看起来只是平面设计师可能会担心的一些小细节.

However, there's also a second angle on this problem, which is: why should drawing the "mitered" joints be so much slower than others? This seems to be a problem since at least FP 8, but I couldn't find any detailed info on what the problem might be. Is this just an ordinary bug that didn't get fixed yet, or is there something inherently slower about drawing these joints? For example, they seem to have something to do with square roots, but I seriously lack understanding of what this joint style thing is all about, technically. It just looks like some minor detail a graphic designer might worry about.

我之所以这么问是因为我想知道我是否可以做些什么来缓解、缓解、缓解这个问题.

I'm asking because I'm wondering if I can do something to mitergate, er, mitigate, the problem.

推荐答案

连接两行的方式有多种:

There are various ways to join two lines:

  • 无:免费
  • round:画一个半径线宽/2的圆
  • cap:填充线条之间的空隙
  • 斜接:推断线条并填充它

斜接是最贵的.如果线相交的外角大于 90 度,则需要对其进行外插、相交和填充.

Miter is the most expensive. If the lines are meeting at an outer angle that is greater than 90, they need to be extrapolated, intersected and filled.

从您链接帖子的屏幕截图来看,您应该不需要任何关节来绘制图形.关节只对大笔画宽度很重要,对于绘制图形,圆形或帽形关节应该非常好.

From the screenshots at your linked post you shouldn't need any joints for drawing a graph. Joints are only important with large stroke widths and for drawing a graph, round or cap joints should be perfectly fine.

在 Flash 中渲染斜接非常快 - 它只是最复杂的连接选择.

In flash rendering miters is quite fast - it's just the most complicated join to pick.

这篇关于为什么要“斜接"?关节比别人慢?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆