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
b2ad5380
Kaydet (Commit)
b2ad5380
authored
Mar 25, 2013
tarafından
Tor Lillqvist
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Handle different basebmp scanline formats and flip vertically when needed
Change-Id: Ic0fd7d60ddc66bcd5577988b3a4e5b2185d3ec1f
üst
bcb57baa
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
31 additions
and
5 deletions
+31
-5
LOViewerAppDelegate.mm
ios/experimental/Viewer/Viewer/LOViewerAppDelegate.mm
+1
-1
salgdi.cxx
vcl/coretext/salgdi.cxx
+30
-4
No files found.
ios/experimental/Viewer/Viewer/LOViewerAppDelegate.mm
Dosyayı görüntüle @
b2ad5380
...
@@ -26,7 +26,7 @@ static UIWindow *theWindow;
...
@@ -26,7 +26,7 @@ static UIWindow *theWindow;
(void) application;
(void) application;
(void) launchOptions;
(void) launchOptions;
CGRect bounds = [[UIScreen mainScreen]
applicationFrame
];
CGRect bounds = [[UIScreen mainScreen]
bounds
];
self.window = [[LOViewerWindow alloc] initWithFrame:bounds];
self.window = [[LOViewerWindow alloc] initWithFrame:bounds];
theWindow = self.window;
theWindow = self.window;
...
...
vcl/coretext/salgdi.cxx
Dosyayı görüntüle @
b2ad5380
...
@@ -30,6 +30,8 @@
...
@@ -30,6 +30,8 @@
#include <UIKit/UIKit.h>
#include <UIKit/UIKit.h>
#include <postmac.h>
#include <postmac.h>
#include <basebmp/scanlineformats.hxx>
#include "saldatabasic.hxx"
#include "saldatabasic.hxx"
#include "headless/svpframe.hxx"
#include "headless/svpframe.hxx"
#include "headless/svpgdi.hxx"
#include "headless/svpgdi.hxx"
...
@@ -284,17 +286,41 @@ bool SvpSalGraphics::CheckContext()
...
@@ -284,17 +286,41 @@ bool SvpSalGraphics::CheckContext()
basegfx
::
B2IVector
size
=
m_aDevice
->
getSize
();
basegfx
::
B2IVector
size
=
m_aDevice
->
getSize
();
basebmp
::
RawMemorySharedArray
pixelBuffer
=
m_aDevice
->
getBuffer
();
basebmp
::
RawMemorySharedArray
pixelBuffer
=
m_aDevice
->
getBuffer
();
mrContext
=
CGBitmapContextCreate
(
pixelBuffer
.
get
(),
size
.
getX
(),
size
.
getY
(),
8
,
m_aDevice
->
getScanlineStride
(),
SAL_INFO
(
"vcl.ios"
,
"CheckContext: device="
<<
m_aDevice
.
get
()
<<
" size="
<<
size
.
getX
()
<<
"x"
<<
size
.
getY
()
<<
(
m_aDevice
->
isTopDown
()
?
" top-down"
:
" bottom-up"
)
<<
" stride="
<<
m_aDevice
->
getScanlineStride
()
);
CGColorSpaceCreateDeviceRGB
(),
kCGImageAlphaNoneSkipLast
);
switch
(
m_aDevice
->
getScanlineFormat
()
)
{
case
basebmp
:
:
Format
::
EIGHT_BIT_PAL
:
mrContext
=
CGBitmapContextCreate
(
pixelBuffer
.
get
(),
size
.
getX
(),
size
.
getY
(),
8
,
m_aDevice
->
getScanlineStride
(),
CGColorSpaceCreateDeviceGray
(),
kCGImageAlphaNone
);
break
;
case
basebmp
:
:
Format
::
THIRTYTWO_BIT_TC_MASK_RGBA
:
mrContext
=
CGBitmapContextCreate
(
pixelBuffer
.
get
(),
size
.
getX
(),
size
.
getY
(),
8
,
m_aDevice
->
getScanlineStride
(),
CGColorSpaceCreateDeviceRGB
(),
kCGImageAlphaNoneSkipLast
);
break
;
default
:
SAL_INFO
(
"vcl.ios"
,
"CheckContext: unsupported color format "
<<
basebmp
::
Format
::
formatName
(
m_aDevice
->
getScanlineFormat
()
)
);
}
SAL_WARN_IF
(
mrContext
==
NULL
,
"vcl.ios"
,
"CheckContext() failed"
);
SAL_WARN_IF
(
mrContext
==
NULL
,
"vcl.ios"
,
"CheckContext() failed"
);
return
(
mrContext
!=
NULL
);
if
(
mrContext
!=
NULL
&&
m_aDevice
->
isTopDown
()
)
{
CGContextTranslateCTM
(
mrContext
,
0
,
size
.
getY
()
);
CGContextScaleCTM
(
mrContext
,
1
,
-
1
);
}
return
(
mrContext
!=
NULL
);
}
}
CGContextRef
SvpSalGraphics
::
GetContext
()
CGContextRef
SvpSalGraphics
::
GetContext
()
{
{
if
(
!
mrContext
)
if
(
!
mrContext
)
CheckContext
();
CheckContext
();
return
mrContext
;
return
mrContext
;
...
...
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