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

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

问题描述

我在Flash Player中画线时遇到图形问题,如果使用其他任何 JointStyle MITER 。有关效果的图片和问题的图形部分,请参阅我的文章在文档类型上。



然而,这个问题还有第二个角度,那就是:为什么要绘制mitered 关节比其他人慢得多?这似乎是一个问题,因为至少FP8,但我无法找到任何详细的信息,可能是什么问题。这只是一个普通的bug,还没有得到修复呢,还是在绘制这些关节的时候有一些固有的慢的东西呢?例如,他们似乎与平方根有关,但我严重缺乏对技术上这种联合风格事物的理解。它只是看起来像一个平面设计师可能担心的一些小细节。

我问,因为我想知道如果我能做些什么事情,呃,减轻,问题。

解决方案

有两种方法可以加入两行:


  • none:free

  • round:绘制一个半径线宽的圆圈/ 2
  • 线条之间的差距
  • 斜接:外插线条并填充


昂贵。如果线条的外角大于90°,​​他们需要外推,相交和填充。

从你的链接文章的截图你不应该'不需要任何关节来绘制图表。关节只对大笔画宽度很重要,绘制图形时,圆形或帽形关节应该是完全正确的。

在Flash渲染中,速度非常快 - 它只是最复杂的加入选择。


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.

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:

  • none: free
  • round: draw a circle of radius line width/2
  • cap: fill in the gap between the lines
  • miter: extrapolate the lines and fill that

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.

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

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

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