简体   繁体   English

使用php GD库的图案文本

[英]Patterned text using php GD library

Im trying to create something that looks like this using php gd library: 我试图使用php gd库创建看起来像这样的东西:

替代文字

I've figured out how to create simple text using gd library, but im stuck on how to put a patterned text in it. 我已经弄清楚如何使用gd库创建简单的文本,但我坚持如何在其中放置图案文本。

Anybody have any idea on how to do this? 任何人都知道如何做到这一点?

Yes, this is possible. 是的,这是可能的。 To do it, you need to uses masks . 要做到这一点,你需要使用面具 This website has a nice example: http://www.phpbuilder.com/columns/cash20030526.php3?print_mode=1 . 这个网站有一个很好的例子: http//www.phpbuilder.com/columns/cash20030526.php3?print_mode = 1 Scroll to the bottom of the page, to the "Textures" section for their solution. 滚动到页面底部,到“纹理”部分查找解决方案。

you could create your text as a image object with Alpha mask then apply that mask on a solid image of your "fill" image 您可以使用Alpha蒙版将文本创建为图像对象,然后将该蒙版应用于“填充”图像的实心图像上

check out alpha blending here 在这里查看alpha混合

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM