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
04937a61
Kaydet (Commit)
04937a61
authored
Nis 19, 2014
tarafından
Chris Sherlock
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
vcl/source/outdev/blend.cxx - indent function in anonymous namespace
Change-Id: I0a82c500b06531ecce35984d7dc588bb9f7dbd04
üst
eef0dd74
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
24 deletions
+24
-24
blend.cxx
vcl/source/outdev/blend.cxx
+24
-24
No files found.
vcl/source/outdev/blend.cxx
Dosyayı görüntüle @
04937a61
...
...
@@ -52,35 +52,35 @@ namespace
return
sal_uInt8
(
c
);
}
inline
BitmapColor
lcl_AlphaBlend
(
int
nX
,
int
nY
,
const
long
nMapX
,
const
long
nMapY
,
BitmapReadAccess
*
pP
,
BitmapReadAccess
*
pA
,
BitmapReadAccess
*
pB
,
BitmapWriteAccess
*
pAlphaW
,
sal_uInt8
&
nResAlpha
)
{
BitmapColor
aDstCol
,
aSrcCol
;
aSrcCol
=
pP
->
GetColor
(
nMapY
,
nMapX
);
aDstCol
=
pB
->
GetColor
(
nY
,
nX
);
inline
BitmapColor
lcl_AlphaBlend
(
int
nX
,
int
nY
,
const
long
nMapX
,
const
long
nMapY
,
BitmapReadAccess
*
pP
,
BitmapReadAccess
*
pA
,
BitmapReadAccess
*
pB
,
BitmapWriteAccess
*
pAlphaW
,
sal_uInt8
&
nResAlpha
)
{
BitmapColor
aDstCol
,
aSrcCol
;
aSrcCol
=
pP
->
GetColor
(
nMapY
,
nMapX
);
aDstCol
=
pB
->
GetColor
(
nY
,
nX
);
// vcl stores transparency, not alpha - invert it
const
sal_uInt8
nSrcAlpha
=
255
-
pA
->
GetPixelIndex
(
nMapY
,
nMapX
);
const
sal_uInt8
nDstAlpha
=
255
-
pAlphaW
->
GetPixelIndex
(
nY
,
nX
);
// vcl stores transparency, not alpha - invert it
const
sal_uInt8
nSrcAlpha
=
255
-
pA
->
GetPixelIndex
(
nMapY
,
nMapX
);
const
sal_uInt8
nDstAlpha
=
255
-
pAlphaW
->
GetPixelIndex
(
nY
,
nX
);
// Perform porter-duff compositing 'over' operation
// Perform porter-duff compositing 'over' operation
// Co = Cs + Cd*(1-As)
// Ad = As + Ad*(1-As)
nResAlpha
=
(
int
)
nSrcAlpha
+
(
int
)
nDstAlpha
-
(
int
)
nDstAlpha
*
nSrcAlpha
/
255
;
// Co = Cs + Cd*(1-As)
// Ad = As + Ad*(1-As)
nResAlpha
=
(
int
)
nSrcAlpha
+
(
int
)
nDstAlpha
-
(
int
)
nDstAlpha
*
nSrcAlpha
/
255
;
aDstCol
.
SetRed
(
lcl_calcColor
(
aSrcCol
.
GetRed
(),
nSrcAlpha
,
nDstAlpha
,
nResAlpha
,
aDstCol
.
GetRed
()
)
);
aDstCol
.
SetBlue
(
lcl_calcColor
(
aSrcCol
.
GetBlue
(),
nSrcAlpha
,
nDstAlpha
,
nResAlpha
,
aDstCol
.
GetBlue
()
)
);
aDstCol
.
SetGreen
(
lcl_calcColor
(
aSrcCol
.
GetGreen
(),
nSrcAlpha
,
nDstAlpha
,
nResAlpha
,
aDstCol
.
GetGreen
()
)
);
aDstCol
.
SetRed
(
lcl_calcColor
(
aSrcCol
.
GetRed
(),
nSrcAlpha
,
nDstAlpha
,
nResAlpha
,
aDstCol
.
GetRed
()
)
);
aDstCol
.
SetBlue
(
lcl_calcColor
(
aSrcCol
.
GetBlue
(),
nSrcAlpha
,
nDstAlpha
,
nResAlpha
,
aDstCol
.
GetBlue
()
)
);
aDstCol
.
SetGreen
(
lcl_calcColor
(
aSrcCol
.
GetGreen
(),
nSrcAlpha
,
nDstAlpha
,
nResAlpha
,
aDstCol
.
GetGreen
()
)
);
return
aDstCol
;
}
return
aDstCol
;
}
}
Bitmap
OutputDevice
::
ImplBlendWithAlpha
(
Bitmap
aBmp
,
...
...
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