Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
PHP: ps_begin_pattern - Manual
[go: Go Back, main page]

PHP  
downloads | documentation | faq | getting help | mailing lists | reporting bugs | php.net sites | links | my php.net 
search for in the  
<ps_begin_pageps_begin_template" width="11" height="7"/>
view the version of this page
Last updated: Sun, 07 May 2006

ps_begin_pattern

(PECL)

ps_begin_pattern -- 新しいパターンを開始する

説明

int ps_begin_pattern ( resource psdoc, float width, float height, float xstep, float ystep, int painttype )

新しいパターンを開始します。パターンとは、 領域を塗りつぶすための描画データを含むページのようなものです。 ps_setcolor() をコールする際に pattern に色空間を指定すると、 これは色のように使用されます。

パラメータ

psdoc

ps_new() が返す、postscript ファイルのリソース ID。

width

ピクセル単位のパターンの幅。

height

ピクセル単位のパターンの高さ。

x-step

パターンを水平方向に並べる際のピクセル単位の間隔。

y-step

パターンを垂直方向に並べる際のピクセル単位の間隔。

painttype

1 あるいは 2 でなければなりません。

返り値

パターンの ID を返します。失敗した場合は FALSE を返します。

例 1. パターンの作成および使用

<?php
$ps
= ps_new();

if (!
ps_open_file($ps, "pattern.ps")) {
  print
"PostScript ファイルをオープンできません\n";
  exit;
}

ps_set_parameter($ps, "warning", "true");
ps_set_info($ps, "Creator", "pattern.php");
ps_set_info($ps, "Author", "Uwe Steinmann");
ps_set_info($ps, "Title", "Pattern example");


$pspattern = ps_begin_pattern($ps, 10.0, 10.0, 10.0, 10.0, 1);
ps_setlinewidth($ps, 0.2);
ps_setcolor($ps, "stroke", "rgb", 0.0, 0.0, 1.0, 0.0);
ps_moveto($ps, 0, 0);
ps_lineto($ps, 7, 7);
ps_stroke($ps);
ps_moveto($ps, 0, 7);
ps_lineto($ps, 7, 0);
ps_stroke($ps);
ps_end_pattern($ps);

ps_begin_page($ps, 596, 842);
ps_setcolor($ps, "both", "pattern", $pspattern, 0.0, 0.0, 0.0);
ps_rect($ps, 50, 400, 200, 200);
ps_fill($ps);
ps_end_page($ps);

ps_close($ps);
ps_delete($ps);
?>



add a note add a note User Contributed Notes
ps_begin_pattern
There are no user contributed notes for this page.

<ps_begin_pageps_begin_template" width="11" height="7"/>
 Last updated: Sun, 07 May 2006
show source | credits | sitemap | contact | advertising | mirror sites 
Copyright © 2001-2006 The PHP Group
All rights reserved.
This mirror generously provided by: PacketBusiness, Inc.
Last updated: Wed May 10 20:20:25 2006 JST