The "text along
path" function is basically a hack, and was never intended to be a
final product. A proper text-along-path function would allow the path
to be changed and alter the text accordingly. The way that the warped
text is rendered is also less than ideal. Because the plan was always
that the functionality would change, no PDB hook was ever created for
it.
另一个告诉我如何创建自己的“沿路径文本”插件:
However, as far as I know, the Bezier strokes in a path have the following property, applying an affine transform to their control points and handles is equivalent to
applying the same transform to every point of the curve. So you can do something like this:
determine a "reference path", that is, a straight path along the text (or running though the middle of it)
for each stroke iterate the control points, and on each point ("C"):
determine projection on reference path (distance from origin of reference path) (elt's call it "R") and distance to it
find the corresponding point on the target path (pdb.gimp_path_get_point_at_dist()), "R'"
find the position of the new control point C': same distance to target path, on perpendicular
compute the position of the handles:
compute dx/dy between H and C
compute equivalent position H' from the new control point C'
apply rotation, centered on C' with an angle that is the direction of the target path in R' (as returned by earlier gimp_path_get_point_at_dist()) to produce new handle position (H")
在互联网右侧(上面没有裸体的人)做了一个又一个小时的研究之后,我对我的问题还没有找到太多的答案。这就是为什么我决定查看Gimp源代码,以了解神奇的“沿路径文本”实际上是如何工作的。。。而且似乎还没有通过pdb来实现这一行动。在
之后,为了确定,我在gimp开发人员的邮件列表上问过,有人(我不知道是否允许我在这里告诉他的名字)回答我:
另一个告诉我如何创建自己的“沿路径文本”插件:
然后他鼓励我看两个与向量类似的插件,分别名为ribbon path和slinky,它们在http://gimp-path-tools.sourceforge.net/上可用
我希望(多亏了这两个人)这篇文章会有所帮助。在
相关问题 更多 >
编程相关推荐