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
bd2f6ab5
Kaydet (Commit)
bd2f6ab5
authored
Eki 15, 2015
tarafından
Stephan Bergmann
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Reuse FRound from tools/helpers.hxx
Change-Id: I74ec4fc6a685c59dbc79978bf8a9afff0a1f9501
üst
7b3e0aa8
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
9 deletions
+4
-9
color.cxx
tools/source/generic/color.cxx
+4
-9
No files found.
tools/source/generic/color.cxx
Dosyayı görüntüle @
bd2f6ab5
...
@@ -32,11 +32,6 @@
...
@@ -32,11 +32,6 @@
#include <tools/helpers.hxx>
#include <tools/helpers.hxx>
#include <basegfx/color/bcolortools.hxx>
#include <basegfx/color/bcolortools.hxx>
static
inline
long
_FRound
(
double
fVal
)
{
return
(
fVal
>
0.0
?
(
long
)
(
fVal
+
0.5
)
:
-
(
long
)
(
-
fVal
+
0.5
)
);
}
Color
::
Color
(
const
ResId
&
rResId
)
Color
::
Color
(
const
ResId
&
rResId
)
{
{
rResId
.
SetRT
(
RSC_COLOR
);
rResId
.
SetRT
(
RSC_COLOR
);
...
@@ -68,7 +63,7 @@ sal_uInt8 Color::GetColorError( const Color& rCompareColor ) const
...
@@ -68,7 +63,7 @@ sal_uInt8 Color::GetColorError( const Color& rCompareColor ) const
labs
(
(
long
)
rCompareColor
.
GetGreen
()
-
GetGreen
()
)
+
labs
(
(
long
)
rCompareColor
.
GetGreen
()
-
GetGreen
()
)
+
labs
(
(
long
)
rCompareColor
.
GetBlue
()
-
GetBlue
()
);
labs
(
(
long
)
rCompareColor
.
GetBlue
()
-
GetBlue
()
);
return
(
sal_uInt8
)
_
FRound
(
nErrAbs
*
0.3333333333
);
return
(
sal_uInt8
)
FRound
(
nErrAbs
*
0.3333333333
);
}
}
void
Color
::
IncreaseLuminance
(
sal_uInt8
cLumInc
)
void
Color
::
IncreaseLuminance
(
sal_uInt8
cLumInc
)
...
@@ -92,9 +87,9 @@ void Color::DecreaseContrast( sal_uInt8 cContDec )
...
@@ -92,9 +87,9 @@ void Color::DecreaseContrast( sal_uInt8 cContDec )
const
double
fM
=
(
128.0
-
0.4985
*
cContDec
)
/
128.0
;
const
double
fM
=
(
128.0
-
0.4985
*
cContDec
)
/
128.0
;
const
double
fOff
=
128.0
-
fM
*
128.0
;
const
double
fOff
=
128.0
-
fM
*
128.0
;
SetRed
(
(
sal_uInt8
)
SAL_BOUND
(
_
FRound
(
COLORDATA_RED
(
mnColor
)
*
fM
+
fOff
),
0L
,
255L
)
);
SetRed
(
(
sal_uInt8
)
SAL_BOUND
(
FRound
(
COLORDATA_RED
(
mnColor
)
*
fM
+
fOff
),
0L
,
255L
)
);
SetGreen
(
(
sal_uInt8
)
SAL_BOUND
(
_
FRound
(
COLORDATA_GREEN
(
mnColor
)
*
fM
+
fOff
),
0L
,
255L
)
);
SetGreen
(
(
sal_uInt8
)
SAL_BOUND
(
FRound
(
COLORDATA_GREEN
(
mnColor
)
*
fM
+
fOff
),
0L
,
255L
)
);
SetBlue
(
(
sal_uInt8
)
SAL_BOUND
(
_
FRound
(
COLORDATA_BLUE
(
mnColor
)
*
fM
+
fOff
),
0L
,
255L
)
);
SetBlue
(
(
sal_uInt8
)
SAL_BOUND
(
FRound
(
COLORDATA_BLUE
(
mnColor
)
*
fM
+
fOff
),
0L
,
255L
)
);
}
}
}
}
...
...
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