PHP imagecharup - 垂直地画一个字符
PHP 教程
· 2019-01-31 09:44:30
imagecharup — 垂直地画一个字符。
语法
bool imagecharup ( resource $image , int $font , int $x , int $y , string $c , int $color )
imagecharup() 将字符 c 垂直地画在 image 指定的图像上,位于 x,y(图像左上角为 0, 0),颜色为 color。如果 font 为 1,2,3,4 或 5,则使用内置的字体。
实例
<?php
$im = imagecreate(100,100);
$string = 'Note that the first letter is a N';
$bg = imagecolorallocate($im, 255, 255, 255);
$black = imagecolorallocate($im, 0, 0, 0);
// 在白色的背景上输出黑色的 "Z"
imagecharup($im, 3, 10, 10, $string, $black);
header('Content-type: image/png');
imagepng($im);
?>
以上实例输出结果的图片如下:
相关文章
- imagechar() 水平地画一个字符。
- imageloadfont() 载入一新字体。
点击查看所有 PHP 教程 文章: https://codercto.com/courses/l/5.html
Zero to One
Peter Thiel、Blake Masters / Crown Business / 2014-9-16 / USD 27.00
“This book delivers completely new and refreshing ideas on how to create value in the world.” - Mark Zuckerberg, CEO of Facebook “Peter Thiel has built multiple breakthrough companies, and ......一起来看看 《Zero to One》 这本书的介绍吧!
Markdown 在线编辑器
Markdown 在线编辑器
HEX HSV 转换工具
HEX HSV 互换工具