Bug: CursorTool->Pen->Mode without effect

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
to2
Newbie
Newbie
Posts: 39
Joined: Thu Jan 19, 2006 12:00 am

Bug: CursorTool->Pen->Mode without effect

Post by to2 » Thu Mar 23, 2006 7:48 am

Hi,

I am using the cursor tool and set the pen mode to pmCopy. However, the cursor line's color is mixed with background. Then I set pen mode to pmMerge. It shows the same behaviour.

How can I use cursor line in pmCopy mode?
Last edited by to2 on Wed Mar 29, 2006 12:24 pm, edited 1 time in total.

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Thu Mar 23, 2006 9:15 am

Hi to2,

Please bear in mind TPenMode definition:
TPenMode indicates how the color of a pen interacts with the color of a canvas.

Unit

Graphics or QGraphics

Delphi syntax:

type TPenMode = (pmBlack, pmWhite, pmNop, pmNot, pmCopy, pmNotCopy, pmMergePenNot, pmMaskPenNot, pmMergeNotPen, pmMaskNotPen, pmMerge, pmNotMerge, pmMask, pmNotMask, pmXor, pmNotXor);

C++ syntax:

enum TPenMode { pmBlack, pmWhite, pmNop, pmNot, pmCopy, pmNotCopy, pmMergePenNot, pmMaskPenNot, pmMergeNotPen, pmMaskNotPen, pmMerge, pmNotMerge, pmMask, pmNotMask, pmXor, pmNotXor };

Description

TPenMode indicates how a pen color interacts with the color of the canvas it is writing on. The following table lists the possible values:

Mode Pixel color

pmBlack Always black
pmWhite Always white
pmNop Unchanged
pmNot Inverse of canvas background color
pmCopy Pen color specified in Color property
pmNotCopy Inverse of pen color
pmMergePenNot Combination of pen color and inverse of canvas background
pmMaskPenNot Combination of colors common to both pen and inverse of canvas background.
pmMergeNotPen Combination of canvas background color and inverse of pen color
pmMaskNotPen Combination of colors common to both canvas background and inverse of pen

pmMerge Combination of pen color and canvas background color
pmNotMerge Inverse of pmMerge: combination of pen color and canvas background color
pmMask Combination of colors common to both pen and canvas background
pmNotMask Inverse of pmMask: combination of colors common to both pen and canvas background
pmXor Combination of colors in either pen or canvas background, but not both
pmNotXor Inverse of pmXor: combination of colors in either pen or canvas background, but not both
Having that in mind it works fine for me here using something like this:

Code: Select all

        ChartTool1->Pen->Color=clRed;
        ChartTool1->Pen->Mode=pmCopy;
If the problem persists, could you please send us an example we can run "as-is" to reproduce the problem here?

You can post your files at news://www.steema.net/steema.public.attachments newsgroup.
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

to2
Newbie
Newbie
Posts: 39
Joined: Thu Jan 19, 2006 12:00 am

Post by to2 » Thu Mar 23, 2006 1:07 pm

I can send a sample but it can be seen in design time too.

- Define a series of type fastline, linepen color is clRed, set linepen width to 10
- Define a cursor tool, set pen color to clBlue, set pen width to 10

Look, what happens, if cursor line crosses series: the crossed area gets green.
pmCopy Pen color specified in Color property
pmMerge Combination of pen color and canvas background color
My understanding of pmCopy is, that the crosspoint keeps blue (cursor is in foreground). But the colors are merged or combined in another way.

to2
Newbie
Newbie
Posts: 39
Joined: Thu Jan 19, 2006 12:00 am

Post by to2 » Tue Mar 28, 2006 12:02 pm

Hello Steema support,

can you confirm, that cursor pen mode is not pmCopy, when you follow my description?
- Define a series of type fastline, linepen color is clRed, set linepen width to 10
- Define a cursor tool, set pen color to clBlue, set pen width to 10

to2
Newbie
Newbie
Posts: 39
Joined: Thu Jan 19, 2006 12:00 am

Post by to2 » Wed Mar 29, 2006 12:22 pm

I looked into your source code and found in TCursorTool.RedrawCursor that you set Pen.Mode:=pmXor before drawing the cursor line.

That's why cursors are not drawn with pmCopy! Can you confirm this? When will this bug be fixed?

Pep
Site Admin
Site Admin
Posts: 3299
Joined: Fri Nov 14, 2003 5:00 am
Contact:

Post by Pep » Mon Apr 03, 2006 1:48 pm

Hi,

yes, you're correct, the Pen.Mode is not considered. I've wirted down our defect/wish list so this can be changed for further releases.
Thanks for the advise !

Post Reply