Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
core
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
LibreOffice
core
Commits
4be8cc07
Kaydet (Commit)
4be8cc07
authored
Kas 12, 2012
tarafından
Armin Le Grand
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Added ColorDepth change test with assertion to the Bitmap::Scale method
üst
61e12761
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
12 deletions
+21
-12
bitmap3.cxx
vcl/source/gdi/bitmap3.cxx
+21
-12
No files found.
vcl/source/gdi/bitmap3.cxx
Dosyayı görüntüle @
4be8cc07
...
...
@@ -906,10 +906,13 @@ sal_Bool Bitmap::ImplConvertGhosted()
sal_Bool
Bitmap
::
Scale
(
const
double
&
rScaleX
,
const
double
&
rScaleY
,
sal_uLong
nScaleFlag
)
{
bool
bRetval
(
false
);
#ifdef DBG_UTIL
// #121233# allow to test the different scalers in debug build with source
// level debugger (change nNumber to desired action)
static
sal_uInt16
nNumber
(
0
);
const
sal_uInt16
nStartCount
(
GetBitCount
());
switch
(
nNumber
)
{
...
...
@@ -929,7 +932,7 @@ sal_Bool Bitmap::Scale( const double& rScaleX, const double& rScaleY, sal_uLong
if
(
basegfx
::
fTools
::
equalZero
(
rScaleX
)
&&
basegfx
::
fTools
::
equalZero
(
rScaleY
))
{
// no scale
return
true
;
bRetval
=
true
;
}
else
{
...
...
@@ -949,17 +952,17 @@ sal_Bool Bitmap::Scale( const double& rScaleX, const double& rScaleY, sal_uLong
default
:
case
BMP_SCALE_NONE
:
{
return
false
;
bRetval
=
false
;
break
;
}
case
BMP_SCALE_FAST
:
{
return
ImplScaleFast
(
rScaleX
,
rScaleY
);
bRetval
=
ImplScaleFast
(
rScaleX
,
rScaleY
);
break
;
}
case
BMP_SCALE_INTERPOLATE
:
{
return
ImplScaleInterpolate
(
rScaleX
,
rScaleY
);
bRetval
=
ImplScaleInterpolate
(
rScaleX
,
rScaleY
);
break
;
}
case
BMP_SCALE_SUPER
:
...
...
@@ -967,12 +970,12 @@ sal_Bool Bitmap::Scale( const double& rScaleX, const double& rScaleY, sal_uLong
if
(
GetSizePixel
().
Width
()
<
2
||
GetSizePixel
().
Height
()
<
2
)
{
// fallback to ImplScaleFast
return
ImplScaleFast
(
rScaleX
,
rScaleY
);
bRetval
=
ImplScaleFast
(
rScaleX
,
rScaleY
);
}
else
{
// #121233# use method from symphony
return
ImplScaleSuper
(
rScaleX
,
rScaleY
);
bRetval
=
ImplScaleSuper
(
rScaleX
,
rScaleY
);
}
break
;
}
...
...
@@ -980,35 +983,41 @@ sal_Bool Bitmap::Scale( const double& rScaleX, const double& rScaleY, sal_uLong
{
const
Lanczos3Kernel
kernel
;
return
ImplScaleConvolution
(
rScaleX
,
rScaleY
,
kernel
);
bRetval
=
ImplScaleConvolution
(
rScaleX
,
rScaleY
,
kernel
);
break
;
}
case
BMP_SCALE_BICUBIC
:
{
const
BicubicKernel
kernel
;
return
ImplScaleConvolution
(
rScaleX
,
rScaleY
,
kernel
);
bRetval
=
ImplScaleConvolution
(
rScaleX
,
rScaleY
,
kernel
);
break
;
}
case
BMP_SCALE_BILINEAR
:
{
const
BilinearKernel
kernel
;
return
ImplScaleConvolution
(
rScaleX
,
rScaleY
,
kernel
);
bRetval
=
ImplScaleConvolution
(
rScaleX
,
rScaleY
,
kernel
);
break
;
}
case
BMP_SCALE_BOX
:
{
const
BoxKernel
kernel
;
return
ImplScaleConvolution
(
rScaleX
,
rScaleY
,
kernel
);
bRetval
=
ImplScaleConvolution
(
rScaleX
,
rScaleY
,
kernel
);
break
;
}
}
}
// should not happen
return
false
;
#ifdef DBG_UTIL
if
(
bRetval
&&
nStartCount
!=
GetBitCount
())
{
OSL_ENSURE
(
false
,
"Bitmap::Scale has changed the ColorDepth, this should *not* happen (!)"
);
}
#endif
return
bRetval
;
}
// ------------------------------------------------------------------------
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment