Skip Menu |

This queue is for tickets about the PostScript-Calendar CPAN distribution.

Report information
The Basics
Id: 26090
Status: resolved
Priority: 0/
Queue: PostScript-Calendar

People
Owner: Nobody in particular
Requestors: smylers [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 0.01
Fixed in: 0.03



Subject: Line Under Day Names
Hi again. By default calendars have a horizontal line between the day-of-the-week headings and the first row of days -- that is, all the days in the grid are complete boxes with lines round all 4 sides of them. But if I specify a particular value for day_height that line seems to disappear: the top row of days' boxes merge into those for the day-of-week labels. This appears to be reproduceable, but I haven't looked at it much, nor delved into the code to see why it might be happening. If you don't also get this behaviour then let me know and I'll try to provide better diagnostics and narrow down exactly what is causing this. Cheers. Smylers
Sorry, I can't reproduce this. Can you give the exact parameters you're using?
Subject: Re: [rt.cpan.org #26090] Line Under Day Names
Date: Thu, 5 Apr 2007 11:27:18 +0100
To: Christopher_J_Madsen via RT <bug-PostScript-Calendar [...] rt.cpan.org>
From: Smylers <smylers [...] cpan.org>
Christopher_J_Madsen via RT writes: Show quoted text
> Sorry, I can't reproduce this.
A-ha, I've got it. It wasn't just that I was using day_height, but that I was specifying it as 1.2" with: day_height => 1.2 * 72 which isn't an integer, and that seems to be the problem. So this is reproduceable by running the example program that comes with your module -- this is fine: ./calendar.pl 2007 4 paper a4 day_height 86 but this is missing the line: ./calendar.pl 2007 4 paper a4 day_height 86.4 Cheers. Smylers
From: perl [...] cjmweb.net
On Thu Apr 05 06:28:09 2007, smylers@cpan.org wrote: Show quoted text
> I was specifying it as 1.2" with: > > day_height => 1.2 * 72 > > which isn't an integer, and that seems to be the problem.
Now it makes sense. The grid is drawn by a PostScript for loop, and if you don't hit the endpoint exactly, the last line doesn't get drawn. Floats tend not to be exact. I think I'm going to take the easy way out, and just round day_height to an integer. Nobody'll notice the difference anyway. I'll have a new release for this shortly. In the meantime, just make sure day_height is an integer.
Subject: Re: [rt.cpan.org #26090] Line Under Day Names
Date: Thu, 5 Apr 2007 22:50:22 +0100
To: Christopher_J_Madsen via RT <bug-PostScript-Calendar [...] rt.cpan.org>
From: Smylers <smylers [...] cpan.org>
Christopher_J_Madsen via RT writes: Show quoted text
> I think I'm going to take the easy way out, and just round day_height > to an integer.
Makes sense to me. Thanks again for being so helpful, and so quickly. Smylers