-
Couldn't load subscription status.
- Fork 103
add additional image drawing methods and operators #130
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
add additional image drawing methods and operators #130
Conversation
DrawText including background color FillRectangle and FillCircle
revert accidental removing lines from Resources.resx
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for submitting this PR - just a couple of tiny changes but otherwise everything looks great! Thanks also for including unit tests :-). For some reason there is one test (Image_GrayDrawTestWithBackground) that fails the CI build due to too many different pixels vs the reference image. I wonder if that test passes for you at all? We've sometimes noticed in the past that some of these imaging tests can fail on some machines but not others, possibly due to differences in GDI+ versions. There are tolerance and outlier parameters in the AssertAreImagesEqual method for that reason, but normally the default tolerances have worked for us.
remove temporary debug lines new image for TestImage_GrayDrawTextWithBackground
@chitsaw Thank you for your review and to let me contribute this to your project :-). |
|
@tteichmeister thanks for making those changes. Yes, the tests pass now with the new image. Thanks so much for your contributions! |
Hi,
It would be helpful to provide additional drawing functions for the image.
Especially to fill a rectangle or a circle. Currently it is only possible to draw a rectangle/circle but not to fill it.
Furthermore, an additional function to draw a text with a background color would be good.
Especially if you want to label objects and other stuff, with a background color as a contrast, it can help to improve the readability of the text.
(Here I marked the object with

DrawRectangleand using the newDrawTextmethod to draw the text below)Therefore I provided 3 methods:
FillRectangleFillCircleDrawText(including an additional color for the background color)I also including the operators which are also included for the existing
DrawText,DrawRectangle...