summaryrefslogtreecommitdiff
path: root/vcl/inc/unx/glyphcache.hxx
diff options
context:
space:
mode:
authorKhaled Hosny <khaledhosny@eglug.org>2016-12-30 11:02:18 +0200
committerKhaled Hosny <khaledhosny@eglug.org>2016-12-30 11:52:00 +0000
commitf2a5e6dc8f9c79b31ca1044fac8caa0130205e3c (patch)
tree1271cebe997f5aa8aff40609f60e49e60faee92d /vcl/inc/unx/glyphcache.hxx
parentf28d9aaea39f9a2b50c6b9ae36c466771ab72a92 (diff)
Get rid of GlyphMetric class
All we need is Rectangle, so lets keep things simple. Change-Id: I8c47a9159696b52d22c327f257d5e4aa8898d871 Reviewed-on: https://gerrit.libreoffice.org/32506 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Khaled Hosny <khaledhosny@eglug.org>
Diffstat (limited to 'vcl/inc/unx/glyphcache.hxx')
-rw-r--r--vcl/inc/unx/glyphcache.hxx29
1 files changed, 4 insertions, 25 deletions
diff --git a/vcl/inc/unx/glyphcache.hxx b/vcl/inc/unx/glyphcache.hxx
index c86dbac36a6b..935837d2a8a7 100644
--- a/vcl/inc/unx/glyphcache.hxx
+++ b/vcl/inc/unx/glyphcache.hxx
@@ -94,39 +94,19 @@ private:
FreetypeManager* mpFtManager;
};
-class GlyphMetric
-{
-public:
- GlyphMetric() {}
-
- const Point& GetOffset() const { return maOffset; }
- const Size& GetSize() const { return maSize; }
-
-protected:
- friend class GlyphData;
- void SetOffset( int nX, int nY ) { maOffset = Point( nX, nY); }
- void SetSize( const Size& s ) { maSize = s; }
-
-private:
- Point maOffset;
- Size maSize;
-};
-
class GlyphData
{
public:
GlyphData() : mnLruValue(0) {}
- const GlyphMetric& GetMetric() const { return maGlyphMetric; }
-
- void SetSize( const Size& s) { maGlyphMetric.SetSize( s ); }
- void SetOffset( int nX, int nY ) { maGlyphMetric.SetOffset( nX, nY ); }
+ const Rectangle& GetBoundRect() const { return maBoundRect; }
+ void SetBoundRect(Rectangle r) { maBoundRect = r; }
void SetLruValue( int n ) const { mnLruValue = n; }
long GetLruValue() const { return mnLruValue;}
private:
- GlyphMetric maGlyphMetric;
+ Rectangle maBoundRect;
// used by GlyphCache for cache LRU algorithm
mutable long mnLruValue;
@@ -154,8 +134,7 @@ public:
const FontCharMapRef GetFontCharMap() const;
bool GetFontCapabilities(vcl::FontCapabilities &) const;
- const GlyphMetric& GetGlyphMetric(const GlyphItem& rGlyph);
-
+ const Rectangle& GetGlyphBoundRect(const GlyphItem& rGlyph);
bool GetGlyphOutline(const GlyphItem& rGlyph, basegfx::B2DPolyPolygon&) const;
bool GetAntialiasAdvice() const;
hb_font_t* GetHbFont() { return mpHbFont; }