Skip to content

Fix inverted contour rendering for consecutive blank pixel rows between shapes - #2367

Merged
ice0 merged 1 commit into
synfig:masterfrom
rodolforg:fix-invert-between-blank-lines
Oct 20, 2021
Merged

ice0 merged 1 commit into
synfig:masterfrom
rodolforg:fix-invert-between-blank-lines

Conversation

@rodolforg

@rodolforg rodolforg commented Oct 16, 2021 •

Copy link
Copy Markdown
Contributor

Before:
screenshot_014

After:
screenshot_018

Though not used by current GUI tools, a Contour may be composed
of more than one polygon or bline-shape.

Let's assume we are rendering a shape like the character 'i':
it is a dot above a straight line segment (or a bit more elaborated
shape), right?
There is at least a pixel row separating them.

If we set 'invert' parameter of the contour that contains both
polygons (dot + straight line segment),
the row(s) between those shapes are not filled, but kept as if
'invert' was not set.

@rodolforg rodolforg mentioned this pull request Oct 16, 2021
10 tasks done
@rodolforg
rodolforg force-pushed the fix-invert-between-blank-lines branch from 380291f to 6f2c317 Compare October 18, 2021 08:16
ice0
ice0 previously approved these changes Oct 18, 2021
@ice0

ice0 commented Oct 18, 2021

Copy link
Copy Markdown
Collaborator

@rodolforg please rebase

@rodolforg

Copy link
Copy Markdown
Contributor Author

@ice0 Would it work to press the green button arrow and select "Rebase and merge"?

@morevnaproject

Copy link
Copy Markdown
Member

@ice0 Would it work to press the green button arrow and select "Rebase and merge"?

In this case the commits of this PR will be moved to master branch, without a PR id in the description.
We need to keep PR id for reports and changelogs. ^__^

@morevnaproject

Copy link
Copy Markdown
Member

Alternative is to use "Squash and merge" green button, but in this case all commits will be squashed into one. Maybe this is acceptable for this PR? ^__^

@rodolforg

Copy link
Copy Markdown
Contributor Author

In this case the commits of this PR will be moved to master branch, without a PR id in the description.

Good to know!
Rebased.

ice0
ice0 previously approved these changes Oct 18, 2021
@ice0

ice0 commented Oct 18, 2021

Copy link
Copy Markdown
Collaborator

Alternative is to use "Squash and merge" green button, but in this case all commits will be squashed into one. Maybe this is acceptable for this PR? ^__^

Ok, I will try it next time!

@morevnaproject

morevnaproject commented Oct 18, 2021 •

Copy link
Copy Markdown
Member

I have added before/after illustrations to the PR's description

@morevnaproject

Copy link
Copy Markdown
Member

This PR gives a problem with logo.sif file (synfig-studio/images/logo.sif).

Here's how it looks without this PR -
screenshot_022

...and with this PR -
screenshot_021

@rodolforg

Copy link
Copy Markdown
Contributor Author

It's the second commit the dooms everything.
I'm trying to understand why.

@rodolforg

rodolforg commented Oct 18, 2021 •

Copy link
Copy Markdown
Contributor Author

I got it now.

Strange enough generic_pen does not provide virtual methods, even though another class - in the same file - alpha_pen inherits it, and 'overrides' some of its methods.

Though not used by current GUI tools, a Contour may be composed
of more than one polygon or bline-shape.

Let's assume we are rendering a shape like the character 'i':
it is a dot above a straight line segment (or a bit more elaborated
shape), right?
There is at least a pixel row separating them.

If we set 'invert' parameter of the contour that contains both
polygons (dot + straight line segment),
the row(s) between those shapes are not filled, but kept as if
'invert' was not set.
@rodolforg

Copy link
Copy Markdown
Contributor Author

Strange enough generic_pen does not provide virtual methods, even though another class - in the same file - alpha_pen inherits it, and 'overrides' some of its methods.

So I removed the trouble commit.
Here it is: rodolforg@48edcdd
I tried to make the generic_pen methods virtual, but it caused some building issue related to a const synfig::Color& thing. So I gave up.

@morevnaproject

Copy link
Copy Markdown
Member

It works good now! Thank you! ^__^

@ice0
ice0 merged commit 1d38aea into synfig:master Oct 20, 2021
@ice0

ice0 commented Oct 20, 2021

Copy link
Copy Markdown
Collaborator

Merged. Thank you!

@rodolforg
rodolforg deleted the fix-invert-between-blank-lines branch October 25, 2021 03:18
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

Successfully merging this pull request may close these issues.

3 participants