Req #31376 [Fbk->NoF]: Function cpdf_fill_stroke() only fills

From: Date: Sun, 29 Jan 2017 04:22:43 +0000
Subject: Req #31376 [Fbk->NoF]: Function cpdf_fill_stroke() only fills
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-207014@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=31376&edit=1

 ID:               31376
 Updated by:       php-bugs@lists.php.net
 Reported by:      sybrendijkstra at gmail dot com
 Summary:          Function cpdf_fill_stroke() only fills
-Status:           Feedback
+Status:           No Feedback
 Type:             Feature/Change Request
 Package:          *General Issues
 Operating System: Windows 98 se
 PHP Version:      5.0.1
 Private report:   N

 New Comment:

No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Re-Opened". Thank you.


Previous Comments:
------------------------------------------------------------------------
[2017-01-20 20:35:04] heiglandreas@php.net

Is this still relevant?

------------------------------------------------------------------------
[2005-05-12 03:08:45] yuanchen73 at hotmail dot com

OS: Windows 2000 Server
Version: 5.0.0

Same problem. The stroke doesn't work even I call cpdf_fill() and cpdf_stroke() seperately. I
have to redefine the area. For example:
cpdf_rect($cpdf, 55, 546, 60, 24);
cpdf_fill($cpdf);
cpdf_rect($cpdf, 55, 546, 60, 24); // won't work without this line
cpdf_stroke($cpdf);

------------------------------------------------------------------------
[2005-03-11 11:29:14] sybrendijkstra at gmail dot com

Hello,

I had some time left and found out that in the PHP source,( http://chora.php.net/co.php/pecl/cpdf/cpdf.c?php=4291a9959790339708d78fe44745940c&r=1.58.2.1),
 around line 1700 i found this:

/* {{{ proto bool cpdf_fill_stroke(int pdfdoc) 
   Fills and stroke current path */
PHP_FUNCTION(cpdf_fill_stroke)
{
	zval **arg1;
	int id, type;
	CPDFdoc *pdf;

	if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &arg1) == FAILURE) {
		WRONG_PARAM_COUNT;
	}
	CPDF_FETCH_CPDFDOC(arg1);

	cpdf_fill(pdf);
	cpdf_stroke(pdf);

	RETURN_TRUE;
}

It calls, cpdf_fill() and after that cpdf_stroke(). But in the ClibPDF manual, cpdfman200.pdf page
19, there is a function "void cpdf_fillAndStroke(CPDFdoc *pdf);".

------------------------------------------------------------------------
[2005-03-06 18:09:09] sniper@php.net

Please try using this CVS snapshot:

  http://snaps.php.net/php5-STABLE-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php5.0-win32-latest.zip



------------------------------------------------------------------------
[2005-01-01 21:35:41] sybrendijkstra at gmail dot com

Description:
------------
I experienced some unexpected results with the CLibPDF function: cpdf_fill_stroke() -> http://www.php.net/manual/en/function.cpdf-fill-stroke.php

According to the manual the function is able to fill the current path and then strokes the same
path. As far is i am able to produce that function only fills and there is no stroking at all to
see.

The code below is a convert from a C example from FastI/O (http://www.fastio.com/example/Arcs.c.txt)

Reproduce code:
---------------
$rbump = 0.1*100;
$xorig = 2.5*100;
$greenblue = 1.0;
$yorig = 7.5*10;
$radius= 2.2*100;

cpdf_setrgbcolor_stroke($cpdf, 0.7, 0.7, 0.0);

for($i=11; $i>=0; $i--) {
$radius -= $rbump;
$greenblue = $i/12.0;
cpdf_setrgbcolor_fill($cpdf, 1.0, $greenblue, $greenblue);
$eangle = ($i+1)*30.0;		/* end angle */
$sangle = 0.0;
cpdf_moveto($cpdf, $xorig, $yorig);
cpdf_arc($cpdf, $xorig, $yorig, $radius, $sangle, $eangle, 0);
cpdf_closepath($cpdf);
cpdf_fill_stroke($cpdf);	/* fill and stroke */
}

Expected result:
----------------
I expect to see: http://www.fastio.com/example/arctest.pdf

And then the "Color filled pie shapes" image. A red/white background with a green/yellow
lines as pie pieces.

Actual result:
--------------
I actually see only the red/white background. No stroke lines are visable. I see the same result as
when I only use cpdf_fill() function.

When I saw the source of the .pdf file generated by PHP there where some minor differences between a
file which had cpdf_fill_stroke() and a file that used only cpdf_fill(). cpdf_fill_stroke() does add
something to the .pdf file, but it's not visable in my PDF viewer (Adobe Acrobat 5.0).

To be short:
cpdf_fill_stroke() -> only fills (and does not stroke)
cpdf_fill() -> only fills
cpdf_stroke() -> only strokes


------------------------------------------------------------------------



--
Edit this bug report at https://bugs.php.net/bug.php?id=31376&edit=1


Thread (6 messages)

« previous php.bugs (#207014) next »