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
8ed148f6
Kaydet (Commit)
8ed148f6
authored
Mar 28, 2011
tarafından
Caolán McNamara
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Resolves: fdo#33455 implement rendering of 1bit pngs palette colors
üst
7be23017
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
41 additions
and
4 deletions
+41
-4
salgdi2.cxx
vcl/unx/source/gdi/salgdi2.cxx
+17
-1
makefile.mk
vcl/win/source/gdi/makefile.mk
+2
-1
salgdi2.cxx
vcl/win/source/gdi/salgdi2.cxx
+22
-2
No files found.
vcl/unx/source/gdi/salgdi2.cxx
Dosyayı görüntüle @
8ed148f6
...
@@ -44,6 +44,7 @@
...
@@ -44,6 +44,7 @@
#include "vcl/salbtype.hxx"
#include "vcl/salbtype.hxx"
#include "vcl/printergfx.hxx"
#include "vcl/printergfx.hxx"
#include "vcl/bmpacc.hxx"
#include "vcl/bmpacc.hxx"
#include "vcl/outdata.hxx"
#undef SALGDI2_TESTTRANS
#undef SALGDI2_TESTTRANS
...
@@ -627,7 +628,22 @@ void X11SalGraphics::drawBitmap( const SalTwoRect* pPosAry, const SalBitmap& rSa
...
@@ -627,7 +628,22 @@ void X11SalGraphics::drawBitmap( const SalTwoRect* pPosAry, const SalBitmap& rSa
{
{
// set foreground/background values for 1Bit bitmaps
// set foreground/background values for 1Bit bitmaps
XGetGCValues
(
pXDisp
,
aGC
,
nValues
,
&
aOldVal
);
XGetGCValues
(
pXDisp
,
aGC
,
nValues
,
&
aOldVal
);
aNewVal
.
foreground
=
rColMap
.
GetWhitePixel
(),
aNewVal
.
background
=
rColMap
.
GetBlackPixel
();
aNewVal
.
foreground
=
rColMap
.
GetWhitePixel
();
aNewVal
.
background
=
rColMap
.
GetBlackPixel
();
//fdo#33455 handle 1 bit depth pngs with palette entries
//to set fore/back colors
if
(
const
BitmapBuffer
*
pBitmapBuffer
=
const_cast
<
SalBitmap
&>
(
rSalBitmap
).
AcquireBuffer
(
true
))
{
const
BitmapPalette
&
rPalette
=
pBitmapBuffer
->
maPalette
;
if
(
rPalette
.
GetEntryCount
()
==
2
)
{
aNewVal
.
foreground
=
rColMap
.
GetPixel
(
ImplColorToSal
(
rPalette
[
0
]));
aNewVal
.
background
=
rColMap
.
GetPixel
(
ImplColorToSal
(
rPalette
[
1
]));
}
}
XChangeGC
(
pXDisp
,
aGC
,
nValues
,
&
aNewVal
);
XChangeGC
(
pXDisp
,
aGC
,
nValues
,
&
aNewVal
);
}
}
...
...
vcl/win/source/gdi/makefile.mk
Dosyayı görüntüle @
8ed148f6
...
@@ -58,7 +58,8 @@ SLOFILES= $(SLO)$/salgdi.obj \
...
@@ -58,7 +58,8 @@ SLOFILES= $(SLO)$/salgdi.obj \
$(SLO)$/
salnativewidgets-luna.obj
$(SLO)$/
salnativewidgets-luna.obj
EXCEPTIONSFILES
=
$(SLO)$/
salprn.obj
EXCEPTIONSFILES
=
$(SLO)$/
salprn.obj
\
$(SLO)$/
salgdi2.obj
.IF
"$(ENABLE_GRAPHITE)"
==
"TRUE"
.IF
"$(ENABLE_GRAPHITE)"
==
"TRUE"
CFLAGS
+=
-DENABLE_GRAPHITE
CFLAGS
+=
-DENABLE_GRAPHITE
...
...
vcl/win/source/gdi/salgdi2.cxx
Dosyayı görüntüle @
8ed148f6
...
@@ -40,6 +40,10 @@
...
@@ -40,6 +40,10 @@
#include <salgdi.h>
#include <salgdi.h>
#include <salframe.h>
#include <salframe.h>
#include "vcl/salbtype.hxx"
#include "vcl/bmpacc.hxx"
#include "vcl/outdata.hxx"
bool
WinSalGraphics
::
supportsOperation
(
OutDevSupportType
eType
)
const
bool
WinSalGraphics
::
supportsOperation
(
OutDevSupportType
eType
)
const
{
{
static
bool
bAllowForTest
(
true
);
static
bool
bAllowForTest
(
true
);
...
@@ -391,8 +395,24 @@ void ImplDrawBitmap( HDC hDC,
...
@@ -391,8 +395,24 @@ void ImplDrawBitmap( HDC hDC,
if
(
bMono
)
if
(
bMono
)
{
{
nOldBkColor
=
SetBkColor
(
hDC
,
RGB
(
0xFF
,
0xFF
,
0xFF
)
);
COLORREF
nBkColor
=
RGB
(
0xFF
,
0xFF
,
0xFF
);
nOldTextColor
=
::
SetTextColor
(
hDC
,
RGB
(
0x00
,
0x00
,
0x00
)
);
COLORREF
nTextColor
=
RGB
(
0x00
,
0x00
,
0x00
);
//fdo#33455 handle 1 bit depth pngs with palette entries
//to set fore/back colors
if
(
const
BitmapBuffer
*
pBitmapBuffer
=
const_cast
<
WinSalBitmap
&>
(
rSalBitmap
).
AcquireBuffer
(
true
))
{
const
BitmapPalette
&
rPalette
=
pBitmapBuffer
->
maPalette
;
if
(
rPalette
.
GetEntryCount
()
==
2
)
{
SalColor
nCol
;
nCol
=
ImplColorToSal
(
rPalette
[
0
]);
nTextColor
=
RGB
(
SALCOLOR_RED
(
nCol
),
SALCOLOR_GREEN
(
nCol
),
SALCOLOR_BLUE
(
nCol
)
);
nCol
=
ImplColorToSal
(
rPalette
[
1
]);
nBkColor
=
RGB
(
SALCOLOR_RED
(
nCol
),
SALCOLOR_GREEN
(
nCol
),
SALCOLOR_BLUE
(
nCol
)
);
}
}
nOldBkColor
=
SetBkColor
(
hDC
,
nBkColor
);
nOldTextColor
=
::
SetTextColor
(
hDC
,
nTextColor
);
}
}
if
(
(
pPosAry
->
mnSrcWidth
==
pPosAry
->
mnDestWidth
)
&&
if
(
(
pPosAry
->
mnSrcWidth
==
pPosAry
->
mnDestWidth
)
&&
...
...
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