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
b9c46f46
Kaydet (Commit)
b9c46f46
authored
Haz 19, 2013
tarafından
Tor Lillqvist
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
fdo#63616: Fix GetBoundRect for rotated text in CoreText backend
Change-Id: I8c9ee84afd71481c2c6b002265b86e048f369f5c
üst
a662d427
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
30 additions
and
9 deletions
+30
-9
ctlayout.cxx
vcl/coretext/ctlayout.cxx
+30
-9
No files found.
vcl/coretext/ctlayout.cxx
Dosyayı görüntüle @
b9c46f46
...
...
@@ -433,18 +433,39 @@ bool CTLayout::GetBoundRect( SalGraphics& rGraphics, Rectangle& rVCLRect ) const
return
false
;
#endif
CGContextSaveGState
(
rAquaGraphics
.
mrContext
);
CGContextScaleCTM
(
rAquaGraphics
.
mrContext
,
1.0
,
-
1.0
);
CGContextSetShouldAntialias
(
rAquaGraphics
.
mrContext
,
!
rAquaGraphics
.
mbNonAntialiasedText
);
const
Point
aVclPos
=
GetDrawPosition
(
Point
(
mnBaseAdv
,
0
)
);
CGPoint
aTextPos
=
{
(
CGFloat
)
+
aVclPos
.
X
(),
(
CGFloat
)
-
aVclPos
.
Y
()
};
if
(
mpTextStyle
->
mfFontRotation
!=
0.0
)
{
const
CGFloat
fRadians
=
mpTextStyle
->
mfFontRotation
;
CGContextRotateCTM
(
rAquaGraphics
.
mrContext
,
+
fRadians
);
const
CGAffineTransform
aInvMatrix
=
CGAffineTransformMakeRotation
(
-
fRadians
);
aTextPos
=
CGPointApplyAffineTransform
(
aTextPos
,
aInvMatrix
);
}
CGContextSetTextPosition
(
rAquaGraphics
.
mrContext
,
aTextPos
.
x
,
aTextPos
.
y
);
CGRect
aMacRect
=
CTLineGetImageBounds
(
mpCTLine
,
rAquaGraphics
.
mrContext
);
CGPoint
aMacPos
=
CGContextGetTextPosition
(
rAquaGraphics
.
mrContext
);
aMacRect
.
origin
.
x
-=
aMacPos
.
x
;
aMacRect
.
origin
.
y
-=
aMacPos
.
y
;
const
Point
aPos
=
GetDrawPosition
(
Point
(
mnBaseAdv
,
0
)
);
if
(
mpTextStyle
->
mfFontRotation
!=
0.0
)
{
const
CGFloat
fRadians
=
mpTextStyle
->
mfFontRotation
;
const
CGAffineTransform
aMatrix
=
CGAffineTransformMakeRotation
(
+
fRadians
);
aMacRect
=
CGRectApplyAffineTransform
(
aMacRect
,
aMatrix
);
}
CGContextRestoreGState
(
rAquaGraphics
.
mrContext
);
rVCLRect
.
Left
()
=
aVclPos
.
X
()
+
aMacRect
.
origin
.
x
;
rVCLRect
.
Right
()
=
aVclPos
.
X
()
+
(
aMacRect
.
origin
.
x
+
aMacRect
.
size
.
width
);
rVCLRect
.
Bottom
()
=
aVclPos
.
Y
()
-
(
aMacRect
.
origin
.
y
);
rVCLRect
.
Top
()
=
aVclPos
.
Y
()
-
(
aMacRect
.
origin
.
y
+
aMacRect
.
size
.
height
);
// CoreText top-bottom are vertically flipped from a VCL aspect
rVCLRect
.
Left
()
=
aPos
.
X
()
+
aMacRect
.
origin
.
x
;
rVCLRect
.
Right
()
=
aPos
.
X
()
+
(
aMacRect
.
origin
.
x
+
aMacRect
.
size
.
width
);
rVCLRect
.
Bottom
()
=
aPos
.
Y
()
-
aMacRect
.
origin
.
y
;
rVCLRect
.
Top
()
=
aPos
.
Y
()
-
(
aMacRect
.
origin
.
y
+
aMacRect
.
size
.
height
);
return
true
;
}
...
...
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