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
a70d6e73
Kaydet (Commit)
a70d6e73
authored
Eki 14, 2014
tarafından
Michael Meeks
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
vcl: create a ScaleContext to share copy/paste Bitmap scaling code.
Change-Id: I5a90b7c6065829d74c61b833f0551b8adc3f2711
üst
6786f4b5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
31 additions
and
2 deletions
+31
-2
bitmapscalesuper.cxx
vcl/source/bitmap/bitmapscalesuper.cxx
+31
-2
No files found.
vcl/source/bitmap/bitmapscalesuper.cxx
Dosyayı görüntüle @
a70d6e73
...
@@ -42,6 +42,35 @@ void generateMap(long nW, long nDstW, bool bHMirr, long* pMapIX, long* pMapFX)
...
@@ -42,6 +42,35 @@ void generateMap(long nW, long nDstW, bool bHMirr, long* pMapIX, long* pMapFX)
}
}
}
}
struct
ScaleContext
{
BitmapReadAccess
*
mpSrc
;
// was pAcc
BitmapWriteAccess
*
mpDest
;
// was pWAcc
long
mnSrcW
,
mnDestW
;
long
mnSrcH
,
mnDestH
;
bool
mbHMirr
,
mbVMirr
;
boost
::
scoped_array
<
long
>
mpMapIX
;
boost
::
scoped_array
<
long
>
mpMapIY
;
boost
::
scoped_array
<
long
>
mpMapFX
;
boost
::
scoped_array
<
long
>
mpMapFY
;
ScaleContext
(
BitmapReadAccess
*
pSrc
,
BitmapWriteAccess
*
pDest
,
long
nSrcW
,
long
nDestW
,
long
nSrcH
,
long
nDestH
,
bool
bHMirr
,
bool
bVMirr
)
:
mpSrc
(
pSrc
),
mpDest
(
pDest
)
,
mnSrcW
(
nSrcW
),
mnDestW
(
nDestH
)
,
mnSrcH
(
nSrcH
),
mnDestH
(
nDestH
)
,
mbHMirr
(
bHMirr
),
mbVMirr
(
bVMirr
)
,
mpMapIX
(
new
long
[
nDestW
]
)
,
mpMapIY
(
new
long
[
nDestH
]
)
,
mpMapFX
(
new
long
[
nDestW
]
)
,
mpMapFY
(
new
long
[
nDestH
]
)
{
generateMap
(
nSrcW
,
nDestW
,
bHMirr
,
mpMapIX
.
get
(),
mpMapFX
.
get
());
generateMap
(
nSrcH
,
nDestH
,
bVMirr
,
mpMapIY
.
get
(),
mpMapFY
.
get
());
}
};
void
scalePallete8bit
(
BitmapReadAccess
*
pAcc
,
BitmapWriteAccess
*
pWAcc
,
void
scalePallete8bit
(
BitmapReadAccess
*
pAcc
,
BitmapWriteAccess
*
pWAcc
,
long
nStartX
,
long
nEndX
,
long
nStartY
,
long
nEndY
,
long
nStartX
,
long
nEndX
,
long
nStartY
,
long
nEndY
,
bool
bVMirr
,
bool
bHMirr
)
bool
bVMirr
,
bool
bHMirr
)
...
@@ -799,8 +828,8 @@ void scale24bitRGB2(BitmapReadAccess* pAcc, BitmapWriteAccess* pWAcc,
...
@@ -799,8 +828,8 @@ void scale24bitRGB2(BitmapReadAccess* pAcc, BitmapWriteAccess* pWAcc,
}
}
void
scaleNonPalleteGeneral2
(
BitmapReadAccess
*
pAcc
,
BitmapWriteAccess
*
pWAcc
,
void
scaleNonPalleteGeneral2
(
BitmapReadAccess
*
pAcc
,
BitmapWriteAccess
*
pWAcc
,
long
nStartX
,
long
nEndX
,
long
nStartY
,
long
nEndY
,
long
nStartX
,
long
nEndX
,
long
nStartY
,
long
nEndY
,
bool
bVMirr
,
bool
bHMirr
)
bool
bVMirr
,
bool
bHMirr
)
{
{
boost
::
scoped_array
<
long
>
pMapIX
(
new
long
[
pWAcc
->
Width
()]);
boost
::
scoped_array
<
long
>
pMapIX
(
new
long
[
pWAcc
->
Width
()]);
boost
::
scoped_array
<
long
>
pMapIY
(
new
long
[
pWAcc
->
Height
()]);
boost
::
scoped_array
<
long
>
pMapIY
(
new
long
[
pWAcc
->
Height
()]);
...
...
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