FTBbox now uses floats rather then ints
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83
diff --git a/include/FTFont.h b/include/FTFont.h
index b872872..e0d39e4 100755
--- a/include/FTFont.h
+++ b/include/FTFont.h
@@ -106,7 +106,7 @@ class FTGL_EXPORT FTFont
* @param ury upper right far y coord
* @param urz upper right far z coord
*/
- void BBox( const char* text, int& llx, int& lly, int& llz, int& urx, int& ury, int& urz);
+ void BBox( const char* text, float& llx, float& lly, float& llz, float& urx, float& ury, float& urz);
/**
* Get the bounding box for a string.
@@ -119,7 +119,7 @@ class FTGL_EXPORT FTFont
* @param ury upper right far y coord
* @param urz upper right far z coord
*/
- void BBox( const wchar_t* string, int& llx, int& lly, int& llz, int& urx, int& ury, int& urz);
+ void BBox( const wchar_t* string, float& llx, float& lly, float& llz, float& urx, float& ury, float& urz);
/**
* Get the advance width for a string.
diff --git a/include/FTGlyph.h b/include/FTGlyph.h
index 5b52b7b..6494d64 100755
--- a/include/FTGlyph.h
+++ b/include/FTGlyph.h
@@ -8,6 +8,11 @@
#include "FTGL.h"
+/**
+ * FTBBox
+ *
+ *
+ */
class FTGL_EXPORT FTBBox
{
public:
@@ -26,10 +31,10 @@ class FTGL_EXPORT FTBBox
FT_Glyph_Get_CBox( glyph, ft_glyph_bbox_subpixels, &bbox );
x1 = bbox.xMin >> 6;
- y1 = bbox.yMin >> 6;;
+ y1 = bbox.yMin >> 6;
z1 = 0;
- x2 = bbox.xMax >> 6;;
- y2 = bbox.yMax >> 6;;
+ x2 = bbox.xMax >> 6;
+ y2 = bbox.yMax >> 6;
z2 = 0;
}
@@ -46,7 +51,7 @@ class FTGL_EXPORT FTBBox
{}
// Make these ftPoints
- int x1, y1, z1, x2, y2, z2;
+ float x1, y1, z1, x2, y2, z2;
protected:
diff --git a/src/FTFont.cpp b/src/FTFont.cpp
index 2bac506..d0319ed 100755
--- a/src/FTFont.cpp
+++ b/src/FTFont.cpp
@@ -108,7 +108,7 @@ int FTFont::Descender() const
void FTFont::BBox( const char* string,
- int& llx, int& lly, int& llz, int& urx, int& ury, int& urz)
+ float& llx, float& lly, float& llz, float& urx, float& ury, float& urz)
{
const unsigned char* c = (unsigned char*)string;
llx = lly = llz = urx = ury = urz = 0;
@@ -144,7 +144,7 @@ void FTFont::BBox( const char* string,
}
void FTFont::BBox( const wchar_t* string,
- int& llx, int& lly, int& llz, int& urx, int& ury, int& urz)
+ float& llx, float& lly, float& llz, float& urx, float& ury, float& urz)
{
const wchar_t* c = string;
llx = lly = llz = urx = ury = urz = 0;