diff --git a/extras/audio plugins/wrapper/Standalone/juce_StandaloneFilterWindow.cpp b/extras/audio plugins/wrapper/Standalone/juce_StandaloneFilterWindow.cpp index cc5d8f4dd3..8f5645ea66 100644 --- a/extras/audio plugins/wrapper/Standalone/juce_StandaloneFilterWindow.cpp +++ b/extras/audio plugins/wrapper/Standalone/juce_StandaloneFilterWindow.cpp @@ -45,7 +45,7 @@ StandaloneFilterWindow::StandaloneFilterWindow (const String& title, { setTitleBarButtonsRequired (DocumentWindow::minimiseButton | DocumentWindow::closeButton, false); - optionsButton = new TextButton (T("options")); + optionsButton = new TextButton ("options"); Component::addAndMakeVisible (optionsButton); optionsButton->addButtonListener (this); optionsButton->setTriggeredOnMouseDown (true); @@ -68,7 +68,7 @@ StandaloneFilterWindow::StandaloneFilterWindow (const String& title, XmlElement* savedState = 0; if (globalSettings != 0) - savedState = globalSettings->getXmlValue (T("audioSetup")); + savedState = globalSettings->getXmlValue ("audioSetup"); deviceManager->initialise (filter->getNumInputChannels(), filter->getNumOutputChannels(), @@ -81,7 +81,7 @@ StandaloneFilterWindow::StandaloneFilterWindow (const String& title, { MemoryBlock data; - if (data.fromBase64Encoding (globalSettings->getValue (T("filterState"))) + if (data.fromBase64Encoding (globalSettings->getValue ("filterState")) && data.getSize() > 0) { filter->setStateInformation (data.getData(), data.getSize()); @@ -90,8 +90,8 @@ StandaloneFilterWindow::StandaloneFilterWindow (const String& title, setContentComponent (filter->createEditorIfNeeded(), true, true); - const int x = globalSettings->getIntValue (T("windowX"), -100); - const int y = globalSettings->getIntValue (T("windowY"), -100); + const int x = globalSettings->getIntValue ("windowX", -100); + const int y = globalSettings->getIntValue ("windowY", -100); if (x != -100 && y != -100) setBoundsConstrained (Rectangle (x, y, getWidth(), getHeight())); @@ -112,15 +112,15 @@ StandaloneFilterWindow::~StandaloneFilterWindow() { PropertySet* const globalSettings = getGlobalSettings(); - globalSettings->setValue (T("windowX"), getX()); - globalSettings->setValue (T("windowY"), getY()); + globalSettings->setValue ("windowX", getX()); + globalSettings->setValue ("windowY", getY()); deleteAndZero (optionsButton); if (globalSettings != 0 && deviceManager != 0) { XmlElement* const xml = deviceManager->createStateXml(); - globalSettings->setValue (T("audioSetup"), xml); + globalSettings->setValue ("audioSetup", xml); delete xml; } @@ -131,7 +131,7 @@ StandaloneFilterWindow::~StandaloneFilterWindow() MemoryBlock data; filter->getStateInformation (data); - globalSettings->setValue (T("filterState"), data.toBase64Encoding()); + globalSettings->setValue ("filterState", data.toBase64Encoding()); } deleteFilter(); @@ -169,7 +169,7 @@ void StandaloneFilterWindow::resetFilter() PropertySet* const globalSettings = getGlobalSettings(); if (globalSettings != 0) - globalSettings->removeValue (T("filterState")); + globalSettings->removeValue ("filterState"); } //============================================================================== @@ -178,7 +178,7 @@ void StandaloneFilterWindow::saveState() PropertySet* const globalSettings = getGlobalSettings(); FileChooser fc (TRANS("Save current state"), - globalSettings != 0 ? File (globalSettings->getValue (T("lastStateFile"))) + globalSettings != 0 ? File (globalSettings->getValue ("lastStateFile")) : File::nonexistent); if (fc.browseForFileToSave (true)) @@ -200,7 +200,7 @@ void StandaloneFilterWindow::loadState() PropertySet* const globalSettings = getGlobalSettings(); FileChooser fc (TRANS("Load a saved state"), - globalSettings != 0 ? File (globalSettings->getValue (T("lastStateFile"))) + globalSettings != 0 ? File (globalSettings->getValue ("lastStateFile")) : File::nonexistent); if (fc.browseForFileToOpen()) diff --git a/extras/browser plugins/wrapper/juce_ActiveX_GlueCode.cpp b/extras/browser plugins/wrapper/juce_ActiveX_GlueCode.cpp index 6a0b8a16d4..57767df985 100644 --- a/extras/browser plugins/wrapper/juce_ActiveX_GlueCode.cpp +++ b/extras/browser plugins/wrapper/juce_ActiveX_GlueCode.cpp @@ -835,7 +835,7 @@ static const String CLSIDToJuceString (REFCLSID clsid) malloc->Release(); } - return result.removeCharacters (T("{}")).trim(); + return result.removeCharacters ("{}").trim(); } STDAPI DllGetClassObject (REFCLSID rclsid, REFIID riid, LPVOID* ppv) @@ -865,7 +865,7 @@ STDAPI DllCanUnloadNow() //============================================================================== static const String makeLegalRegistryName (const String& s) { - return s.retainCharacters (T("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-_.")); + return s.retainCharacters ("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-_."); } static HRESULT doRegistration (const bool unregister) diff --git a/juce_amalgamated.cpp b/juce_amalgamated.cpp index 14cb8ed3ff..afac3e081a 100644 --- a/juce_amalgamated.cpp +++ b/juce_amalgamated.cpp @@ -19863,7 +19863,7 @@ bool AudioFormatReader::read (int** destSamples, { int* lastFullChannel = destSamples[0]; - for (int i = numDestChannels; --i > 0;) + for (int i = (int) numChannels; --i > 0;) { if (destSamples[i] != 0) { @@ -80501,6 +80501,7 @@ FillType::~FillType() throw() bool FillType::operator== (const FillType& other) const { return colour == other.colour && image == other.image + && transform == other.transform && (gradient == other.gradient || (gradient != 0 && other.gradient != 0 && *gradient == *other.gradient)); } @@ -84238,6 +84239,7 @@ const Identifier Drawable::ValueTreeWrapperBase::idProperty ("id"); const Identifier Drawable::ValueTreeWrapperBase::type ("type"); const Identifier Drawable::ValueTreeWrapperBase::gradientPoint1 ("point1"); const Identifier Drawable::ValueTreeWrapperBase::gradientPoint2 ("point2"); +const Identifier Drawable::ValueTreeWrapperBase::gradientPoint3 ("point3"); const Identifier Drawable::ValueTreeWrapperBase::colour ("colour"); const Identifier Drawable::ValueTreeWrapperBase::radial ("radial"); const Identifier Drawable::ValueTreeWrapperBase::colours ("colours"); @@ -84266,7 +84268,7 @@ void Drawable::ValueTreeWrapperBase::setID (const String& newID, UndoManager* co state.setProperty (idProperty, newID, undoManager); } -const FillType Drawable::ValueTreeWrapperBase::readFillType (const ValueTree& v, RelativePoint* const gp1, RelativePoint* const gp2, +const FillType Drawable::ValueTreeWrapperBase::readFillType (const ValueTree& v, RelativePoint* const gp1, RelativePoint* const gp2, RelativePoint* const gp3, RelativeCoordinate::NamedCoordinateFinder* const nameFinder, ImageProvider* imageProvider) { const String newType (v[type].toString()); @@ -84279,14 +84281,13 @@ const FillType Drawable::ValueTreeWrapperBase::readFillType (const ValueTree& v, } else if (newType == "gradient") { - RelativePoint p1 (v [gradientPoint1]), p2 (v [gradientPoint2]); + RelativePoint p1 (v [gradientPoint1]), p2 (v [gradientPoint2]), p3 (v [gradientPoint3]); ColourGradient g; - if (gp1 != 0) - *gp1 = p1; - if (gp2 != 0) - *gp2 = p2; + if (gp1 != 0) *gp1 = p1; + if (gp2 != 0) *gp2 = p2; + if (gp3 != 0) *gp3 = p3; g.point1 = p1.resolve (nameFinder); g.point2 = p2.resolve (nameFinder); @@ -84299,7 +84300,20 @@ const FillType Drawable::ValueTreeWrapperBase::readFillType (const ValueTree& v, g.addColour (colourSteps[i * 2].getDoubleValue(), Colour ((uint32) colourSteps[i * 2 + 1].getHexValue32())); - return FillType (g); + FillType fillType (g); + + if (g.isRadial) + { + const Point point3 (p3.resolve (nameFinder)); + const Point point3Source (g.point1.getX() + g.point2.getY() - g.point1.getY(), + g.point1.getY() + g.point1.getX() - g.point2.getX()); + + fillType.transform = AffineTransform::fromTargetPoints (g.point1.getX(), g.point1.getY(), g.point1.getX(), g.point1.getY(), + g.point2.getX(), g.point2.getY(), g.point2.getX(), g.point2.getY(), + point3Source.getX(), point3Source.getY(), point3.getX(), point3.getY()); + } + + return fillType; } else if (newType == "image") { @@ -84316,8 +84330,17 @@ const FillType Drawable::ValueTreeWrapperBase::readFillType (const ValueTree& v, return FillType(); } +static const Point calcThirdGradientPoint (const FillType& fillType) +{ + const ColourGradient& g = *fillType.gradient; + const Point point3Source (g.point1.getX() + g.point2.getY() - g.point1.getY(), + g.point1.getY() + g.point1.getX() - g.point2.getX()); + + return point3Source.transformedBy (fillType.transform); +} + void Drawable::ValueTreeWrapperBase::writeFillType (ValueTree& v, const FillType& fillType, - const RelativePoint* const gp1, const RelativePoint* const gp2, + const RelativePoint* const gp1, const RelativePoint* const gp2, const RelativePoint* gp3, ImageProvider* imageProvider, UndoManager* const undoManager) { if (fillType.isColour()) @@ -84330,6 +84353,8 @@ void Drawable::ValueTreeWrapperBase::writeFillType (ValueTree& v, const FillType v.setProperty (type, "gradient", undoManager); v.setProperty (gradientPoint1, gp1 != 0 ? gp1->toString() : fillType.gradient->point1.toString(), undoManager); v.setProperty (gradientPoint2, gp2 != 0 ? gp2->toString() : fillType.gradient->point2.toString(), undoManager); + v.setProperty (gradientPoint3, gp3 != 0 ? gp3->toString() : calcThirdGradientPoint (fillType).toString(), undoManager); + v.setProperty (radial, fillType.gradient->isRadial, undoManager); String s; @@ -85487,7 +85512,7 @@ ValueTree DrawablePath::ValueTreeWrapper::getMainFillState() if (v.isValid()) return v; - setMainFill (Colours::black, 0, 0, 0, 0); + setMainFill (Colours::black, 0, 0, 0, 0, 0); return getMainFillState(); } @@ -85497,34 +85522,36 @@ ValueTree DrawablePath::ValueTreeWrapper::getStrokeFillState() if (v.isValid()) return v; - setStrokeFill (Colours::black, 0, 0, 0, 0); + setStrokeFill (Colours::black, 0, 0, 0, 0, 0); return getStrokeFillState(); } const FillType DrawablePath::ValueTreeWrapper::getMainFill (RelativeCoordinate::NamedCoordinateFinder* nameFinder, ImageProvider* imageProvider) const { - return readFillType (state.getChildWithName (fill), 0, 0, nameFinder, imageProvider); + return readFillType (state.getChildWithName (fill), 0, 0, 0, nameFinder, imageProvider); } void DrawablePath::ValueTreeWrapper::setMainFill (const FillType& newFill, const RelativePoint* gp1, - const RelativePoint* gp2, ImageProvider* imageProvider, UndoManager* undoManager) + const RelativePoint* gp2, const RelativePoint* gp3, + ImageProvider* imageProvider, UndoManager* undoManager) { ValueTree v (state.getOrCreateChildWithName (fill, undoManager)); - writeFillType (v, newFill, gp1, gp2, imageProvider, undoManager); + writeFillType (v, newFill, gp1, gp2, gp3, imageProvider, undoManager); } const FillType DrawablePath::ValueTreeWrapper::getStrokeFill (RelativeCoordinate::NamedCoordinateFinder* nameFinder, ImageProvider* imageProvider) const { - return readFillType (state.getChildWithName (stroke), 0, 0, nameFinder, imageProvider); + return readFillType (state.getChildWithName (stroke), 0, 0, 0, nameFinder, imageProvider); } void DrawablePath::ValueTreeWrapper::setStrokeFill (const FillType& newFill, const RelativePoint* gp1, - const RelativePoint* gp2, ImageProvider* imageProvider, UndoManager* undoManager) + const RelativePoint* gp2, const RelativePoint* gp3, + ImageProvider* imageProvider, UndoManager* undoManager) { ValueTree v (state.getOrCreateChildWithName (stroke, undoManager)); - writeFillType (v, newFill, gp1, gp2, imageProvider, undoManager); + writeFillType (v, newFill, gp1, gp2, gp3, imageProvider, undoManager); } const PathStrokeType DrawablePath::ValueTreeWrapper::getStrokeType() const @@ -85673,8 +85700,8 @@ const ValueTree DrawablePath::createValueTree (ImageProvider* imageProvider) con ValueTreeWrapper v (tree); v.setID (getName(), 0); - v.setMainFill (mainFill, 0, 0, imageProvider, 0); - v.setStrokeFill (strokeFill, 0, 0, imageProvider, 0); + v.setMainFill (mainFill, 0, 0, 0, imageProvider, 0); + v.setStrokeFill (strokeFill, 0, 0, 0, imageProvider, 0); v.setStrokeType (strokeType, 0); if (relativePath != 0) diff --git a/juce_amalgamated.h b/juce_amalgamated.h index dde123a88c..bf41be4e6a 100644 --- a/juce_amalgamated.h +++ b/juce_amalgamated.h @@ -64,7 +64,7 @@ */ #define JUCE_MAJOR_VERSION 1 #define JUCE_MINOR_VERSION 52 -#define JUCE_BUILDNUMBER 24 +#define JUCE_BUILDNUMBER 25 /** Current Juce version number. @@ -43362,17 +43362,19 @@ public: void setID (const String& newID, UndoManager* undoManager); static const Identifier idProperty; - static const FillType readFillType (const ValueTree& v, RelativePoint* gradientPoint1, RelativePoint* gradientPoint2, + static const FillType readFillType (const ValueTree& v, RelativePoint* gradientPoint1, + RelativePoint* gradientPoint2, RelativePoint* gradientPoint3, RelativeCoordinate::NamedCoordinateFinder* nameFinder, ImageProvider* imageProvider); static void writeFillType (ValueTree& v, const FillType& fillType, const RelativePoint* gradientPoint1, const RelativePoint* gradientPoint2, - ImageProvider* imageProvider, + const RelativePoint* gradientPoint3, ImageProvider* imageProvider, UndoManager* undoManager); ValueTree state; - static const Identifier type, gradientPoint1, gradientPoint2, colour, radial, colours, imageId, imageOpacity; + static const Identifier type, gradientPoint1, gradientPoint2, gradientPoint3, + colour, radial, colours, imageId, imageOpacity; }; juce_UseDebuggingNewOperator @@ -59305,13 +59307,15 @@ public: const FillType getMainFill (RelativeCoordinate::NamedCoordinateFinder* nameFinder, ImageProvider* imageProvider) const; ValueTree getMainFillState(); - void setMainFill (const FillType& newFill, const RelativePoint* gradientPoint1, const RelativePoint* gradientPoint2, + void setMainFill (const FillType& newFill, const RelativePoint* gradientPoint1, + const RelativePoint* gradientPoint2, const RelativePoint* gradientPoint3, ImageProvider* imageProvider, UndoManager* undoManager); const FillType getStrokeFill (RelativeCoordinate::NamedCoordinateFinder* nameFinder, ImageProvider* imageProvider) const; ValueTree getStrokeFillState(); - void setStrokeFill (const FillType& newFill, const RelativePoint* gradientPoint1, const RelativePoint* gradientPoint2, + void setStrokeFill (const FillType& newFill, const RelativePoint* gradientPoint1, + const RelativePoint* gradientPoint2, const RelativePoint* gradientPoint3, ImageProvider* imageProvider, UndoManager* undoManager); const PathStrokeType getStrokeType() const; diff --git a/src/audio/audio_file_formats/juce_AudioFormat.cpp b/src/audio/audio_file_formats/juce_AudioFormat.cpp index 8c9324324e..cd722a3301 100644 --- a/src/audio/audio_file_formats/juce_AudioFormat.cpp +++ b/src/audio/audio_file_formats/juce_AudioFormat.cpp @@ -85,7 +85,7 @@ bool AudioFormatReader::read (int** destSamples, { int* lastFullChannel = destSamples[0]; - for (int i = numDestChannels; --i > 0;) + for (int i = (int) numChannels; --i > 0;) { if (destSamples[i] != 0) { diff --git a/src/core/juce_StandardHeader.h b/src/core/juce_StandardHeader.h index 289207c3c0..a1094f2421 100644 --- a/src/core/juce_StandardHeader.h +++ b/src/core/juce_StandardHeader.h @@ -33,7 +33,7 @@ */ #define JUCE_MAJOR_VERSION 1 #define JUCE_MINOR_VERSION 52 -#define JUCE_BUILDNUMBER 24 +#define JUCE_BUILDNUMBER 25 /** Current Juce version number. diff --git a/src/gui/graphics/contexts/juce_FillType.cpp b/src/gui/graphics/contexts/juce_FillType.cpp index fcf6f86586..653c084698 100644 --- a/src/gui/graphics/contexts/juce_FillType.cpp +++ b/src/gui/graphics/contexts/juce_FillType.cpp @@ -79,6 +79,7 @@ FillType::~FillType() throw() bool FillType::operator== (const FillType& other) const { return colour == other.colour && image == other.image + && transform == other.transform && (gradient == other.gradient || (gradient != 0 && other.gradient != 0 && *gradient == *other.gradient)); } diff --git a/src/gui/graphics/drawables/juce_Drawable.cpp b/src/gui/graphics/drawables/juce_Drawable.cpp index 642c65fc2e..fc6b683918 100644 --- a/src/gui/graphics/drawables/juce_Drawable.cpp +++ b/src/gui/graphics/drawables/juce_Drawable.cpp @@ -168,6 +168,7 @@ const Identifier Drawable::ValueTreeWrapperBase::idProperty ("id"); const Identifier Drawable::ValueTreeWrapperBase::type ("type"); const Identifier Drawable::ValueTreeWrapperBase::gradientPoint1 ("point1"); const Identifier Drawable::ValueTreeWrapperBase::gradientPoint2 ("point2"); +const Identifier Drawable::ValueTreeWrapperBase::gradientPoint3 ("point3"); const Identifier Drawable::ValueTreeWrapperBase::colour ("colour"); const Identifier Drawable::ValueTreeWrapperBase::radial ("radial"); const Identifier Drawable::ValueTreeWrapperBase::colours ("colours"); @@ -196,7 +197,7 @@ void Drawable::ValueTreeWrapperBase::setID (const String& newID, UndoManager* co state.setProperty (idProperty, newID, undoManager); } -const FillType Drawable::ValueTreeWrapperBase::readFillType (const ValueTree& v, RelativePoint* const gp1, RelativePoint* const gp2, +const FillType Drawable::ValueTreeWrapperBase::readFillType (const ValueTree& v, RelativePoint* const gp1, RelativePoint* const gp2, RelativePoint* const gp3, RelativeCoordinate::NamedCoordinateFinder* const nameFinder, ImageProvider* imageProvider) { const String newType (v[type].toString()); @@ -209,14 +210,13 @@ const FillType Drawable::ValueTreeWrapperBase::readFillType (const ValueTree& v, } else if (newType == "gradient") { - RelativePoint p1 (v [gradientPoint1]), p2 (v [gradientPoint2]); + RelativePoint p1 (v [gradientPoint1]), p2 (v [gradientPoint2]), p3 (v [gradientPoint3]); ColourGradient g; - if (gp1 != 0) - *gp1 = p1; - if (gp2 != 0) - *gp2 = p2; + if (gp1 != 0) *gp1 = p1; + if (gp2 != 0) *gp2 = p2; + if (gp3 != 0) *gp3 = p3; g.point1 = p1.resolve (nameFinder); g.point2 = p2.resolve (nameFinder); @@ -229,7 +229,20 @@ const FillType Drawable::ValueTreeWrapperBase::readFillType (const ValueTree& v, g.addColour (colourSteps[i * 2].getDoubleValue(), Colour ((uint32) colourSteps[i * 2 + 1].getHexValue32())); - return FillType (g); + FillType fillType (g); + + if (g.isRadial) + { + const Point point3 (p3.resolve (nameFinder)); + const Point point3Source (g.point1.getX() + g.point2.getY() - g.point1.getY(), + g.point1.getY() + g.point1.getX() - g.point2.getX()); + + fillType.transform = AffineTransform::fromTargetPoints (g.point1.getX(), g.point1.getY(), g.point1.getX(), g.point1.getY(), + g.point2.getX(), g.point2.getY(), g.point2.getX(), g.point2.getY(), + point3Source.getX(), point3Source.getY(), point3.getX(), point3.getY()); + } + + return fillType; } else if (newType == "image") { @@ -246,8 +259,17 @@ const FillType Drawable::ValueTreeWrapperBase::readFillType (const ValueTree& v, return FillType(); } +static const Point calcThirdGradientPoint (const FillType& fillType) +{ + const ColourGradient& g = *fillType.gradient; + const Point point3Source (g.point1.getX() + g.point2.getY() - g.point1.getY(), + g.point1.getY() + g.point1.getX() - g.point2.getX()); + + return point3Source.transformedBy (fillType.transform); +} + void Drawable::ValueTreeWrapperBase::writeFillType (ValueTree& v, const FillType& fillType, - const RelativePoint* const gp1, const RelativePoint* const gp2, + const RelativePoint* const gp1, const RelativePoint* const gp2, const RelativePoint* gp3, ImageProvider* imageProvider, UndoManager* const undoManager) { if (fillType.isColour()) @@ -260,6 +282,8 @@ void Drawable::ValueTreeWrapperBase::writeFillType (ValueTree& v, const FillType v.setProperty (type, "gradient", undoManager); v.setProperty (gradientPoint1, gp1 != 0 ? gp1->toString() : fillType.gradient->point1.toString(), undoManager); v.setProperty (gradientPoint2, gp2 != 0 ? gp2->toString() : fillType.gradient->point2.toString(), undoManager); + v.setProperty (gradientPoint3, gp3 != 0 ? gp3->toString() : calcThirdGradientPoint (fillType).toString(), undoManager); + v.setProperty (radial, fillType.gradient->isRadial, undoManager); String s; diff --git a/src/gui/graphics/drawables/juce_Drawable.h b/src/gui/graphics/drawables/juce_Drawable.h index 7dcd6d1735..2290e27a26 100644 --- a/src/gui/graphics/drawables/juce_Drawable.h +++ b/src/gui/graphics/drawables/juce_Drawable.h @@ -248,17 +248,19 @@ public: void setID (const String& newID, UndoManager* undoManager); static const Identifier idProperty; - static const FillType readFillType (const ValueTree& v, RelativePoint* gradientPoint1, RelativePoint* gradientPoint2, + static const FillType readFillType (const ValueTree& v, RelativePoint* gradientPoint1, + RelativePoint* gradientPoint2, RelativePoint* gradientPoint3, RelativeCoordinate::NamedCoordinateFinder* nameFinder, ImageProvider* imageProvider); static void writeFillType (ValueTree& v, const FillType& fillType, const RelativePoint* gradientPoint1, const RelativePoint* gradientPoint2, - ImageProvider* imageProvider, + const RelativePoint* gradientPoint3, ImageProvider* imageProvider, UndoManager* undoManager); ValueTree state; - static const Identifier type, gradientPoint1, gradientPoint2, colour, radial, colours, imageId, imageOpacity; + static const Identifier type, gradientPoint1, gradientPoint2, gradientPoint3, + colour, radial, colours, imageId, imageOpacity; }; //============================================================================== diff --git a/src/gui/graphics/drawables/juce_DrawablePath.cpp b/src/gui/graphics/drawables/juce_DrawablePath.cpp index 82fdf03947..3f0c237990 100644 --- a/src/gui/graphics/drawables/juce_DrawablePath.cpp +++ b/src/gui/graphics/drawables/juce_DrawablePath.cpp @@ -212,7 +212,7 @@ ValueTree DrawablePath::ValueTreeWrapper::getMainFillState() if (v.isValid()) return v; - setMainFill (Colours::black, 0, 0, 0, 0); + setMainFill (Colours::black, 0, 0, 0, 0, 0); return getMainFillState(); } @@ -222,34 +222,36 @@ ValueTree DrawablePath::ValueTreeWrapper::getStrokeFillState() if (v.isValid()) return v; - setStrokeFill (Colours::black, 0, 0, 0, 0); + setStrokeFill (Colours::black, 0, 0, 0, 0, 0); return getStrokeFillState(); } const FillType DrawablePath::ValueTreeWrapper::getMainFill (RelativeCoordinate::NamedCoordinateFinder* nameFinder, ImageProvider* imageProvider) const { - return readFillType (state.getChildWithName (fill), 0, 0, nameFinder, imageProvider); + return readFillType (state.getChildWithName (fill), 0, 0, 0, nameFinder, imageProvider); } void DrawablePath::ValueTreeWrapper::setMainFill (const FillType& newFill, const RelativePoint* gp1, - const RelativePoint* gp2, ImageProvider* imageProvider, UndoManager* undoManager) + const RelativePoint* gp2, const RelativePoint* gp3, + ImageProvider* imageProvider, UndoManager* undoManager) { ValueTree v (state.getOrCreateChildWithName (fill, undoManager)); - writeFillType (v, newFill, gp1, gp2, imageProvider, undoManager); + writeFillType (v, newFill, gp1, gp2, gp3, imageProvider, undoManager); } const FillType DrawablePath::ValueTreeWrapper::getStrokeFill (RelativeCoordinate::NamedCoordinateFinder* nameFinder, ImageProvider* imageProvider) const { - return readFillType (state.getChildWithName (stroke), 0, 0, nameFinder, imageProvider); + return readFillType (state.getChildWithName (stroke), 0, 0, 0, nameFinder, imageProvider); } void DrawablePath::ValueTreeWrapper::setStrokeFill (const FillType& newFill, const RelativePoint* gp1, - const RelativePoint* gp2, ImageProvider* imageProvider, UndoManager* undoManager) + const RelativePoint* gp2, const RelativePoint* gp3, + ImageProvider* imageProvider, UndoManager* undoManager) { ValueTree v (state.getOrCreateChildWithName (stroke, undoManager)); - writeFillType (v, newFill, gp1, gp2, imageProvider, undoManager); + writeFillType (v, newFill, gp1, gp2, gp3, imageProvider, undoManager); } const PathStrokeType DrawablePath::ValueTreeWrapper::getStrokeType() const @@ -401,8 +403,8 @@ const ValueTree DrawablePath::createValueTree (ImageProvider* imageProvider) con ValueTreeWrapper v (tree); v.setID (getName(), 0); - v.setMainFill (mainFill, 0, 0, imageProvider, 0); - v.setStrokeFill (strokeFill, 0, 0, imageProvider, 0); + v.setMainFill (mainFill, 0, 0, 0, imageProvider, 0); + v.setStrokeFill (strokeFill, 0, 0, 0, imageProvider, 0); v.setStrokeType (strokeType, 0); if (relativePath != 0) diff --git a/src/gui/graphics/drawables/juce_DrawablePath.h b/src/gui/graphics/drawables/juce_DrawablePath.h index 953e63e8e9..cc3685be62 100644 --- a/src/gui/graphics/drawables/juce_DrawablePath.h +++ b/src/gui/graphics/drawables/juce_DrawablePath.h @@ -132,13 +132,15 @@ public: const FillType getMainFill (RelativeCoordinate::NamedCoordinateFinder* nameFinder, ImageProvider* imageProvider) const; ValueTree getMainFillState(); - void setMainFill (const FillType& newFill, const RelativePoint* gradientPoint1, const RelativePoint* gradientPoint2, + void setMainFill (const FillType& newFill, const RelativePoint* gradientPoint1, + const RelativePoint* gradientPoint2, const RelativePoint* gradientPoint3, ImageProvider* imageProvider, UndoManager* undoManager); const FillType getStrokeFill (RelativeCoordinate::NamedCoordinateFinder* nameFinder, ImageProvider* imageProvider) const; ValueTree getStrokeFillState(); - void setStrokeFill (const FillType& newFill, const RelativePoint* gradientPoint1, const RelativePoint* gradientPoint2, + void setStrokeFill (const FillType& newFill, const RelativePoint* gradientPoint1, + const RelativePoint* gradientPoint2, const RelativePoint* gradientPoint3, ImageProvider* imageProvider, UndoManager* undoManager); const PathStrokeType getStrokeType() const;