From cd50559ddef116e48989433236618d7ae579aa07 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20A=C3=9Fmus?= Date: Fri, 6 Dec 2013 22:58:48 +0100 Subject: [PATCH] ParagraphLayout: Added CountGlyphs() --- src/apps/haiku-depot/textview/ParagraphLayout.cpp | 7 +++++++ src/apps/haiku-depot/textview/ParagraphLayout.h | 2 ++ 2 files changed, 9 insertions(+) diff --git a/src/apps/haiku-depot/textview/ParagraphLayout.cpp b/src/apps/haiku-depot/textview/ParagraphLayout.cpp index 07a8003527..62b57d1b52 100644 --- a/src/apps/haiku-depot/textview/ParagraphLayout.cpp +++ b/src/apps/haiku-depot/textview/ParagraphLayout.cpp @@ -271,6 +271,13 @@ ParagraphLayout::Draw(BView* view, const BPoint& offset) } +int32 +ParagraphLayout::CountGlyphs() const +{ + return fGlyphInfos.CountItems(); +} + + // #pragma mark - private diff --git a/src/apps/haiku-depot/textview/ParagraphLayout.h b/src/apps/haiku-depot/textview/ParagraphLayout.h index 843282af3c..ff21fcf04c 100644 --- a/src/apps/haiku-depot/textview/ParagraphLayout.h +++ b/src/apps/haiku-depot/textview/ParagraphLayout.h @@ -189,6 +189,8 @@ public: float Height(); void Draw(BView* view, const BPoint& offset); + int32 CountGlyphs() const; + private: void _Init();