support rendering strings up to a certain length, ie less then strlen
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@11964 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -193,6 +193,7 @@ AGGTextRenderer::PostScriptName() const
|
||||
// RenderString
|
||||
void
|
||||
AGGTextRenderer::RenderString(const char* string,
|
||||
uint32 length,
|
||||
font_renderer_solid_type* solidRenderer,
|
||||
font_renderer_bin_type* binRenderer,
|
||||
const Transformable& transform,
|
||||
@@ -217,7 +218,7 @@ AGGTextRenderer::RenderString(const char* string,
|
||||
conv_font_trans_type ftrans(fcurves, transform);
|
||||
|
||||
|
||||
int32 srcLength = strlen(string);
|
||||
int32 srcLength = min_c(length, strlen(string));
|
||||
int32 dstLength = srcLength * 4;
|
||||
|
||||
char* buffer = new char[dstLength];
|
||||
|
||||
@@ -30,6 +30,7 @@ class AGGTextRenderer : public TextRenderer {
|
||||
virtual const char* PostScriptName() const;
|
||||
|
||||
virtual void RenderString(const char* utf8String,
|
||||
uint32 length,
|
||||
font_renderer_solid_type* solidRenderer,
|
||||
font_renderer_bin_type* binRenderer,
|
||||
const Transformable& transform,
|
||||
|
||||
Reference in New Issue
Block a user