drawImageWithin parameters const


#1

I just updated to the tip you just posted and there’s a definition mismatch in juce_GraphicsContext

Definition:

void drawImageWithin (const Image& imageToDraw,
                      int destX, int destY, int destWidth, int destHeight,
                      const RectanglePlacement& placementWithinTarget,
                      bool fillAlphaChannelWithCurrentBrush = false) const;

Implementation:

void Graphics::drawImageWithin (const Image& imageToDraw,
                                const int destX, const int destY,
                                const int destW, const int destH,
                                RectanglePlacement placementWithinTarget,
                                const bool fillAlphaChannelWithCurrentBrush) const

Rail


#2

No… That’s not what the code looks like - I think you must have some garbled versions there.


#3

You sure… seems to match the git:

http://sourceforge.net/p/juce/code/ci/master/tree/modules/juce_graphics/contexts/juce_GraphicsContext.cpp

void Graphics::drawImageWithin (const Image& imageToDraw,
                                const int destX, const int destY,
                                const int destW, const int destH,
                                RectanglePlacement placementWithinTarget,
                                const bool fillAlphaChannelWithCurrentBrush) const

http://sourceforge.net/p/juce/code/ci/master/tree/modules/juce_graphics/contexts/juce_GraphicsContext.h

void drawImageWithin (const Image& imageToDraw,
                          int destX, int destY, int destWidth, int destHeight,
                          RectanglePlacement placementWithinTarget,
                          bool fillAlphaChannelWithCurrentBrush = false) const;

Will pull the latest tip again and check…

Rail


#4

Those versions aren’t the same as your original post, and are perfectly legal c++!


#5

Yep, regrabbing the tip (again) is fine… my tired eyes didn’t see the &

Rail