Skip to main content

[Migrated content. Thread originally posted on 27 December 2002]

We call "WIN$PRINTER" routine for graphical printing and we can't define the color to fill the shape drawn with WINPRINT-GRAPH-DRAW.

We use WINPRINT-GRAPH-BRUSH setting WPRTDATA-BRUSH-STYLE to WPRT-BRUSH-SOLID and computing WPRDATA-BRUSH-COLOR with the following formula:
RGB-RED (RGB-GREEN * 255) (RGB-BLUE * 65536)
The problem here is that we have a color combination of red and brown only.

The same formula is used to compute WPRTDATA-PEN-COLOR in WINPRINT-GRAPH-PEN and is working correctly, by giving a combination of all colors.

Any advice on this would be very helpful. Thanks.
Adam.

[Migrated content. Thread originally posted on 27 December 2002]

We call "WIN$PRINTER" routine for graphical printing and we can't define the color to fill the shape drawn with WINPRINT-GRAPH-DRAW.

We use WINPRINT-GRAPH-BRUSH setting WPRTDATA-BRUSH-STYLE to WPRT-BRUSH-SOLID and computing WPRDATA-BRUSH-COLOR with the following formula:
RGB-RED (RGB-GREEN * 255) (RGB-BLUE * 65536)
The problem here is that we have a color combination of red and brown only.

The same formula is used to compute WPRTDATA-PEN-COLOR in WINPRINT-GRAPH-PEN and is working correctly, by giving a combination of all colors.

Any advice on this would be very helpful. Thanks.
Adam.
Unfortunately you have probably ran into an alignment issue that were discovered with the color printing. This is related to the variables:

WPRTDATA-PEN-COLOR
WPRTDATA-BRUSH-COLOR
WPRTDATA-SET-STD-FONT

They are all declared PIC 9(9) COMP-5.
If you add SYNC to this, e.g.: PIC 9(9) COMP-5 SYNC.
You should get your colors.

[Migrated content. Thread originally posted on 27 December 2002]

We call "WIN$PRINTER" routine for graphical printing and we can't define the color to fill the shape drawn with WINPRINT-GRAPH-DRAW.

We use WINPRINT-GRAPH-BRUSH setting WPRTDATA-BRUSH-STYLE to WPRT-BRUSH-SOLID and computing WPRDATA-BRUSH-COLOR with the following formula:
RGB-RED (RGB-GREEN * 255) (RGB-BLUE * 65536)
The problem here is that we have a color combination of red and brown only.

The same formula is used to compute WPRTDATA-PEN-COLOR in WINPRINT-GRAPH-PEN and is working correctly, by giving a combination of all colors.

Any advice on this would be very helpful. Thanks.
Adam.
I followed your advice and now it's working.
But, I noticed that in working storage editor (Acubench v5.2.2), I must use "import copy file" (winprint.def), instead of "link copy file" to work corectly.

Thank you for your help.

[Migrated content. Thread originally posted on 27 December 2002]

We call "WIN$PRINTER" routine for graphical printing and we can't define the color to fill the shape drawn with WINPRINT-GRAPH-DRAW.

We use WINPRINT-GRAPH-BRUSH setting WPRTDATA-BRUSH-STYLE to WPRT-BRUSH-SOLID and computing WPRDATA-BRUSH-COLOR with the following formula:
RGB-RED (RGB-GREEN * 255) (RGB-BLUE * 65536)
The problem here is that we have a color combination of red and brown only.

The same formula is used to compute WPRTDATA-PEN-COLOR in WINPRINT-GRAPH-PEN and is working correctly, by giving a combination of all colors.

Any advice on this would be very helpful. Thanks.
Adam.
I followed your advice and now it's working.
But, I noticed that in working storage editor (Acubench v5.2.2), I must use "import copy file" (winprint.def), instead of "link copy file" to work corectly.

Thank you for your help.