Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

vq_color test wrong? #94

Open
DavidGZ opened this issue Aug 2, 2019 · 3 comments
Open

vq_color test wrong? #94

DavidGZ opened this issue Aug 2, 2019 · 3 comments

Comments

@DavidGZ
Copy link
Member

DavidGZ commented Aug 2, 2019

Some colour printer drivers do not allow modifying the colour of each register. There is a simple test for checking if the driver permits you to change index colours:
Call vq_color with set_flag value of 0 and save the return
Call vs_color to modify that colour index by a significant value
Call vq_color with set_flag value of 0 and then compare it with what you set
Restore old value
If equivalent values are returned, you can modify each colour index

If I understand this correctly the test described above for vq_color is wrong, the second call to vq_color should have the set flag set to 1 instead of 0 for this test to make sense.

The Compendium has the same test described in its vq_color page with the same error.
If somebody confirms that I'm not missing anything I'll correct this.

@th-otto
Copy link
Contributor

th-otto commented Aug 2, 2019

I think it does not matter much whether you use 0 or 1 in the 2nd call. The example states you should change it by a "significant value". The difference between 0 and 1 is only whether you get the exact value or not, but the test is only to check whether you can change the value at all.

@DavidGZ
Copy link
Member Author

DavidGZ commented Aug 2, 2019

If I use set_flag 0 in the second vq_color call I'm going to get always what I requested with vs_color, I really don't understand how this is useful. Note that the vq_color description says that with a set_flag 0 I'll get the last requested value:

"set_flag
0 = Return colour values last requested by user at vs_color
1 = Return realized colour values"

@th-otto
Copy link
Contributor

th-otto commented Aug 2, 2019

Hm, maybe it depends how it is implemented in the driver. Then of course feel free to update it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants