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
96cdea53
Kaydet (Commit)
96cdea53
authored
Nis 14, 2014
tarafından
Chris Sherlock
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Reorganize locations of functions in gradient.cxx
Change-Id: Ibce763ab4397c4ca4ebce0b25322c249f36499e2
üst
96d5e016
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
42 additions
and
42 deletions
+42
-42
gradient.cxx
vcl/source/gdi/outdev/gradient.cxx
+42
-42
No files found.
vcl/source/gdi/outdev/gradient.cxx
Dosyayı görüntüle @
96cdea53
...
...
@@ -177,48 +177,6 @@ void OutputDevice::DrawGradient( const PolyPolygon& rPolyPoly,
mpAlphaVDev
->
DrawPolyPolygon
(
rPolyPoly
);
}
inline
sal_uInt8
ImplGetGradientColorValue
(
long
nValue
)
{
if
(
nValue
<
0
)
return
0
;
else
if
(
nValue
>
0xFF
)
return
0xFF
;
else
return
(
sal_uInt8
)
nValue
;
}
long
OutputDevice
::
ImplGetGradientStepCount
(
long
nMinRect
)
{
long
nInc
=
(
nMinRect
<
50
)
?
2
:
4
;
return
nInc
;
}
long
OutputDevice
::
ImplGetGradientSteps
(
const
Gradient
&
rGradient
,
const
Rectangle
&
rRect
,
bool
bMtf
,
bool
bComplex
)
{
// calculate step count
long
nStepCount
=
rGradient
.
GetSteps
();
long
nMinRect
;
// generate nStepCount, if not passed
if
(
bComplex
)
nMinRect
=
std
::
min
(
rRect
.
GetWidth
(),
rRect
.
GetHeight
()
);
else
nMinRect
=
rRect
.
GetHeight
();
if
(
!
nStepCount
)
{
long
nInc
;
nInc
=
ImplGetGradientStepCount
(
nMinRect
);
if
(
!
nInc
||
bMtf
)
nInc
=
1
;
nStepCount
=
nMinRect
/
nInc
;
}
return
nStepCount
;
}
void
OutputDevice
::
ImplDrawLinearGradient
(
const
Rectangle
&
rRect
,
const
Gradient
&
rGradient
,
bool
bMtf
,
const
PolyPolygon
*
pClipPolyPoly
)
...
...
@@ -598,6 +556,48 @@ void OutputDevice::ImplDrawComplexGradient( const Rectangle& rRect,
}
}
inline
sal_uInt8
ImplGetGradientColorValue
(
long
nValue
)
{
if
(
nValue
<
0
)
return
0
;
else
if
(
nValue
>
0xFF
)
return
0xFF
;
else
return
(
sal_uInt8
)
nValue
;
}
long
OutputDevice
::
ImplGetGradientStepCount
(
long
nMinRect
)
{
long
nInc
=
(
nMinRect
<
50
)
?
2
:
4
;
return
nInc
;
}
long
OutputDevice
::
ImplGetGradientSteps
(
const
Gradient
&
rGradient
,
const
Rectangle
&
rRect
,
bool
bMtf
,
bool
bComplex
)
{
// calculate step count
long
nStepCount
=
rGradient
.
GetSteps
();
long
nMinRect
;
// generate nStepCount, if not passed
if
(
bComplex
)
nMinRect
=
std
::
min
(
rRect
.
GetWidth
(),
rRect
.
GetHeight
()
);
else
nMinRect
=
rRect
.
GetHeight
();
if
(
!
nStepCount
)
{
long
nInc
;
nInc
=
ImplGetGradientStepCount
(
nMinRect
);
if
(
!
nInc
||
bMtf
)
nInc
=
1
;
nStepCount
=
nMinRect
/
nInc
;
}
return
nStepCount
;
}
Color
OutputDevice
::
GetSingleColorGradientFill
()
{
Color
aColor
;
...
...
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