Kaydet (Commit) d3b0f6bc authored tarafından Caolán McNamara's avatar Caolán McNamara

always copying to a different bitmap

Change-Id: I90b205bef1b01e6c4c43788fc5c95391b7842e83
üst 1c217968
......@@ -104,10 +104,6 @@ void scaleLine( SourceIter s_begin,
@param d_acc
Destination accessor
@param bMustCopy
When true, scaleImage always copies source, even when doing 1:1
copy
*/
template< class SourceIter, class SourceAcc,
class DestIter, class DestAcc >
......@@ -116,8 +112,7 @@ void scaleImage( SourceIter s_begin,
SourceAcc s_acc,
DestIter d_begin,
DestIter d_end,
DestAcc d_acc,
bool bMustCopy=false )
DestAcc d_acc )
{
const int src_width ( s_end.x - s_begin.x );
const int src_height( s_end.y - s_begin.y );
......@@ -125,9 +120,8 @@ void scaleImage( SourceIter s_begin,
const int dest_width ( d_end.x - d_begin.x );
const int dest_height( d_end.y - d_begin.y );
if( !bMustCopy &&
src_width == dest_width &&
src_height == dest_height )
if ( src_width == dest_width &&
src_height == dest_height )
{
// no scaling involved, can simply copy
vigra::copyImage( s_begin, s_end, s_acc,
......@@ -166,20 +160,14 @@ void scaleImage( SourceIter s_begin,
}
/** Scale an image, range tuple version
@param bMustCopy
When true, scaleImage always copies source, even when doing 1:1
copy
*/
template< class SourceIter, class SourceAcc,
class DestIter, class DestAcc >
inline void scaleImage( vigra::triple<SourceIter,SourceIter,SourceAcc> const& src,
vigra::triple<DestIter,DestIter,DestAcc> const& dst,
bool bMustCopy=false )
vigra::triple<DestIter,DestIter,DestAcc> const& dst )
{
scaleImage(src.first,src.second,src.third,
dst.first,dst.second,dst.third,
bMustCopy);
dst.first,dst.second,dst.third);
}
}
......
......@@ -248,8 +248,7 @@ namespace
aRect),
destIterRange(begin,
acc,
aRect),
isSharedBuffer(rSrcBitmap) );
aRect));
}
template< typename Iterator, typename Acc > static
......@@ -425,11 +424,6 @@ PaletteMemorySharedVector BitmapDevice::getPalette() const
return mpImpl->mpPalette;
}
bool BitmapDevice::isSharedBuffer( const BitmapDeviceSharedPtr& rOther ) const
{
return rOther.get()->getBuffer().get() == getBuffer().get();
}
Color BitmapDevice::getPixel( const basegfx::B2IPoint& rPt )
{
if( mpImpl->maBounds.isInside(rPt) )
......
......@@ -100,9 +100,6 @@ public:
*/
PaletteMemorySharedVector getPalette() const;
/// Check if this and the other BitmapDevice share a buffer
bool isSharedBuffer( const BitmapDeviceSharedPtr& rOther ) const;
/** Get color value at given pixel
*/
Color getPixel( const basegfx::B2IPoint& rPt );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment