-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
[MU3] Allow the user to customize background when exporting as PDF/PNG/SVG #7500
[MU3] Allow the user to customize background when exporting as PDF/PNG/SVG #7500
Conversation
@@ -66,6 +66,8 @@ | |||
#define PREF_EXPORT_PDF_DPI "export/pdf/dpi" | |||
#define PREF_EXPORT_PNG_RESOLUTION "export/png/resolution" | |||
#define PREF_EXPORT_PNG_USETRANSPARENCY "export/png/useTransparency" | |||
#define PREF_EXPORT_BG_STYLE "export/bg/style" | |||
#define PREF_EXPORT_BG_CUSTOM_COLOR "export/bg/customcolor" |
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.
Use spaces here, not tabs
mscore/file.cpp
Outdated
@@ -2187,6 +2216,21 @@ bool MuseScore::savePdf(QList<Score*> cs_, const QString& saveName) | |||
if (!firstPage) | |||
printer.newPage(); | |||
firstPage = false; | |||
|
|||
switch (exportBgStyle) { | |||
case 1: |
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.
indent one level more starting here
6a5d5ba
to
5e968d8
Compare
mscore/exportdialog.ui
Outdated
<property name="leftMargin"> | ||
<number>0</number> | ||
</property> | ||
<property name="topMargin"> | ||
<number>0</number> | ||
</property> | ||
<property name="rightMargin"> | ||
<number>0</number> | ||
</property> | ||
<property name="bottomMargin"> | ||
<number>0</number> | ||
</property> |
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.
Why are the margins changed? I don't think this is intended... please undo this (remove these 12 lines).
5e968d8
to
5e61766
Compare
Hi @sidharth-anand, we're not planning to release 3.x anymore, but I guess it might be useful for 4.0 |
Even if it is, please merge to 3,x too, it is easier to test it with a 3.x development build Also plans can change... And that preferences stuff is not yet in master anyhow as far as I can tell |
@vpereverzev it's not included in my PR for the export dialog currently. I was thinking of making a separate PR porting this to master once the export dialog and the preferences and somewhat stable in master |
Needs #7704 too |
…/PNG/SVG Duplicate of musescore#7500, plus fix 2 compiler warnings it introduced
Wouldn't that new preference also need to get added to the dialog in Edit > Preferences > Export > PNG and ...PDF (there is none for ...SVG)? Have you done a port of this to master meanwhile? (Edit: apparently not, but probably should) |
…/PNG/SVG Duplicate of musescore#7500, plus fix 2 MinGW compiler warnings it introduced.
…/PNG/SVG Duplicate of musescore#7500, plus fix 2 MinGW compiler warnings it introduced.
…/PNG/SVG Duplicate of musescore#7500, plus fix 2 MinGW compiler warnings it introduced.
…/PNG/SVG Duplicate of musescore#7500, plus fix 2 MinGW compiler warnings it introduced.
…/PNG/SVG Duplicate of musescore#7500, plus fix 2 MinGW compiler warnings it introduced.
…/PNG/SVG Duplicate of musescore#7500, plus fix 2 MinGW compiler warnings it introduced.
…/PNG/SVG Duplicate of musescore#7500, plus fix 2 MinGW compiler warnings it introduced.
…/PNG/SVG Duplicate of musescore#7500, plus fix 2 MinGW compiler warnings it introduced.
…/PNG/SVG Duplicate of musescore#7500, plus fix 2 MinGW compiler warnings it introduced.
3.x is closed for any changes |
…/PNG/SVG Duplicate of musescore#7500, plus fix 2 MinGW compiler warnings it introduced.
Resolves: https://musescore.org/en/node/293370
This patch provides the user complete control over the background when exporting the score to a PDF/PNG/SVG file, allowing the user to choose between a transparent background, the background currently used in the score (both solid colors and images) or a custom color.
Note: To be able to see the transparent background when exporting as a pdf, you will have to turn on the "Show Transparency Grid" or equivalent option in your pdf viewer or the transparent area gets filled with white by default.