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
f04ad946
Kaydet (Commit)
f04ad946
authored
Ock 13, 2014
tarafından
Markus Mohrhard
Kaydeden (comit)
Markus Mohrhard
Ock 29, 2014
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
no need for the bitmap header, we ignore it anyway in the next stage
Change-Id: I007434264bd5649c55d195d30c5447704f930fe0
üst
7bff5d99
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
5 deletions
+3
-5
OpenGLRender.cxx
chart2/source/view/main/OpenGLRender.cxx
+3
-5
No files found.
chart2/source/view/main/OpenGLRender.cxx
Dosyayı görüntüle @
f04ad946
...
...
@@ -1474,9 +1474,7 @@ int OpenGLRender::CreateTextTexture(::rtl::OUString textValue, sal_uInt32 color,
BitmapEx
aBitmapEx
(
aDevice
.
GetBitmap
(
aRect
.
TopLeft
(),
Size
(
bmpWidth
,
bmpHeight
)));
Bitmap
aBitmap
(
aBitmapEx
.
GetBitmap
());
int
bitmapsize
=
aBitmap
.
GetSizeBytes
();
boost
::
scoped_array
<
sal_uInt8
>
bitmapBuf
(
new
sal_uInt8
[
bitmapsize
*
4
/
3
+
BMP_HEADER_LEN
]);
//TODO:moggi: why do we need the BMP header?
CreateBMPHeaderRGBA
(
bitmapBuf
.
get
(),
bmpWidth
,
bmpHeight
);
boost
::
scoped_array
<
sal_uInt8
>
bitmapBuf
(
new
sal_uInt8
[
bitmapsize
*
4
/
3
]);
BitmapReadAccess
*
pRAcc
=
aBitmap
.
AcquireReadAccess
();
sal_uInt8
red
=
(
color
&
0x00FF0000
)
>>
16
;
sal_uInt8
g
=
(
color
&
0x0000FF00
)
>>
8
;
...
...
@@ -1488,7 +1486,7 @@ int OpenGLRender::CreateTextTexture(::rtl::OUString textValue, sal_uInt32 color,
for
(
long
nx
=
0
;
nx
<
bmpWidth
;
nx
++
)
{
sal_uInt8
*
pm
=
pRAcc
->
GetScanline
(
ny
)
+
nx
*
3
;
sal_uInt8
*
mk
=
bitmapBuf
.
get
()
+
BMP_HEADER_LEN
+
ny
*
bmpWidth
*
4
+
nx
*
4
;
sal_uInt8
*
mk
=
bitmapBuf
.
get
()
+
ny
*
bmpWidth
*
4
+
nx
*
4
;
if
((
*
pm
==
0xFF
)
&&
(
*
(
pm
+
1
)
==
0xFF
)
&&
(
*
(
pm
+
2
)
==
0xFF
))
{
*
mk
=
*
pm
;
...
...
@@ -1553,7 +1551,7 @@ int OpenGLRender::CreateTextTexture(::rtl::OUString textValue, sal_uInt32 color,
CHECK_GL_ERROR
();
glTexParameteri
(
GL_TEXTURE_2D
,
GL_TEXTURE_MAG_FILTER
,
GL_NEAREST
);
CHECK_GL_ERROR
();
glTexImage2D
(
GL_TEXTURE_2D
,
0
,
GL_RGBA
,
bmpWidth
,
bmpHeight
,
0
,
GL_BGRA
,
GL_UNSIGNED_BYTE
,
bitmapBuf
.
get
()
+
BMP_HEADER_LEN
);
glTexImage2D
(
GL_TEXTURE_2D
,
0
,
GL_RGBA
,
bmpWidth
,
bmpHeight
,
0
,
GL_BGRA
,
GL_UNSIGNED_BYTE
,
bitmapBuf
.
get
());
CHECK_GL_ERROR
();
glBindTexture
(
GL_TEXTURE_2D
,
0
);
CHECK_GL_ERROR
();
...
...
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