Web студия "GrandView"
  Главная   Написать Контакты
   
   
О проекте
Руководство php
 

PDF_setrgbcolor

(PHP 3 >= 3.0.6, PHP 4, PECL)

PDF_setrgbcolor -- Set fill and stroke rgb color values [deprecated]

Описание

bool PDF_setrgbcolor ( resource p, float red, float green, float blue )

Sets the current fill and stroke color to the supplied RGB values. Возвращает TRUE в случае успешного завершения или FALSE в случае возникновения ошибки.

This function is deprecated since PDFlib version 4, use PDF_setcolor() instead.



add a note add a note User Contributed Notes
PDF_setrgbcolor
n dot gaertner at gmx dot net
09-Jul-2001 05:19
<b>Use this code to convert HEX colors to RGB that you can use with pdf_setrgbcolor:</b>
<?
$color = "#FF00FF";
$string = str_replace("#","",$color);
$red = hexdec(substr($string,0,2)) / 255;
$green = hexdec(substr($string,2,2)) / 255;
$blue = hexdec(substr($string,4,2)) / 255;
pdf_rect($pdf, 110, 600, 20, 30);
pdf_setrgbcolor_fill($pdf, $red, $green, $blue);
pdf_fill($pdf);
?>

This gives you a pink rectangle!
skuenzli at u dot arizona dot edu
26-Apr-2000 12:17
/*
*pdf_setrgbcolor(pdf_file, float red, float green, float blue);
*red/green/blue are values between 0 and 1.
*It appears that the value is supposed to be a percentage intensity.
*0.0 means a 0% intensity for that color (0 in RGB-scale)
*0.5 means a 50% intensity of that color (127 in RGB-scale)
*1.0 means a 100% intensity of that color (255 in RGB-scale)
*/
Here is a snippet of code to create a blue rectangle:
<pre>
//Create blue rectangle
pdf_rect($pdf, 110, 600, 20, 30);
pdf_setrgbcolor_fill($pdf, 0, 0, 1.0);
pdf_fill($pdf);
</pre>

PDF_shading_pattern> <PDF_setrgbcolor_stroke
Last updated: Fri, 26 Jan 2007
 
 
Новости
11 июля 2007
Сайт запущен
© 2007 info@grandviewstudio.com

Deprecated: Function set_magic_quotes_runtime() is deprecated in /home/sites/grandviewstudiocom/www/65f67d67a94ad980786580ae69e11c07/sape.php on line 324

Deprecated: Function set_magic_quotes_runtime() is deprecated in /home/sites/grandviewstudiocom/www/65f67d67a94ad980786580ae69e11c07/sape.php on line 330
Z058440144362 Z348613067571