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

Color struct refactor #187

Merged
merged 9 commits into from
Oct 26, 2023
Merged

Color struct refactor #187

merged 9 commits into from
Oct 26, 2023

Conversation

DomCR
Copy link
Owner

@DomCR DomCR commented Oct 23, 2023

Description

Refactor for the Color struct and implementation for the reader/writer

Tasks done in this PR

  • Color Struct refactor
  • DxfReader
  • DwgReader
  • DxfWriter
  • DwgWriter
    This feature will be finished in the follow PR:

Investigation

This are some controlled values found in the dwg while using the method ReadCmColor()

Dxf values are in decimal | hex | bin

DXF { Code: 62 Value: 80 | 0x50 | 0b0101_0000 }
rgb = 0xC3000050;
rgb_bin = 0b1100_0011_0000_0000_0000_0000_0101_0000

DXF { Code: 62 Value: 150 | 0x96 | 0b1001_0110 }
DXF { Code: 420 Value: 1151726 | 0x1192EE | 0b0101_0000 }
rgb = 0xC21192EE;
rgb_bin = 0b1100_0010_0001_0001_1001_0010_1110_1110 //420 value

DXF { Code: 62 Value: 31 | 0x1F | 0b0001_1111 }
DXF { Code: 420 Value: 16564615 | 0xFCC187 | 0b1111_1100_1100 0001_1000_0111 }
DXF { Code: 430 Value: DIC COLOR GUIDE(R)$DIC 7 }
rgb = 0xFCC187;
rgb_bin = 0b1100_0010_1111_1100_1100_0001_1000_0111 //420 value

Bit 0x1000000 seems to be the true color flag

@DomCR DomCR added the enhancement New feature or request label Oct 23, 2023
@DomCR DomCR merged commit 1cb0c7a into master Oct 26, 2023
2 checks passed
@DomCR DomCR deleted the refactor-Color-struct branch October 26, 2023 18:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ReadCmColor does not create Color with true-color values Color: GetTrueColorRgb returns 0 for indexed color
1 participant