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

Uses outline and opacity defaults for polygon fill #178

Merged
merged 2 commits into from May 20, 2021
Merged

Uses outline and opacity defaults for polygon fill #178

merged 2 commits into from May 20, 2021

Conversation

mholthausen
Copy link
Member

@mholthausen mholthausen commented May 12, 2021

This MR

@KaiVolland @jansule please review

@mholthausen mholthausen marked this pull request as draft May 17, 2021 07:20
@mholthausen mholthausen marked this pull request as ready for review May 17, 2021 13:51
@@ -784,16 +784,19 @@ export class QGISStyleParser implements StyleParser {
}

getQmlFillSymbolFromSymbolizer(symbolizer: FillSymbolizer): any {
const fillOpacity = symbolizer.fillOpacity !== undefined ? symbolizer.fillOpacity : symbolizer.opacity;
const outlineOpacity = symbolizer.outlineOpacity !== undefined ? symbolizer.outlineOpacity : symbolizer.opacity;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a note:
Actually this is kind of tricky, as you can combine opacities in several symbolizers.
So opacity, fillOpacity and outlineOpacity might get combined. Its quite easy to multiply this when writing, but it's impossible when parsing it back to geostyler-style.

So i guess its ok to support only precise fillOpacity and outlineOpacity or opacity.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I had to implement a distinction for outlineOpacitiy and fillOpacitity at this point, but to remain compatible I wanted to keep the original opacitiy value in mind if it exists.

Copy link
Contributor

@jansule jansule left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very nice!

@dnlkoch dnlkoch merged commit b6ea538 into geostyler:master May 20, 2021
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.

None yet

4 participants