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
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: matteo dot rinaudo at gmail dot com
New email:
PHP Version: OS:

 

 [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

Add a Patch

Pull Requests

Add a Pull Request

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-2020 The PHP Group
All rights reserved.
Last updated: Sat Aug 15 01:01:25 2020 UTC