Skip to content

maybe nevertheless a color-bug? #26

@mbastiek

Description

@mbastiek

Hi!
Related to
#20

I had to change in
Direct2DRenderer.cs
public int CreateBrush
from
new RawColor4((color >> 16) & 255L, (color >> 8) & 255L, (byte) color & 255L, (color >> 24) & 255L)));
to
new RawColor4(((color >> 16) & 255L ) / 255.0f, ((color >> 8) & 255L) / 255.0f, ( color & 255L) / 255.0f, ((color >> 24) & 255L) / 255.0f)));

and

_brushContainer.Add(new SolidColorBrush(_device, new RawColor4(color.R, color.G, color.B, color.A / 255.0f)));
to
_brushContainer.Add(new SolidColorBrush(_device, new RawColor4(color.R / 255.0f, color.G / 255.0f, color.B / 255.0f, color.A / 255.0f)));

to make it work to my understanding of int-colors and Color-colors.
But my understanding is not that strong in this case.

The alpha-channel inversion and the single case change from 0 to 255 ist still to think about.
Edit: removed the single case change from 0 to 255.

Thanks for the good work though.

Greetings

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions