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

DrawText requires Brush on Android, Pen on Windows #85

Open
charlesroddie opened this issue May 17, 2017 · 3 comments
Open

DrawText requires Brush on Android, Pen on Windows #85

charlesroddie opened this issue May 17, 2017 · 3 comments

Comments

@charlesroddie
Copy link

charlesroddie commented May 17, 2017

Our testing indicates that DrawText requires a Brush on Android, a Pen on Windows, and probably a Brush on iOS (will confirm).

DrawText(string,Point,Font,Brush) therefore works on Android (and iOS?) and not Win8.
DrawText(string,Point,Font,Color) and DrawText(string,Frame,Font,TextAlignment,Color) presumably sets a Brush and works on Android (and iOS?) and not Win8.
DrawText(string,Frame,Font,?TextAlignment,?Pen,?Brush) works on Win8 with Pen set, and Android (and iOS?) with Brush set.

@charlesroddie
Copy link
Author

This is based on the detailed results:

DrawText(string,Point,Font,Brush)
Android works, Win8 doesn't (System.ArgumentException)

DrawText(string,Point,Font,Color)
Android works, Win8 doesn't (System.ArgumentException)

DrawText(string,Frame,Font,TextAlignment,Color)
Android work, Win8 doesn't (whit text)

DrawText(string,Frame,Font,?TextAlignment,?Pen,?Brush)
Win8 works with Pen specified, Brush has no effect.
Android works with Brush specified, otherwise blank. Pen has no effect.
iOS doesn't work with Pen specified (wrong Color), need to test Brush.

@mwpb
Copy link

mwpb commented May 18, 2017

Some more data points:

DrawText(string,Point,Font,Brush)
iOS: works.

DrawText(string,Point,Font,Color)
iOS: works.

DrawText(string,Frame,Font,TextAlignment,Color)
iOS: works.

DrawText(string,Frame,Font,?TextAlignment,?Pen,?Brush)
iOS: works with all specified.
iOS: if no brush then colours are wrong.

@mwpb
Copy link

mwpb commented May 18, 2017

So in summary if one uses method 4:

DrawText(string,Frame,Font,?TextAlignment,?Pen,?Brush)

and then sets all of the optional arguments then DrawText works as expected.

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