[libGD] #106 [Task opened] gdImageRectangle draws 1x1 rectangles as 1x3 rectangles
[email protected] (libGD) Tue, 31 Jul 2007 19:38:12 +0000
| Newsgroups | php.gd.bugs |
|---|---|
| Message-ID | <[email protected]> |
THIS IS AN AUTOMATED MESSAGE, DO NOT REPLY.
A new Flyspray task has been opened. Details are below.
User who did this - Nathan Bain (nebain)
Attached to Project - libGD
Summary - gdImageRectangle draws 1x1 rectangles as 1x3 rectangles
Task Type - Bug Report
Category - Drawing function
Status - Unconfirmed
Assigned To -
Operating System - Linux
Severity - Medium
Priority - Normal
Reported Version - 2.0.35
Due in Version - Undecided
Due Date - Undecided
Details - My apologies if this is the same as bug 79. I upgraded from 2.0.31 to 2.0.34, and then to 2.0.35 and noticed this bug in both .34 and .35. The following code draws a rectangle from (25, 25) to (25, 25), and also sets the pixel at (30, 25). In 2.0.31, the rectangle would draw a single pixel (equiv to setting pixel (25, 25)), but now I get a 3-pixel tall line. I've attached an image showing the output of this program.
<code>
#include <stdio.h>
#include "gd.h"
int main(int argc, char **argv)
{
gdImagePtr img = gdImageCreate(50, 50);
int white = gdImageColorAllocate(img, 255, 255, 255);
int black = gdImageColorAllocate(img, 0, 0, 0);
gdImageRectangle(img, 25, 25, 25, 25, black);
gdImageSetPixel(img, 30, 25, black);
FILE *out = fopen("test.gif", "w");
gdImageGif(img, out);
fclose(out);
return 0;
}
</code>
More information can be found at the following URL:
http://bugs.libgd.org/?do=details&task_id=106
You are receiving this message because you have requested it from the Flyspray bugtracking system. If you did not expect this message or don't want to receive mails in future, you can change your notification settings at the URL shown above.