For example, you want to set 40% alpha transparence to #000000
(black color), you need to add 66
like this #66000000
.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace Utils; | |
class ImageTextRenderUtils { | |
/** | |
* Returns expected width of rendered text in pixels |
Inspired by dannyfritz/commit-message-emoji
See also gitmoji.
Commit type | Emoji |
---|---|
Initial commit | 🎉 :tada: |
Version tag | 🔖 :bookmark: |
New feature | ✨ :sparkles: |
Bugfix | 🐛 :bug: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Writes the given text with a border into the image using TrueType fonts. | |
* @author John Ciacia | |
* @param image An image resource | |
* @param size The font size | |
* @param angle The angle in degrees to rotate the text | |
* @param x Upper left corner of the text | |
* @param y Lower left corner of the text | |
* @param textcolor This is the color of the main text |