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

Colors do not match to Xamarin Colors #5

Open
Knordy opened this issue Sep 12, 2016 · 1 comment
Open

Colors do not match to Xamarin Colors #5

Knordy opened this issue Sep 12, 2016 · 1 comment

Comments

@Knordy
Copy link

Knordy commented Sep 12, 2016

In the iOS ShapeRenderer the colors of an Element are converted to a CGColor object. When analyzing the Xamarin BoxView iOS renderer they use a UIColor. When rendering a ShapeView and a BoxView next to each other with the same color definition, the colors are rendered differently.

In this case iOS renders a slightly lighter color for the ShapeView:

<StackLayout Orientation="Horizontal"> <e:ShapeView Color="#0076FF" ShapeType="Box" /> <BoxView Color="#0076FF" /> </StackLayout>

shapeview vs boxview bug

After changing the Color objects in the HandleStandardDraw in the iOS ShapeRenderer, the colors are the same again:

UIColor fillColor = Element.Color.ToUIColor(); UIColor strokeColor = Element.StrokeColor.ToUIColor(); fillColor.SetFill(); strokeColor.SetStroke();

shapeview vs boxview fix

@andressbarajas
Copy link

Thanks. Helped a lot!

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