Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-devel / 2009-05

Fix to colour filling in the Poly procedure (Graph unit)

9 messages · 2 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Unknown author

As in the subject, the FillPoly doesn't use the correct colour specification, for a demonstration you can try the example poly.pas (attached) before and after to apply the patch.
Regards, Marco.

The following section of this message contains a file attachment prepared for transmission using the Internet MIME message format. If you are using Pegasus Mail, or any other MIME-compliant system, you should be able to save it or view it from within your mailer. If you cannot, please ask your system administrator for assistance.

---- File information -----------
File: poly.diff
Date: 28 May 2009, 16:47
Size: 559 bytes.
Type: Unknown

The following section of this message contains a file attachment prepared for transmission using the Internet MIME message format. If you are using Pegasus Mail, or any other MIME-compliant system, you should be able to save it or view it from within your mailer. If you cannot, please ask your system administrator for assistance.

---- File information -----------
File: poly.pas
Date: 28 May 2009, 16:41
Size: 382 bytes.
Type: Program-source

Reply by email

Florian Klaempfl
to Unknown author
As in the subject, the FillPoly doesn't use the correct colour specification, for a demonstration you can try the example poly.pas (attached) before and after to apply the patch.

Thanks, applied.

However, I wonder if the behaviour on pattern fills is correct ...

Reply by email

Unknown author
to Florian Klaempfl
Florian Klaempfl wrote
Thanks, applied. However, I wonder if the behaviour on pattern fills is correct ...

I have investigated a little, but I don't be sure you refer in what follows. Actual the edges are not drawn like in TP, where their color is that of SetColor. There was also an overlap problem. The patch is in attachment. Marco.

The following section of this message contains a file attachment prepared for transmission using the Internet MIME message format. If you are using Pegasus Mail, or any other MIME-compliant system, you should be able to save it or view it from within your mailer. If you cannot, please ask your system administrator for assistance.

---- File information -----------
File: poly2.diff
Date: 29 May 2009, 16:10
Size: 885 bytes.
Type: Unknown

The following section of this message contains a file attachment prepared for transmission using the Internet MIME message format. If you are using Pegasus Mail, or any other MIME-compliant system, you should be able to save it or view it from within your mailer. If you cannot, please ask your system administrator for assistance.

---- File information -----------
File: poly.pas
Date: 29 May 2009, 15:54
Size: 380 bytes.
Type: Program-source

Reply by email

Unknown author
to Unknown author
I have investigated a little, but I don't be sure you refer in what follows. Actual the edges are not drawn like in TP, where their color is that of SetColor. There was also an overlap problem. The patch is in attachment. Marco.

... I forgot, that behaviour is special useful when the pattern fill is EmptyFill. Marco.

Reply by email

Florian Klaempfl
to Unknown author: I have investigated a little, but I don't be sure you refer in what follows. Actual the…
Show quoted text 7 lines
On 29 May 2009 at 0:29, Florian Klaempfl wrote: > Thanks, applied. > > However, I wonder if the behaviour on pattern fills is correct ... I have investigated a little, but I don't be sure you refer in what follows.

See the DirectPutpixel call in graph.inc line 848:

                            { x1 mod 8 }
                    if RevBitArray[x1 and 7] and TmpFillPattern  0 then
                       DirectPutpixel(x1,y)
                    else

Imo CurrentColor should be set to FillSettings.Color before doing the drawing.

Reply by email

Unknown author
to Florian Klaempfl: See the DirectPutpixel call in graph.inc line 848: { x1 mod 8 } if RevBitArray[x1 and 7]…
Florian Klaempfl wrote 9 lines
See the DirectPutpixel call in graph.inc line 848: { x1 mod 8 } if RevBitArray[x1 and 7] and TmpFillPattern 0 then DirectPutpixel(x1,y) else Imo CurrentColor should be set to FillSettings.Color before doing the drawing.

You have right, I was taken in deceive by the LineFill mode was correct contrary to LtSlashFill and others. In attachment there's the test program and the (superflous) patch.
Marco.

The following section of this message contains a file attachment prepared for transmission using the Internet MIME message format. If you are using Pegasus Mail, or any other MIME-compliant system, you should be able to save it or view it from within your mailer. If you cannot, please ask your system administrator for assistance.

---- File information -----------
File: poly.pas
Date: 13 Jun 2009, 16:14
Size: 402 bytes.
Type: Program-source

The following section of this message contains a file attachment prepared for transmission using the Internet MIME message format. If you are using Pegasus Mail, or any other MIME-compliant system, you should be able to save it or view it from within your mailer. If you cannot, please ask your system administrator for assistance.

---- File information -----------
File: poly3.diff
Date: 13 Jun 2009, 16:29
Size: 878 bytes.
Type: Unknown

Reply by email

Florian Klaempfl
to Unknown author
Show quoted text 16 lines
On 12 Jun 2009 at 16:56, Florian Klaempfl wrote: > See the DirectPutpixel call in graph.inc line 848: > > { x1 mod 8 } > if RevBitArray[x1 and 7] and TmpFillPattern 0 then > DirectPutpixel(x1,y) > else > > Imo CurrentColor should be set to FillSettings.Color before doing the > drawing. You have right, I was taken in deceive by the LineFill mode was correct contrary to LtSlashFill and others. In attachment there's the test program and the (superflous) patch. Marco.

Applied.

Reply by email