2 Copyright © 1995-2013, The AROS Development Team. All rights reserved.
3 Copyright © 2001-2003, The MorphOS Development Team. All Rights Reserved.
7 #include <proto/graphics.h>
9 #include "intuition_intern.h"
11 /*****************************************************************************
14 #include <intuition/intuition.h>
15 #include <proto/intuition.h>
17 AROS_LH1(LONG
, IntuiTextLength
,
20 AROS_LHA(struct IntuiText
*, iText
, A0
),
23 struct IntuitionBase
*, IntuitionBase
, 55, Intuition
)
26 Measure the length of the IntuiText passed to the function. Further
27 IntuiTexts in iText->NextText are ignored. The length is measured in
31 iText - The size of this text. If iText->ITextFont contains NULL,
32 the system's font is used (and *not* the font of the currently
36 The width of the text in pixels.
48 *****************************************************************************/
52 struct GfxBase
*GfxBase
= GetPrivIBase(IntuitionBase
)->GfxBase
;
54 struct TextFont
*newfont
= NULL
;
57 DEBUG_INTUITEXTLENGTH(dprintf("IntuiTextLength(itext 0x%lx)\n",iText
));
59 SANITY_CHECKR(iText
,0)
65 newfont
= OpenFont(iText
->ITextFont
);
68 SetFont(&rp
, newfont
);
71 width
= TextLength(&rp
, iText
->IText
, strlen(iText
->IText
));
79 } /* IntuiTextLength */