1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-25 02:04:23 +00:00

Cleaned up a few uses of Image::null

This commit is contained in:
jules 2016-03-10 17:20:15 +00:00
parent 086eef8ba6
commit 189853720a
12 changed files with 17 additions and 17 deletions

View file

@ -104,7 +104,7 @@ bool FillType::operator!= (const FillType& other) const
void FillType::setColour (Colour newColour) noexcept
{
gradient = nullptr;
image = Image::null;
image = Image();
colour = newColour;
}
@ -116,7 +116,7 @@ void FillType::setGradient (const ColourGradient& newGradient)
}
else
{
image = Image::null;
image = Image();
gradient = new ColourGradient (newGradient);
colour = Colours::black;
}

View file

@ -47,7 +47,7 @@ public:
return item->image;
}
return Image::null;
return Image();
}
void addImageToCache (const Image& image, const int64 hashCode)
@ -128,7 +128,7 @@ Image ImageCache::getFromHashCode (const int64 hashCode)
if (Pimpl::getInstanceWithoutCreating() != nullptr)
return Pimpl::getInstanceWithoutCreating()->getFromHashCode (hashCode);
return Image::null;
return Image();
}
void ImageCache::addImageToCache (const Image& image, const int64 hashCode)

View file

@ -863,7 +863,7 @@ Image juce_loadWithCoreImage (InputStream& input)
}
}
return Image::null;
return Image();
}
#endif

View file

@ -153,7 +153,7 @@ public:
file = newFile;
fileSize = newFileSize;
modTime = newModTime;
icon = Image::null;
icon = Image();
isDirectory = fileInfo != nullptr && fileInfo->isDirectory;
repaint();

View file

@ -57,7 +57,7 @@ void ImagePreviewComponent::timerCallback()
{
stopTimer();
currentThumbnail = Image::null;
currentThumbnail = Image();
currentDetails.clear();
repaint();

View file

@ -86,7 +86,7 @@ public:
*/
void startDragging (const var& sourceDescription,
Component* sourceComponent,
Image dragImage = Image::null,
Image dragImage = Image(),
bool allowDraggingToOtherJuceWindows = false,
const Point<int>* imageOffsetFromMouse = nullptr);

View file

@ -351,7 +351,7 @@ bool juce_areThereAnyAlwaysOnTopWindows()
//==============================================================================
Image juce_createIconForFile (const File&)
{
return Image::null;
return Image();
}
//==============================================================================

View file

@ -2568,7 +2568,7 @@ private:
else if (Time::getApproximateMillisecondCounter() > lastTimeImageUsed + 3000)
{
stopTimer();
image = Image::null;
image = Image();
}
}
@ -4080,7 +4080,7 @@ void MouseCursor::showInAllWindows() const
//==============================================================================
Image juce_createIconForFile (const File& /* file */)
{
return Image::null;
return Image();
}
//==============================================================================

View file

@ -531,7 +531,7 @@ namespace IconConverters
}
}
return Image::null;
return Image();
}
HICON createHICONFromImage (const Image& image, const BOOL isIcon, int hotspotX, int hotspotY)
@ -1186,7 +1186,7 @@ private:
void timerCallback() override
{
stopTimer();
image = Image::null;
image = Image();
}
private:

View file

@ -70,7 +70,7 @@ public:
if (DragAndDropContainer* const dnd = DragAndDropContainer::findParentDragContainerFor (this))
{
dnd->startDragging (Toolbar::toolbarDragDescriptor, getParentComponent(), Image::null, true);
dnd->startDragging (Toolbar::toolbarDragDescriptor, getParentComponent(), Image(), true);
if (ToolbarItemComponent* const tc = getToolbarItemComponent())
{

View file

@ -230,7 +230,7 @@ void CallOutBox::updatePosition (const Rectangle<int>& newAreaToPointTo, const R
void CallOutBox::refreshPath()
{
repaint();
background = Image::null;
background = Image();
outline.clear();
const float gap = 4.5f;

View file

@ -125,7 +125,7 @@ public:
if (lastHue != h)
{
lastHue = h;
colours = Image::null;
colours = Image();
repaint();
}
@ -134,7 +134,7 @@ public:
void resized() override
{
colours = Image::null;
colours = Image();
updateMarker();
}