-
Notifications
You must be signed in to change notification settings - Fork 640
Add border stroke for TYPE_CROSS check fields #1262
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
base: master
Are you sure you want to change the base?
Conversation
|
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.
This is incorrect,
- the rectangle must only be stroked if a solid stroke border is selected while you stroke unconditionally,
- the
clip
call must be before thestroke
call if any, and - the
newPath
call in case of theon
state must be dropped if the rectangle is stroked.
|
Reimplemented the fix by using the border appearance code from |
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.
Disclaimer: I only reviewed the changes in the source code. I didn't find any blockers (which I had seen in my review of the first merge request), so I don't disapprove of this. But to really approve the CR, the reviewer should check result PDFs of applying this code to real world test inputs.
I do not see any real issue in the proposed change. Two observations, though:
- The public static method
RadioCheckField.getAppearanceRadioCross
has been given an additional parameter. This strictly speaking is a break of the public API. One could argue, though, that this method will hardly be used directly by any code from outside the lib. - If I read the code change correctly, no clip path is applied to the on state appearance anymore to restrict the cross to the inside of the box. But as the cross is explicitly drawn by the code using the known box dimensions, this shouldn't be an issue. (Well, if someone used minute check boxes, e.g. with a width or height of 5 units or less, the cross might look weird, but that's no change to the state before).
Fixes #1261
Description of the new Feature/Bugfix
Added a
stroke()
call for the rectangle used to draw the field border ingetAppearanceRadioCross
.Related Issue: #1261
Thank you,
Lucian chirita