-
-
Notifications
You must be signed in to change notification settings - Fork 118
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
ReadEnColor creates bad Color #197
Comments
Hi @mme1950 I've been working on the colors in this PR: There is an investigation of how the color is stored in I'll open a branch to check the current implementation and add some Asserts to check the entity color and transparency. |
Sorry to say: The color is still not OK. This line should be changed: This seems to fix part of the problem: Some colors are black instead of the values we saw previously. |
I do not understand the details. I changed these lines in DwgMergedReader:
Now I get the color as before. |
I need to read more documentation about how the colors are encoded and used in the DWG files, I'll keep this open and see what I can find out. |
- Work-around: Preliminary fix for DomCR/AcadSharp/DomCR#197
We read a complex DWG with several colors.
It worked "quite well" before. But now it seems all colors are ByBlock.
ReadEnColol has been changed recently:
old: color = new Color((short)(size & 0b111111111111));
new: color = new Color((byte)(size & 0b111111111111));
Rolling back to the old code seems to fix the problem.
BTW: These lines cannot be correct: A true color using the RGB value cannot be created this way:
//Next value is a BS containing the RGB value(last 24 bits).
color = new Color((byte)this.ReadBitLong());
The text was updated successfully, but these errors were encountered: