Highlighted
Absent Member.
Absent Member.
1239 views

[archive] brush-color in "WIN$PRINTER"

[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.
0 Likes
2 Replies
Highlighted
Absent Member.
Absent Member.

RE: [archive] brush-color in "WIN$PRINTER"

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.
0 Likes
Highlighted
Absent Member.
Absent Member.

RE: [archive] brush-color in "WIN$PRINTER"

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.
0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.