php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #56933 pdf_setcolor() claims `float c4' (7th parameter) when in RGB mode is not needed
Submitted: 2006-04-03 08:41 UTC Modified: 2006-04-03 14:02 UTC
From: matteo dot rinaudo at gmail dot com Assigned:
Status: Not a bug Package: pdflib (PECL)
PHP Version: 4.4.1 OS: Fedora 1-PHP 4.4.2 from sources
Private report: No CVE-ID: None
 [2006-04-03 08:41 UTC] matteo dot rinaudo at gmail dot com
Description:
------------
We know that `pdf_setcolor()' currently accepts 7 parameters:

bool pdf_setcolor ( resource p, string fstype, string colorspace, float c1, float c2, float c3, float c4 )

If I pass 'rgb' as colorspace (3rd parameter), the function asks for `float c4' (7th parameter) which is not needed.

Reproduce code:
---------------
pdf_setcolor($pdf, 'both', 'rgb', 0.7, 0.7, 0.7);

Expected result:
----------------
The code above does not work.

This code works:

pdf_setcolor($pdf, 'both', 'rgb', 0.7, 0.7, 0.7, 0.7);



Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-04-03 14:02 UTC] rjs at pdflib dot com
Thank you for taking the time to write to us, but this is not
a bug.

There are no optional parameters for PDFlib API's. Allthough PHP would allow such optional parameters PDFlib API's don't use this feature to have a consistent API for all PDFlib versions over all language bindings.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Dec 21 17:01:58 2024 UTC