<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <HTML ><HEAD ><TITLE >printer_create_brush</TITLE ><META NAME="GENERATOR" CONTENT="Modular DocBook HTML Stylesheet Version 1.79"><LINK REL="HOME" TITLE="PHP 手册" HREF="index.html"><LINK REL="UP" TITLE="Printer Functions" HREF="ref.printer.html"><LINK REL="PREVIOUS" TITLE="printer_close" HREF="function.printer-close.html"><LINK REL="NEXT" TITLE="printer_create_dc" HREF="function.printer-create-dc.html"><META HTTP-EQUIV="Content-type" CONTENT="text/html; charset=UTF-8"></HEAD ><BODY CLASS="refentry" BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#840084" ALINK="#0000FF" ><DIV CLASS="NAVHEADER" ><TABLE SUMMARY="Header navigation table" WIDTH="100%" BORDER="0" CELLPADDING="0" CELLSPACING="0" ><TR ><TH COLSPAN="3" ALIGN="center" >PHP 手册</TH ></TR ><TR ><TD WIDTH="10%" ALIGN="left" VALIGN="bottom" ><A HREF="function.printer-close.html" ACCESSKEY="P" >上一页</A ></TD ><TD WIDTH="80%" ALIGN="center" VALIGN="bottom" ></TD ><TD WIDTH="10%" ALIGN="right" VALIGN="bottom" ><A HREF="function.printer-create-dc.html" ACCESSKEY="N" >下一页</A ></TD ></TR ></TABLE ><HR ALIGN="LEFT" WIDTH="100%"></DIV ><H1 ><A NAME="function.printer-create-brush" ></A >printer_create_brush</H1 ><DIV CLASS="refnamediv" ><A NAME="AEN187721" ></A ><P > (PECL)</P >printer_create_brush -- Create a new brush</DIV ><DIV CLASS="refsect1" ><A NAME="AEN187724" ></A ><H2 >Description</H2 >resource <B CLASS="methodname" >printer_create_brush</B > ( int style, string color )<BR ></BR ><P > The function creates a new brush and returns a handle to it. A brush is used to fill shapes. For an example see <A HREF="function.printer-select-brush.html" ><B CLASS="function" >printer_select_brush()</B ></A >. <CODE CLASS="parameter" >color</CODE > must be a color in RGB hex format, i.e. "000000" for black, <CODE CLASS="parameter" >style</CODE > must be one of the following constants: <P ></P ><UL ><LI ><P > <CODE CLASS="parameter" >PRINTER_BRUSH_SOLID</CODE >: creates a brush with a solid color. </P ></LI ><LI ><P > <CODE CLASS="parameter" >PRINTER_BRUSH_DIAGONAL</CODE >: creates a brush with a 45-degree upward left-to-right hatch ( / ). </P ></LI ><LI ><P > <CODE CLASS="parameter" >PRINTER_BRUSH_CROSS</CODE >: creates a brush with a cross hatch ( + ). </P ></LI ><LI ><P > <CODE CLASS="parameter" >PRINTER_BRUSH_DIAGCROSS</CODE >: creates a brush with a 45 cross hatch ( x ). </P ></LI ><LI ><P > <CODE CLASS="parameter" >PRINTER_BRUSH_FDIAGONAL</CODE >: creates a brush with a 45-degree downward left-to-right hatch ( \ ). </P ></LI ><LI ><P > <CODE CLASS="parameter" >PRINTER_BRUSH_HORIZONTAL</CODE >: creates a brush with a horizontal hatch ( - ). </P ></LI ><LI ><P > <CODE CLASS="parameter" >PRINTER_BRUSH_VERTICAL</CODE >: creates a brush with a vertical hatch ( | ). </P ></LI ><LI ><P > <CODE CLASS="parameter" >PRINTER_BRUSH_CUSTOM</CODE >: creates a custom brush from an BMP file. The second parameter is used to specify the BMP instead of the RGB color code. </P ></LI ></UL > </P ></DIV ><DIV CLASS="NAVFOOTER" ><HR ALIGN="LEFT" WIDTH="100%"><TABLE SUMMARY="Footer navigation table" WIDTH="100%" BORDER="0" CELLPADDING="0" CELLSPACING="0" ><TR ><TD WIDTH="33%" ALIGN="left" VALIGN="top" ><A HREF="function.printer-close.html" ACCESSKEY="P" >上一页</A ></TD ><TD WIDTH="34%" ALIGN="center" VALIGN="top" ><A HREF="index.html" ACCESSKEY="H" >起始页</A ></TD ><TD WIDTH="33%" ALIGN="right" VALIGN="top" ><A HREF="function.printer-create-dc.html" ACCESSKEY="N" >下一页</A ></TD ></TR ><TR ><TD WIDTH="33%" ALIGN="left" VALIGN="top" >printer_close</TD ><TD WIDTH="34%" ALIGN="center" VALIGN="top" ><A HREF="ref.printer.html" ACCESSKEY="U" >上一级</A ></TD ><TD WIDTH="33%" ALIGN="right" VALIGN="top" >printer_create_dc</TD ></TR ></TABLE ></DIV ></BODY ></HTML >