Long audio playback improvements: 2x playback, position storing

Various UI fixes
This commit is contained in:
Ilya Laktyushin
2019-09-18 02:24:56 +03:00
parent 0bbf8bf0fb
commit 1bebfdaf53
37 changed files with 302 additions and 78 deletions

View File

@@ -153,7 +153,16 @@ final class InstantPageTextItem: InstantPageItem {
if self.opaqueBackground {
context.setBlendMode(.normal)
}
CTLineDraw(line.line, context)
let glyphRuns = CTLineGetGlyphRuns(line.line) as NSArray
if glyphRuns.count != 0 {
for run in glyphRuns {
let run = run as! CTRun
let glyphCount = CTRunGetGlyphCount(run)
CTRunDraw(run, context, CFRangeMake(0, glyphCount))
}
}
if self.opaqueBackground {
context.setBlendMode(.copy)
}