Warning: file_get_contents(https://whois.pconline.com.cn/jsLabel.jsp?ip=127.0.0.1) [function.file-get-contents]: failed to open stream: HTTP request failed! HTTP/1.1 503 Service Temporarily Unavailable in D:\wwwroot\huidong\wwwroot\function.inc.php on line 884
居中放置图片函数putimage_center - huidong

huidong

首页 | 会员登录 | 关于争取 2022 寒假做出汇东网 Ver3.0.0 !
搜索文章


// 居中放置图片
// img 图像
// offset_x,y 和居中位置的偏移,默认为0
void putimage_center(IMAGE* img, int offset_x = 0, int off_set_y = 0)
{
    putimage(
        (getwidth() - img->getwidth()) / 2 - offset_x,
        (getheight() - img->getheight()) / 2 - off_set_y,
        img
    );
}




返回首页


Copyright (C) 2018-2024 huidong